Package org.eclipse.core.runtime

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


      IPath entryPath = entry.getPath();
      int kind = entry.getEntryKind();

      // Build some common strings for status message
      boolean isProjectRelative = projectName.equals(entryPath.segment(0));
      String entryPathMsg = isProjectRelative ? entryPath.removeFirstSegments(1).toString() : entryPath.makeRelative().toString();

      if (kind == IClasspathEntry.CPE_SOURCE) {
        IPath output = entry.getOutputLocation();
        if (output == null) output = projectOutputLocation; // if no specific output, still need to check using default output (this line would check default output)
        for (int j = 0; j < length; j++) {
View Full Code Here


                    project, path,
                    Messages.bind(Messages.classpath_incompatibleLibraryJDKLevel,
                        new String[] {
                          project.getElementName(),
                          CompilerOptions.versionFromJdkLevel(projectTargetJDK),
                          path.makeRelative().toString(),
                          CompilerOptions.versionFromJdkLevel(prereqProjectTargetJDK)}));
              }
            }
          } catch (CoreException e){
            return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_unboundProject, new String[] {path.segment(0), projectName}));
View Full Code Here

      if (obj instanceof IPath)
        path = (IPath) resource[0];
      else if (obj instanceof IProject)
        path = ((IProject) obj).getFullPath();

      text = path.makeRelative().toString();
    }

    return text;
  }
View Full Code Here

    while (path.segmentCount() > 1) {
      if (root.getFile(path).exists()) {
        problemType = PROBLEM_PATH_OCCUPIED;
        problemMessage = NLS.bind(
            IDEWorkbenchMessages.ResourceGroup_pathOccupied,
            path.makeRelative());
        return false;
      }
      path = path.removeLastSegments(1);
    }
    return true;
View Full Code Here

        if ((results != null) && (results.length > 0) && (results[0] instanceof IFile)) {
            IPath path = ((IFile) results[0]).getFullPath();
            if (project != null && path.segment(0).equals(project.getProject().getName())) {
                setWorkspaceLoc(path.removeFirstSegments(1).makeRelative().toString());
            } else {
                String containerName = path.makeRelative().toString();
                setWorkspaceLoc("${workspace_loc:" + containerName + "}");
            }
        }
    }
View Full Code Here

        dialog.showClosedProjects(false);
        dialog.open();
        Object[] results = dialog.getResult();     
        if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
            IPath path = (IPath)results[0];
            String containerName = path.makeRelative().toString();
            setOtherWorkingDirectoryText("${workspace_loc:" + containerName + "}"); //$NON-NLS-1$ //$NON-NLS-2$
        }          
    }
   
    /**
 
View Full Code Here

        text = ResourceUtil
            .getString("SearchResultView.removed_resource"); //$NON-NLS-1$
      } else {
        IPath path = resource.getFullPath().removeLastSegments(1);
        if (path.getDevice() == null) {
          path = path.makeRelative();
        }
        if ((fOrder == SHOW_LABEL) || (fOrder == SHOW_LABEL_PATH)) {
          text = fLabelProvider.getText(resource);
          if ((path != null) && (fOrder == SHOW_LABEL_PATH)) {
            fArgs[0] = text;
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.