Examples of removeFirstSegments()


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

                        designContainer.accept(new IResourceVisitor() {

                            public boolean visit(IResource resource) throws CoreException {
                                IPath remotePathObj = resource.getLocation();
                                int count = remotePathObj.matchingFirstSegments(_runtime.getDesignRoot().getLocation());
                                remotePathObj = remotePathObj.removeFirstSegments(count);
                                String remotePath = remotePathObj.toString();
                                if (resource.getType() == IResource.FILE) {
                                    DataSource content = new FileDataSource(((IFile) resource).getLocation().toFile());
                                    try {
                                        _remoteServer.getServices().updateFSDesignResource(_remoteServer.getSession(), remotePath, content, resource.getLocalTimeStamp());
View Full Code Here

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

      IContainer base = getTmlRoot().getFolder(mediaKey);
     
      IPath basePath = base.getFullPath();
      IPath path = tmlFile.getFullPath();     
      if(basePath.isPrefixOf(path)){
          path = path.removeFirstSegments(basePath.segmentCount());            
          path = path.removeFileExtension();
            return path.toString().replace('/', ':');
        }
      return null;
  }
View Full Code Here

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

    // the path of the selected medium
    IPath mediumPath = designHelper.getTmlRoot().getFolder(new Path(medium)).getProjectRelativePath();

    // the path to the file which we are currently editing
    IPath pathOfEditedFile = activeFile.getParent().getProjectRelativePath();
    pathOfEditedFile = pathOfEditedFile.removeFirstSegments(mediumPath.segmentCount());

    ResourceIndexManager rsm = Plugin.getDefault().getResourceIndexManager();
    if (rsm != null) {
      nontmlspecificrefs = rsm.getTMLpaths(activeFile, medium);
View Full Code Here

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

        // path of the current file
        IPath currentFilePath = currentFile.removeLastSegments(1);

        // removing the path of the elected medium
        currentFilePath = currentFilePath.removeFirstSegments(mediumPath.segmentCount());

        // removing the path of the elected medium
        currentFile = currentFile.removeFirstSegments(mediumPath.segmentCount());

        IPath tmp = null;
View Full Code Here

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

                IPath refPath = container.getFullPath().makeRelativeTo(helper.getFileContainerRoot().getFullPath());
              references.add(refPath.toString().toLowerCase().replaceAll("\\/",":"));
             
              IPath activeFolderPath = activeFile.getParent().getFullPath().makeRelativeTo(helper.getTmlRoot().getFullPath());
              // remove medium
              activeFolderPath = activeFolderPath.removeFirstSegments(1);
               if (activeFolderPath.segmentCount() > 0 && (refPath.segmentCount() >= activeFolderPath.segmentCount())) {
                    int a = refPath.segmentCount();
                    int b = activeFolderPath.segmentCount();
                    IPath tmp = refPath.removeLastSegments(a - b);
                    if (tmp.equals(activeFolderPath)) {
View Full Code Here

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

   
            // path of the current file
            IPath currentFilePath = scriptFile.removeLastSegments(1);
   
            // removing the path of the selected medium
            currentFilePath = currentFilePath.removeFirstSegments(mediumPath.segmentCount());
   
            // removing the path of the elected medium
            scriptFile = scriptFile.removeFirstSegments(mediumPath.segmentCount());
   
            IPath tmp = null;
View Full Code Here

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

                if (p == null) {
                    continue;
                }
                if (!p.toFile().exists()) {
                    // removeFirstSegments: remove project from relative path
                    p = projectPath.append(p.removeFirstSegments(1));
                    if (!p.toFile().exists()) {
                        continue;
                    }
                }
                try {
View Full Code Here

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

      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();

      // complain if duplicate path
      if (!pathes.add(entryPath)){
        return new JavaModelStatus(IJavaModelStatusConstants.NAME_COLLISION, Messages.bind(Messages.classpath_duplicateEntryPath, new String[] {entryPathMsg, projectName}));
      }
View Full Code Here

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

      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) continue; // 36465 - for 2.0 backward compatibility, only check specific output locations (the default can still coincidate)
        // if (output == null) output = projectOutputLocation; // if no specific output, still need to check using default output (this line would check default output)
View Full Code Here

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

    IPath path = entry.getPath();

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

    switch(entry.getEntryKind()){

      // container entry check
      case IClasspathEntry.CPE_CONTAINER :
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.