Package org.eclipse.core.runtime

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


        // First see if it is a full path to an existing file.
        if (projectPath != null && publishableFile != null
            && publishableFile.exists()) {

          IPath relativeResourcepath = resourcePath
              .makeRelativeTo(projectPath);

          if (publishableFile.isFile()) {
            workspaceResource = project
                .getFile(relativeResourcepath);
View Full Code Here


       
        if (rootFolder != null)
        {
            IPath webContentPath =
                rootFolder.getUnderlyingFolder().getFullPath();
            return getURIFromPath(p.makeRelativeTo(webContentPath));
        }
    }
    return null;
  }
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 f = new Path(rawPath);
      java.io.File nf = new java.io.File(f.toOSString());
      if (nf.exists() && nf.isFile()) {
        // file exists, now check if its blueprint or spring
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(f.makeRelativeTo(ResourcesPlugin.getWorkspace().getRoot().getLocation()));
        isBlueprint = blueprintXmlMatcher.matches(file);
      }
    }
   
    return isBlueprint;
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

          org.eclipse.egit.ui.Activator.handleError(msg, e2, true);
        }
        for (TreeItem ti : tree.getSelection()) {
          IPath projectPath = new Path(ti.getText(1));
          IPath gitPath = new Path(gitDir.toString());
          IPath relative = gitPath.makeRelativeTo(projectPath);
          ti.setText(2, relative.toOSString());
          ((ProjectAndRepo) ti.getData()).repo = gitDir.toString();
          ti.setChecked(true);
        }
        updateControls();
View Full Code Here

          try {
            wsFile = workspace
                .getRoot()
                .getFile(
                    project.getFullPath()
                        .append(location
                            .makeRelativeTo(projectLocation)));
          } catch (Exception ex) {
            Logger.logException(ex);
          }
          break;
View Full Code Here

  }

  private Testsuites createRootSuite(File reportDir) {
    IPath p = new Path(reportDir.getAbsolutePath());
    IPath relative = p.makeRelativeTo(rootPath);
    Testsuites testsuites = JunitresultFactory.eINSTANCE.createTestsuites();
    testsuites.setName(relative.toString());
    return testsuites;
  }
View Full Code Here

   * @param f
   * @return
   */
  private String suitename(File f) {
    IPath p = new Path(f.getAbsolutePath());
    IPath relative = p.makeRelativeTo(rootPath);
    relative = relative.removeFileExtension();
    return relative.toString();
  }

  /**
 
View Full Code Here

    try {
      Map<String, String> taskInfo = rubyHelper.getRakefileTaskDescriptions(f);
      Path rootPath = new Path(root.getAbsolutePath());
      Path rakefilePath = new Path(f.getAbsolutePath());
      Rakefile result = new Rakefile(rakefilePath.makeRelativeTo(rootPath));

      if(taskInfo == null)
        return result;

      for(Entry<String, String> entry : taskInfo.entrySet())
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.