private void cleanAndDisposeWorkspaceBaseline(IResource resource) { IJavaProject jp = (IJavaProject) JavaCore.create(resource); dmanager.clean(jp, true, true); bmanager.disposeWorkspaceBaseline(); } }
/** * Cleans the .api_settings file for the given project * * @param project */ void cleanupApiDescription(IProject project) { if (project != null && project.exists()) { ApiDescriptionManager.getManager().clean(JavaCore.create(project), true, false); } }
@Override public Change perform(IProgressMonitor pm) throws CoreException { SubMonitor localmonitor = SubMonitor.convert(pm); localmonitor.beginTask(IApiToolsConstants.EMPTY_STRING, 1); localmonitor.setTaskName(WizardMessages.ProjectUpdateChange_adding_nature_and_builder); IProjectDescription description = this.fProject.getDescription(); String[] prevNatures = description.getNatureIds(); String[] newNatures = new String[prevNatures.length + 1]; System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length); newNatures[prevNatures.length] = ApiPlugin.NATURE_ID; description.setNatureIds(newNatures); this.fProject.setDescription(description, localmonitor); IJavaProject javaProject = JavaCore.create(this.fProject); // make sure we get rid of the previous api description file ApiDescriptionManager.getManager().clean(javaProject, true, true); // we want a full build of the converted project next time a build is // triggered if (ResourcesPlugin.getWorkspace().isAutoBuilding()) { Util.getBuildJob(new IProject[] { this.fProject }).schedule(); } else { /* * If autobuild is off, clear the last build state to force a full * build of this project on the next build. */ BuildState.setLastBuiltState(this.fProject, null); } localmonitor.split(1); return null; } }
public Change perform(IProgressMonitor pm) throws CoreException { SubMonitor localmonitor = SubMonitor.convert(pm); localmonitor.beginTask(IApiToolsConstants.EMPTY_STRING, 1); localmonitor.setTaskName(WizardMessages.ProjectUpdateChange_adding_nature_and_builder); IProjectDescription description = this.fProject.getDescription(); String[] prevNatures = description.getNatureIds(); String[] newNatures = new String[prevNatures.length + 1]; System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length); newNatures[prevNatures.length] = ApiPlugin.NATURE_ID; description.setNatureIds(newNatures); this.fProject.setDescription(description, localmonitor); IJavaProject javaProject = JavaCore.create(this.fProject); // make sure we get rid of the previous api description file ApiDescriptionManager.getManager().clean(javaProject, true, true); // we want a full build of the converted project next time a build is triggered if (ResourcesPlugin.getWorkspace().isAutoBuilding()) { Util.getBuildJob(new IProject[] { this.fProject }).schedule(); } else { /* * If autobuild is off, clear the last build state to force a full build of * this project on the next build. */ BuildState.setLastBuiltState(this.fProject, null); } Util.updateMonitor(localmonitor, 1); return null; } }
dmanager.clean(javaProject, false, true); dmanager.flushElementCache(javaProject);