Package org.eclipse.core.runtime

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


            }
          }
        }
        // Second try to retrieve the relative path
        if (newPath != null) {
          newPath = newPath.removeLastSegments(1).append(relativePath);
          return new EclipsePathMatchingResourcePatternResolver(file.getProject()).getResource(newPath.toString())
        }
      }
      catch (JavaModelException e) {
      }
View Full Code Here


    IFile webArtifact = SpringCoreUtils.getDeploymentDescriptor(project);
    if (webArtifact != null) {
      IPath path = webArtifact.getFullPath();
      if (path != null) {
        // Remove /WEB-INF/web.xml from path
        rootDirectories.add(path.removeLastSegments(2));
      }
    }

    return rootDirectories;
  }
View Full Code Here

                                    // from
                                    // existing
                                    // source
                                    // in
                                    // workspace
          if (!Platform.getLocation().equals(projectPath.removeLastSegments(1))) {
            setErrorMessage(NewRooWizardMessages.NewRooProjectWizardPageOne_Message_notOnWorkspaceRoot);
            setPageComplete(false);
            return;
          }
View Full Code Here

                return true;
              } else if (resource.getType() == IResource.FILE && !resource.isLinked()) {
                String extension = resource.getProjectRelativePath().getFileExtension();
                if( extension.equals("png") || extension.equals("jpg") || extension.equals("gif") ) {
                  IPath p = resource.getProjectRelativePath().removeFirstSegments(count);
                  String prefix = "\"/" + (p.segmentCount() > 1 ?  p.removeLastSegments(1).toString() : p.toString()) + "/" + context.getPrefix();
                  ICompletionProposal proposal = createCompletionProposal("\"/" + p.toString() +"\"", new StyledString("/" + p.toString()), null, getPriorityHelper().getDefaultPriority(), prefix, context);
                  acceptor.accept(proposal);
                }
              }
             
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.