Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path.segment()


    URI uri = URI.create(toRelativeURI(remoteUri));
    IPath path = new Path(uri.getPath());
    // /git/remote/file/{path}
    assertTrue(path.segmentCount() > 3);
    assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
    assertEquals(Remote.RESOURCE, path.segment(1));
    assertEquals("file", path.segment(2));
  }

  protected static void assertCommitUri(String commitUri) {
    URI uri = URI.create(toRelativeURI(commitUri));
View Full Code Here


    IPath path = new Path(uri.getPath());
    // /git/remote/file/{path}
    assertTrue(path.segmentCount() > 3);
    assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
    assertEquals(Remote.RESOURCE, path.segment(1));
    assertEquals("file", path.segment(2));
  }

  protected static void assertCommitUri(String commitUri) {
    URI uri = URI.create(toRelativeURI(commitUri));
    IPath path = new Path(uri.getPath());
View Full Code Here

    IPath path = new Path(uri.getPath());
    AssertionError error = null;
    // /gitapi/commit/{ref}/file/{path}
    try {
      assertTrue(path.segmentCount() > 4);
      assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
      assertEquals(Commit.RESOURCE, path.segment(1));
      assertEquals("file", path.segment(3));
    } catch (AssertionError e) {
      error = e;
    }
View Full Code Here

    AssertionError error = null;
    // /gitapi/commit/{ref}/file/{path}
    try {
      assertTrue(path.segmentCount() > 4);
      assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
      assertEquals(Commit.RESOURCE, path.segment(1));
      assertEquals("file", path.segment(3));
    } catch (AssertionError e) {
      error = e;
    }
View Full Code Here

    // /gitapi/commit/{ref}/file/{path}
    try {
      assertTrue(path.segmentCount() > 4);
      assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
      assertEquals(Commit.RESOURCE, path.segment(1));
      assertEquals("file", path.segment(3));
    } catch (AssertionError e) {
      error = e;
    }

    // /gitapi/commit/file/{path}
View Full Code Here

    }

    // /gitapi/commit/file/{path}
    try {
      assertTrue(path.segmentCount() > 3);
      assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
      assertEquals(Commit.RESOURCE, path.segment(1));
      assertEquals("file", path.segment(2));
    } catch (AssertionError e) {
      if (error != null) {
        throw error; // rethrow the first exception
View Full Code Here

    // /gitapi/commit/file/{path}
    try {
      assertTrue(path.segmentCount() > 3);
      assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
      assertEquals(Commit.RESOURCE, path.segment(1));
      assertEquals("file", path.segment(2));
    } catch (AssertionError e) {
      if (error != null) {
        throw error; // rethrow the first exception
      } // otherwise it's a commit location, ignore this exception
View Full Code Here

    // /gitapi/commit/file/{path}
    try {
      assertTrue(path.segmentCount() > 3);
      assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
      assertEquals(Commit.RESOURCE, path.segment(1));
      assertEquals("file", path.segment(2));
    } catch (AssertionError e) {
      if (error != null) {
        throw error; // rethrow the first exception
      } // otherwise it's a commit location, ignore this exception
    }
View Full Code Here

  static void assertStatusUri(String statusUri) {
    URI uri = URI.create(toRelativeURI(statusUri));
    IPath path = new Path(uri.getPath());
    // /git/status/file/{path}
    assertTrue(path.segmentCount() > 3);
    assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
    assertEquals(Status.RESOURCE, path.segment(1));
    assertEquals("file", path.segment(2));
  }

  private static void assertRemoteOrRemoteBranchLocation(String remoteLocation) {
View Full Code Here

    URI uri = URI.create(toRelativeURI(statusUri));
    IPath path = new Path(uri.getPath());
    // /git/status/file/{path}
    assertTrue(path.segmentCount() > 3);
    assertEquals(GitServlet.GIT_URI.substring(1), path.segment(0));
    assertEquals(Status.RESOURCE, path.segment(1));
    assertEquals("file", path.segment(2));
  }

  private static void assertRemoteOrRemoteBranchLocation(String remoteLocation) {
    URI uri = URI.create(toRelativeURI(remoteLocation));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.