Package org.eclipse.core.runtime

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


  }

  protected void createRepository() throws IOException, GitAPIException, CoreException {
    IPath randomLocation = createTempDir();
    gitDir = randomLocation.toFile();
    randomLocation = randomLocation.addTrailingSeparator().append(Constants.DOT_GIT);
    File dotGitDir = randomLocation.toFile().getCanonicalFile();
    db = FileRepositoryBuilder.create(dotGitDir);
    toClose.add(db);
    assertFalse(dotGitDir.exists());
    db.create(false /* non bare */);
 
View Full Code Here


    URL fileLocation = createdFile.getURL();
    IPath filepath = new Path(fileLocation.getPath());
    filepath = filepath.removeFirstSegments(new Path(FILE_SERVLET_LOCATION).segmentCount()); // chop off leading /file/
    filepath = filepath.removeLastSegments(1); // chop off trailing /foo.html
    filepath = filepath.makeAbsolute();
    filepath = filepath.addTrailingSeparator();
    String parentFolder = filepath.toString();

    // User B: Give access to test's workspace
    String bWorkspaceId = workspaceId;
    AuthorizationService.addUserRight(userBObject.getUniqueId(), "/workspace/" + bWorkspaceId);
View Full Code Here

      // expect only origin
      getRemote(remotesLocation, 1, 0, Constants.DEFAULT_REMOTE_NAME);

      // create secondary repository
      IPath randomLocation = createTempDir();
      randomLocation = randomLocation.addTrailingSeparator().append(Constants.DOT_GIT);
      File dotGitDir = randomLocation.toFile().getCanonicalFile();
      Repository db2 = FileRepositoryBuilder.create(dotGitDir);
      assertFalse(dotGitDir.exists());
      db2.create(false /* non bare */);
      toClose.add(db2);
 
View Full Code Here

          s += GitUtils.encode(requestObject.getString(GitConstants.KEY_COMMIT_NEW));
        }
        np = np.append(s);
      }
      if (p.hasTrailingSeparator())
        np = np.addTrailingSeparator();
      URI nu = new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), np.toString(), u.getQuery(), u.getFragment());
      JSONObject result = new JSONObject();
      result.put(ProtocolConstants.KEY_LOCATION, nu.toString());
      OrionServlet.writeJSONResponse(request, response, result, JsonURIUnqualificationStrategy.ALL_NO_GIT);
      response.setHeader(ProtocolConstants.HEADER_LOCATION, resovleOrionURI(request, nu).toString());
View Full Code Here

          s += ".." + GitUtils.encode(newCommit); //$NON-NLS-1$
        }
        np = np.append(s);
      }
      if (p.hasTrailingSeparator())
        np = np.addTrailingSeparator();
      URI nu = new URI(u.getScheme(), u.getUserInfo(), u.getHost(), u.getPort(), np.toString(), request.getQueryString(), u.getFragment());
      JSONObject result = new JSONObject();
      result.put(ProtocolConstants.KEY_LOCATION, nu);
      OrionServlet.writeJSONResponse(request, response, result, JsonURIUnqualificationStrategy.ALL_NO_GIT);
      response.setHeader(ProtocolConstants.HEADER_LOCATION, resovleOrionURI(request, nu).toString());
View Full Code Here

    if (externalPath.getDevice() == null) {
      result = result.setDevice(null);
    }
    // keep trailing separator only if it was specified (this is because File.getCanonicalPath() converts 'd:/lib/classes/' to 'd:/lib/classes')
    if (externalPath.hasTrailingSeparator()) {
      result = result.addTrailingSeparator();
    }
    return result;
  }

  /**
 
View Full Code Here

    }
    path = path.removeLastSegments(1);
    if (path.isEmpty()) {
      return null;
    }
    return path.addTrailingSeparator();
  }

  /**
   * @generated
   */
 
View Full Code Here

    }
    path = path.removeLastSegments(1);
    if (path.isEmpty()) {
      return null;
    }
    return path.addTrailingSeparator();
  }

  /**
   * @generated
   */
 
View Full Code Here

     * <workspace>/.metadata/plugins/org.python.pydev
     */
    public static IPath getFilePathFromMetadata(String fileName) {
        Bundle bundle = Platform.getBundle("org.python.pydev");
        IPath path = Platform.getStateLocation(bundle);
        path = path.addTrailingSeparator().append(fileName);
        return path;
    }
}
View Full Code Here

  {
    IPath p = Path.fromOSString(path);
    if (!p.hasTrailingSeparator()){
      p = p.uptoSegment(p.segmentCount() - 1);
    }
    return p.addTrailingSeparator().toOSString();
  }

  /**
   * Gets the directory path from the supplied path by removing the last path
   * segment.
 
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.