Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.makeAbsolute()


    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }

  /**
   * Returns an image for the image file at the given plug-in relative path.
View Full Code Here


    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }

  /**
   * Returns an image for the image file at the given plug-in relative path.
View Full Code Here

    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }

  /**
   * Returns an image for the image file at the given plug-in relative path.
View Full Code Here

   */
  public static String getStringOfIFileLocation(IFile file) {
    String location = null;
    IPath path = getPathOfIFileLocation(file);
    if (path != null) {
      location = path.makeAbsolute().toOSString();
    }
    return location;
  }
 
  /**
 
View Full Code Here

    WebResponse createdFile = createFileOnServer("", filename, fileContent);
    URL fileLocation = createdFile.getURL();
    IPath filepath = new Path(fileLocation.getPath());
    filepath = filepath.removeFirstSegments(new Path(FILE_SERVLET_LOCATION).segmentCount()); // chop off leading /file/
    filepath = filepath.removeLastSegments(1); // chop off trailing /foo.html
    filepath = filepath.makeAbsolute();
    filepath = filepath.addTrailingSeparator();
    String parentFolder = filepath.toString();

    // User B: Give access to test's workspace
    String bWorkspaceId = workspaceId;
View Full Code Here

    IPath result = new Path(GitServlet.GIT_URI).append(Tree.RESOURCE).append(clonePath).append(GitUtils.encode(this.getName()));
    if (path != null) {
      result.append(path);
    }
    return new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), result.makeAbsolute()
        .toString(), cloneLocation.getQuery(), cloneLocation.getFragment());
  }

  @PropertyDescription(name = GitConstants.KEY_HEAD)
  private URI getHeadLocation() throws IOException, URISyntaxException {
View Full Code Here

    IPath result = new Path(GitServlet.GIT_URI).append(Tree.RESOURCE).append(clonePath).append(GitUtils.encode(this.getName()));
    if (path != null) {
      result.append(path);
    }
    return new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), result.makeAbsolute()
        .toString(), cloneLocation.getQuery(), cloneLocation.getFragment());
  }

  @PropertyDescription(name = ProtocolConstants.KEY_LOCAL_TIMESTAMP)
  private long getTime() {
View Full Code Here

    } else {
      // need to start from the project root
      // project path is of the form /file/{workspaceId}/{projectName}
      result = clonePath.uptoSegment(3).append(path);
    }
    return new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), result.makeAbsolute()
        .toString(), cloneLocation.getQuery(), cloneLocation.getFragment());
  }

  private boolean handleGetDiff(HttpServletRequest request, HttpServletResponse response, Repository db, String scope, String pattern, OutputStream out)
      throws Exception {
View Full Code Here

    IPath result = new Path(GitServlet.GIT_URI).append(Tree.RESOURCE).append(clonePath).append(GitUtils.encode(this.getName()));
    if (path != null) {
      result.append(path);
    }
    return new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), result.makeAbsolute()
        .toString(), cloneLocation.getQuery(), cloneLocation.getFragment());
  }

  private RevCommit parseCommit() {
    ObjectId oid = ref.getObjectId();
View Full Code Here

    IPath result = new Path(GitServlet.GIT_URI).append(Tree.RESOURCE).append(clonePath).append(this.getName());
    if (path != null) {
      result = result.append(path);
    }
    return new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), result.makeAbsolute()
        .toString(), cloneLocation.getQuery(), cloneLocation.getFragment());
  }

  protected URI createContentLocation(final DiffEntry entr, String path) throws URISyntaxException {
    // remove /gitapi/clone from the start of path
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.