Package org.eclipse.core.runtime

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


    switch (kind) {
      case IClasspathEntry.CPE_LIBRARY:
        path = classPathEntry.getPath();
        boolean inProject = currentContainer.getFullPath().makeAbsolute().isPrefixOf(
                path.makeAbsolute());

        System.out.println("\tProject (full absolute): "
                + currentContainer.getFullPath().makeAbsolute());
        System.out.println(inProject ? "\tinProject" : "Not in Project");
View Full Code Here


          if (!contain(classPath, temp)) {
            classPath.add(temp);
            System.out.println("\tadded to ClassPath: " + temp);
          }
        } else {
          temp = path.makeAbsolute().toOSString();
          temp = temp.trim();
          // MissingLibraries.add(temp);

          // if in another project in the workspace
          // -> warn : warnAboutMissingLibraries = true;
View Full Code Here

    if (filename != null) {
      final IPath filePath = new Path(filename);
      if ((filePath.segmentCount() > 1) && (ResourcesPlugin.getWorkspace().getRoot().getFile(filePath).exists())) {
        return ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
      }
      final IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(URIUtil.toURI(filePath.makeAbsolute()));
      for (int i = 0; (i < files.length) && (file == null); ++i) {
        if (files[i].exists()) {
          file = files[i];
          break;
        }
View Full Code Here

  public void run() {
    String fileName = getResolvedURL(getElement(), URI);

    if (fileName != null && fileName.length() > 0) {
      IPath includedPath = new Path(fileName);
      includedPath.makeAbsolute();

      IFile file = getFile(includedPath);
      if (file != null && file.exists()) {
        try {
          IDE.openEditor(getPage(), file);
View Full Code Here

    IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
    IProject[] projects = workspaceRoot.getProjects();

    for (int i = 0, length = projects.length; i < length; i++) {
      IPath path = projects[i].getLocation();
      path = path.makeAbsolute();
      if (path != null && path.isPrefixOf(includedPath)) {
        // -1 so we still have the project path
        includedPath = includedPath.removeFirstSegments(path
            .segmentCount() - 1);
        return ResourcesPlugin.getWorkspace().getRoot().getFile(
View Full Code Here

    String fileName = getResolvedURL(getHostElement(), this._fileAttrName);
    if (fileName == null || fileName.length() == 0) {
      return null;
    }
        IPath includedPath = new Path(fileName);
        includedPath.makeAbsolute();

        IFile file = getFile(includedPath);
        if (file == null) {
          return null;
        }
View Full Code Here

    IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
    IProject[] projects = workspaceRoot.getProjects();

    for (int i = 0, length = projects.length; i < length; i++) {
      IPath path = projects[i].getLocation();
      path = path.makeAbsolute();
      if (path != null && path.isPrefixOf(includedPath)) {
        // -1 so we still have the project path
        includedPath = includedPath.removeFirstSegments(path
            .segmentCount() - 1);
        return ResourcesPlugin.getWorkspace().getRoot().getFile(
View Full Code Here

   * @param filePath - the path to the file
   * @return the contents, null if the file could not be found
   */
  protected String getContents(String filePath) {
    IPath path = new Path(filePath);
    return FileContentCache.getInstance().getContents(path.makeAbsolute());
  }
}
View Full Code Here

  }
 
  private static String getStandaloneTLDURI(TLDDocument doc, IProject project) {
    Path p = new Path(doc.getBaseLocation());
    IPath webContentPath = ComponentCore.createComponent(project).getRootFolder().getUnderlyingFolder().getLocation();
    return getURIFromPath(p.makeAbsolute().makeRelativeTo(webContentPath.makeAbsolute()));   
  }

  private static String getTagDirURI(TLDDocument doc, IProject project) {
    Path p = new Path(doc.getBaseLocation());
    IVirtualComponent projectComp = ComponentCore.createComponent(project);
View Full Code Here

    String value = configuration.getAttribute(cfgAttr, "");

    if ("/".equals(value)) {
      IPath path = (IPath) proj.getResource().getLocation().clone();
      path.makeAbsolute();
      value = path.toOSString();
    } else {
      if (proj.getProject().getFolder(value).getRawLocation() == null) {
        throw new IllegalStateException(
            "raw location shouldn't be null");
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.