private boolean hasIncomingChanges(IDiffTree tree) { return tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() { @Override public boolean select(IDiff node) { if (node instanceof IThreeWayDiff) { IThreeWayDiff twd = (IThreeWayDiff) node; int direction = twd.getDirection(); if (direction == IThreeWayDiff.INCOMING || direction == IThreeWayDiff.CONFLICTING) { return true; } } else { // Return true for any two-way change return true; } return false; } }); }
private boolean hasIncomingChanges(IDiffTree tree) { return tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() { public boolean select(IDiff node) { if (node instanceof IThreeWayDiff) { IThreeWayDiff twd = (IThreeWayDiff) node; int direction = twd.getDirection(); if (direction == IThreeWayDiff.INCOMING || direction == IThreeWayDiff.CONFLICTING) { return true; } } else { // Return true for any two-way change return true; } return false; } }); }
public DeleteFileChange(IFile file){ Assert.isNotNull(file, "file"); //$NON-NLS-1$ fPath= file.getFullPath().removeFirstSegments(ResourcesPlugin.getWorkspace().getRoot().getFullPath().segmentCount()); }
public IPath getDestinationProjectPath() { return fDestination.getFullPath().removeFirstSegments(ResourcesPlugin.getWorkspace().getRoot().getFullPath().segmentCount()); }
static IPath getResourcePath(IResource resource){ return resource.getFullPath().removeFirstSegments(ResourcesPlugin.getWorkspace().getRoot().getFullPath().segmentCount()); }
public static IPath getFolderPath(IFolder folder){ return folder.getFullPath().removeFirstSegments(ResourcesPlugin.getWorkspace().getRoot().getFullPath().segmentCount()); }
private static IPath getWorkspacePath() { return ResourcesPlugin.getWorkspace().getRoot().getFullPath(); }
protected IPath getDestinationProjectPath(){ return fDestination.getFullPath().removeFirstSegments(ResourcesPlugin.getWorkspace().getRoot().getFullPath().segmentCount()); }
protected IPath getDestinationProjectPath(){ return fDestination.getFullPath().removeFirstSegments(ResourcesPlugin.getWorkspace().getRoot().getFullPath().segmentCount()); }
GridData gd = new GridData(GridData.FILL_HORIZONTAL); projectRootLocationText.setLayoutData(gd); projectRootLocationText.setText(ResourcesPlugin.getWorkspace().getRoot().getFullPath().toOSString()); projectRootLocationText.setEnabled(false); /* disabled by default */
/** * Returns the path of the container resource specified in the container * name entry field, or <code>null</code> if no name has been typed in. * <p> * The container specified by the full path might not exist and would need to * be created. * </p> * * @return the full path of the container resource specified in * the container name entry field, or <code>null</code> */ protected IPath getContainerFullPath() { IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); //make the path absolute to allow for optional leading slash IPath testPath = getResourcePath(); if (testPath.equals(workspace.getRoot().getFullPath())) { return testPath; } IStatus result = workspace.validatePath(testPath.toString(), IResource.PROJECT | IResource.FOLDER | IResource.ROOT); if (result.isOK()) { return testPath; } return null; }
public void collectProjects(Collection<IProject> projects, IProject project, IProgressMonitor monitor) { if (!project.isOpen() || !ProjectUtils.isMavenProject(project)) { return; } projects.add(project); IMavenProjectFacade projectFacade = registry.create(project, monitor); if (projectFacade != null && "pom".equals(projectFacade.getPackaging())) { List<String> modules = projectFacade.getMavenProjectModules(); for (String module : modules) { IPath pomPath = ResourcesPlugin.getWorkspace().getRoot().getFullPath().append(module).append("pom.xml"); IFile pom = ResourcesPlugin.getWorkspace().getRoot().getFile(pomPath); if (pom.exists()) { IProject p = pom.getProject(); if (p.isOpen()) { collectProjects(projects, p, monitor); } } } } }
workspace.getRoot().getFullPath();
workspace.getRoot().getFullPath();