Package org.eclipse.core.runtime

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


        }

        assert (src != null);
        assert (bin != null);

        sourceOutputLocations.put(src.makeRelativeTo(projectPath).toString(), bin.makeRelativeTo(projectPath).toString());
      }
    }

    return sourceOutputLocations;
  }
View Full Code Here


        String absFilePath = new File(contentSyncRoot, relativePath.toOSString()).getAbsolutePath();
        String filePath = serializationManager.getBaseResourcePath(absFilePath);

        IPath osPath = Path.fromOSString(filePath);
        String repositoryPath = serializationManager.getRepositoryPath(osPath.makeRelativeTo(syncFolder.getLocation())
                .makeAbsolute().toPortableString());

        Activator.getDefault().getPluginLogger()
                .trace("Repository path for deleted resource {0} is {1}", resource, repositoryPath);
View Full Code Here


        IPath filterPath = ProjectUtil.findFilterPath(contentProject);
        assertThat("filterPath.absolute", filterPath.isAbsolute(), equalTo(true));
       
        assertThat("filterPath", filterPath.makeRelativeTo(contentProject.getLocation()).toPortableString(),
                equalTo("META-INF/vault/filter.xml"));

    }
}
View Full Code Here

            final IClasspathEntry[] rawCp = jp.getRawClasspath();
            for (int i = 0; i < rawCp.length; i++) {
        IClasspathEntry aCp = rawCp[i];
        IPath outputLocation = aCp.getOutputLocation();
        if (outputLocation!=null) {
                    outputLocation = outputLocation.makeRelativeTo(getProject().getFullPath());
          filteredLocations.add(outputLocation.toString());
        }
      }
           
            getProject().accept(new IResourceVisitor() {
View Full Code Here

            && Path.ROOT.isValidPath(scriptName)) {
      final IFile scriptFile = project.getFile(scriptName);
      if (scriptFile.exists()) {
        IPath path = RutaProjectUtils.getTypeSystemDescriptorPath(
                scriptFile.getProjectRelativePath(), project);
        IFile ts = project.getFile(path.makeRelativeTo(project.getLocation()));
        if (ts.exists()) {
          return ts;
        }
      }
    }
View Full Code Here

    env.setBin(bin);
   
    for (IPackageFragmentRoot fragment : project.getAllPackageFragmentRoots()) {
      IPath path = fragment.getPath();
      boolean externalPath = fragment.getResource() == null;
      String p = externalPath ? path.toString() : path.makeRelativeTo(fullPath).toString();

      Path includePath;
      if (fullPath.isPrefixOf(path))
        includePath = p.isEmpty() ? root : new RelativePath(root, p);
      else if (externalPath)
View Full Code Here

      JSONObject clone = getCloneForGitResource(fileObject[0]);
      String gitIndexUri = clone.getString(GitConstants.KEY_INDEX);
      Set<String> patterns = new HashSet<String>(fileObject.length);
      for (int i = 0; i < fileObject.length; i++) {
        IPath locationPath = new Path(URI.create(toRelativeURI(fileObject[i].getString(ProtocolConstants.KEY_LOCATION))).getPath());
        patterns.add(locationPath.makeRelativeTo(gitCloneFilePath).toString());
      }

      request = GitAddTest.getPutGitIndexRequest(gitIndexUri, patterns);
    }
    WebResponse response = webConversation.getResponse(request);
View Full Code Here

            && Path.ROOT.isValidPath(scriptName)) {
      final IFile scriptFile = project.getFile(scriptName);
      if (scriptFile.exists()) {
        IPath path = RutaProjectUtils.getTypeSystemDescriptorPath(
                scriptFile.getProjectRelativePath(), project);
        IFile ts = project.getFile(path.makeRelativeTo(project.getLocation()));
        if (ts.exists()) {
          return ts;
        }
      }
    }
View Full Code Here

        File f = null;
        File testFolderFile = project.getProject().getParent().getRawLocation().append(getPackageFragmentRoot().getPath().makeRelative()).toFile();
        f = getBasePackage(testFolderFile);
        if (f != null && testRoot != null) {
          IPath p = new Path(f.getPath());
          p = p.makeRelativeTo(project.getProject().getParent().getRawLocation().append(getPackageFragmentRoot().getPath().makeRelative()));
          String name = "";
          StringTokenizer strTok = new StringTokenizer(p.toOSString(), File.separator);
          while (strTok.hasMoreTokens()) {
            String tok = strTok.nextToken();
            if (name.trim().length()>0) {
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.