Examples of makeRelative()


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

      // translate to project relative from absolute (unless a device path)
      if (xmlPath.isAbsolute()) {
        if (projectPath != null && projectPath.isPrefixOf(xmlPath)) {
          if (xmlPath.segment(0).equals(projectPath.segment(0))) {
            xmlPath = xmlPath.removeFirstSegments(1);
            xmlPath = xmlPath.makeRelative();
          } else {
            xmlPath = xmlPath.makeAbsolute();
          }
        }
      }
View Full Code Here

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

      xmlPath = this.sourceAttachmentPath;
      // translate to project relative from absolute
      if (this.entryKind != IClasspathEntry.CPE_VARIABLE && projectPath != null && projectPath.isPrefixOf(xmlPath)) {
        if (xmlPath.segment(0).equals(projectPath.segment(0))) {
          xmlPath = xmlPath.removeFirstSegments(1);
          xmlPath = xmlPath.makeRelative();
        }
      }
      parameters.put(TAG_SOURCEPATH, String.valueOf(xmlPath));
    }
    if (this.sourceAttachmentRootPath != null) {
View Full Code Here

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

        parameters.put(tagName, tagValue);
      }

    if (this.specificOutputLocation != null) {
      IPath outputLocation = this.specificOutputLocation.removeFirstSegments(1);
      outputLocation = outputLocation.makeRelative();
      parameters.put(TAG_OUTPUT, String.valueOf(outputLocation));
    }

    boolean hasExtraAttributes = this.extraAttributes.length != 0;
    boolean hasRestrictions = getAccessRuleSet() != null; // access rule set is null if no access rules
View Full Code Here

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

          String projectName = javaProject.getElementName();
          IPath newPath = path;
          if (path.segment(0).toString().equals(projectName)) {
            newPath = path.removeFirstSegments(1);
          }
          return Messages.bind(Messages.classpath_disabledInclusionExclusionPatterns, new String[] {newPath.makeRelative().toString(), projectName});

        case DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS:
          javaProject = (IJavaProject)elements[0];
          projectName = javaProject.getElementName();
          newPath = path;
View Full Code Here

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

          projectName = javaProject.getElementName();
          newPath = path;
          if (path.segment(0).toString().equals(projectName)) {
            newPath = path.removeFirstSegments(1);
          }
          return Messages.bind(Messages.classpath_disabledMultipleOutputLocations, new String[] {newPath.makeRelative().toString(), projectName});

        case INCOMPATIBLE_JDK_LEVEL:
            javaProject = (IJavaProject)elements[0];
            return Messages.bind(Messages.classpath_incompatibleLibraryJDKLevel, new String[]{ 
              javaProject.getElementName(),
View Full Code Here

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

  private static IModuleResource processModuleResource(IModuleResource or) {
    if (or instanceof IModuleFolder) {
      IModuleFolder of = (IModuleFolder) or;
      IPath p = of.getModuleRelativePath();
      if (p.isAbsolute()) {
        p = p.makeRelative();
      }
      ModuleFolder nf = new ModuleFolder(null, of.getName(), p);
      List<IModuleResource> c = new ArrayList<IModuleResource>();
      for (IModuleResource mc : of.members()) {
        c.add(processModuleResource(mc));
View Full Code Here

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

        IClasspathEntry[] entries = getProjectClassPath(src);

        SigilCore.makeSigilProject(currentProject, monitor);

        init(JavaCore.create(currentProject), output.makeRelative(), entries, false);

        configureJavaProject(new SubProgressMonitor(monitor, 3));

        configureSigilProject(currentProject, bsn, description, projectVersion, vendor,
            name, src, monitor);
View Full Code Here

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

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

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

      // translate to project relative from absolute (unless a device path)
      if (xmlPath.isAbsolute()) {
        if (projectPath != null && projectPath.isPrefixOf(xmlPath)) {
          if (xmlPath.segment(0).equals(projectPath.segment(0))) {
            xmlPath = xmlPath.removeFirstSegments(1);
            xmlPath = xmlPath.makeRelative();
          } else {
            xmlPath = xmlPath.makeAbsolute();
          }
        }
      }
View Full Code Here

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

      xmlPath = this.sourceAttachmentPath;
      // translate to project relative from absolute
      if (this.entryKind != IClasspathEntry.CPE_VARIABLE && projectPath != null && projectPath.isPrefixOf(xmlPath)) {
        if (xmlPath.segment(0).equals(projectPath.segment(0))) {
          xmlPath = xmlPath.removeFirstSegments(1);
          xmlPath = xmlPath.makeRelative();
        }
      }
      parameters.put(TAG_SOURCEPATH, String.valueOf(xmlPath));
    }
    if (this.sourceAttachmentRootPath != 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.