@Override public String getName() { if (projectDescription != null) { return projectDescription.getName(); } return super.getName(); }
@Override public String getName() { if (projectDescription != null) { return projectDescription.getName(); } return super.getName(); }
/** * Return <code>true</code> if there is a change in the name of the project. */ private boolean isNameChange(IProject project, IProjectDescription description) { return !project.getName().equals(description.getName()); }
/** * Return <code>true</code> if there is a change in the name of the project. */ private boolean isNameChange(IProject project, IProjectDescription description) { return !project.getName().equals(description.getName()); }
/** * Return <code>true</code> if there is a change in the name of the project. */ private boolean isNameChange(IProject project, IProjectDescription description) { return !project.getName().equals(description.getName()); }
@Override public String getName() { if (projectDescription != null) { return projectDescription.getName(); } return super.getName(); }
public String getName() { if (projectDescription != null) { return projectDescription.getName(); } return super.getName(); }
IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(new Path(ProjectPath + "/.project")); IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName()); project.create(description, null); project.open(null);
/** * Create a record for a project based on the info in the file. * * @param file */ public ProjectRecord(File file) { projectSystemFile = file; IPath path = new Path(projectSystemFile.getPath()); try { description = ResourcesPlugin.getWorkspace() .loadProjectDescription(path); projectName = description.getName(); } catch (CoreException e) { description = null; projectName = path.lastSegment(); } }
private IFileStore computeDestinationStore(IProjectDescription destDescription) throws CoreException { URI destLocation = destDescription.getLocationURI(); // Use the default area if necessary for the destination. if (destLocation == null) { IPath rootLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation(); destLocation = rootLocation.append(destDescription.getName()).toFile().toURI(); } return EFS.getStore(destLocation); }
private IFileStore computeDestinationStore(IProjectDescription destDescription) throws CoreException { URI destLocation = destDescription.getLocationURI(); // Use the default area if necessary for the destination. if (destLocation == null) { IPath rootLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation(); destLocation = rootLocation.append(destDescription.getName()).toFile().toURI(); } return EFS.getStore(destLocation); }
private IFileStore computeDestinationStore(IProjectDescription destDescription) throws CoreException { URI destLocation = destDescription.getLocationURI(); // Use the default area if necessary for the destination. if (destLocation == null) { IPath rootLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation(); destLocation = rootLocation.append(destDescription.getName()).toFile().toURI(); } return EFS.getStore(destLocation); }
IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(new Path(BuildPath + "/.project")); IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName()); IProject[] array = ResourcesPlugin.getWorkspace().getRoot().getProjects(); for(int count = 0; count <= array.length - 1; count ++){ if(project.equals(array[count])){ array[count].close(null); array[count].delete(true, null); } } project.create(description, null); project.open(null);
@Override public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor) throws CoreException { Assert.isNotNull(description); if (getType() != IResource.PROJECT) { String message = NLS.bind(Messages.resources_moveNotProject, getFullPath(), description.getName()); throw new ResourceException(IResourceStatus.INVALID_VALUE, getFullPath(), message, null); } ((Project) this).move(description, updateFlags, monitor); }
@Override public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor) throws CoreException { Assert.isNotNull(description); if (getType() != IResource.PROJECT) { String message = NLS.bind(Messages.resources_moveNotProject, getFullPath(), description.getName()); throw new ResourceException(IResourceStatus.INVALID_VALUE, getFullPath(), message, null); } ((Project) this).move(description, updateFlags, monitor); }
@Override public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor) throws CoreException { Assert.isNotNull(description); if (getType() != IResource.PROJECT) { String message = NLS.bind(Messages.resources_moveNotProject, getFullPath(), description.getName()); throw new ResourceException(IResourceStatus.INVALID_VALUE, getFullPath(), message, null); } ((Project) this).move(description, updateFlags, monitor); }
public void run(IProgressMonitor actMonitor) throws CoreException { final IProjectDescription desc = ResourcesPlugin .getWorkspace().newProjectDescription( projectName[0]); desc.setLocation(new Path(path[0])); IProject prj = ResourcesPlugin.getWorkspace().getRoot() .getProject(desc.getName()); prj.create(desc, actMonitor); prj.open(actMonitor); ConnectProviderOperation cpo = new ConnectProviderOperation( prj, repoDir[0]); cpo.execute(new NullProgressMonitor()); ResourcesPlugin.getWorkspace().getRoot().refreshLocal( IResource.DEPTH_ONE, actMonitor); } };
@Override public void runWithinEclipse() throws CoreException { // add all projects to the workspace IWorkspace workspace = ResourcesPlugin.getWorkspace(); for (File projectFile : host.projects) { Path path = new Path(projectFile.toString()); IProjectDescription description = workspace.loadProjectDescription(path); IProject project = workspace.getRoot().getProject(description.getName()); if (project.isOpen() == false) { project.create(description, null); project.open(null); } else { project.refreshLocal(IResource.DEPTH_INFINITE, null); } } } }
/** * Create a change for each launch configuration which needs to be updated for this IJavaProject rename. * * @since 3.5 */ public static Change createChangesForProjectRename(IProject project, String newProjectName) throws CoreException { String projectName = project.getDescription().getName(); ILaunchConfiguration[] configs = getAntLaunchConfigurations(); List<Change> changes = createChangesForProjectRename(configs, projectName, newProjectName); return createChangeFromList(changes, RefactoringMessages.LaunchConfigurationBuildfileChange_7); }
public String getText(Object object) { EJBJar ejbJar = (EJBJar) object; if (ejbJar.getDisplayName() == null) { try { IProject project = ProjectUtilities.getProject(ejbJar); return project.getDescription().getName(); } catch (Exception e) { //Ignore } Resource resource = ejbJar.eResource(); if (resource != null) { return new Path(resource.getURI().toString()).removeFileExtension().lastSegment(); } return EJBProviderLibrariesResourceHandler.getString("EJBJar_UI_"); //$NON-NLS-1$ = "EJBJar" } return ejbJar.getDisplayName(); }