use of org.eclipse.core.resources.IProjectDescription in project bndtools by bndtools.
the class BndProjectNature method deconfigure.
@Override
public void deconfigure() throws CoreException {
IProjectDescription desc = project.getDescription();
removeBuilder(desc);
updateProject(desc, false);
}
use of org.eclipse.core.resources.IProjectDescription in project bndtools by bndtools.
the class BndProjectNature method configure.
@Override
public void configure() throws CoreException {
final IProjectDescription desc = project.getDescription();
addBuilder(desc);
updateProject(desc, true);
}
use of org.eclipse.core.resources.IProjectDescription in project eclipse.platform.text by eclipse.
the class ResourceHelper method createLinkedProject.
public static IProject createLinkedProject(String projectName, Plugin plugin, IPath linkPath) throws CoreException {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject project = workspace.getRoot().getProject(projectName);
IProjectDescription desc = workspace.newProjectDescription(projectName);
File file = FileTool.getFileInPlugin(plugin, linkPath);
IPath projectLocation = new Path(file.getAbsolutePath());
if (Platform.getLocation().equals(projectLocation))
projectLocation = null;
desc.setLocation(projectLocation);
project.create(desc, NULL_MONITOR);
if (!project.isOpen())
project.open(NULL_MONITOR);
return project;
}
use of org.eclipse.core.resources.IProjectDescription in project eclipse.platform.text by eclipse.
the class ResourceHelper method createLinkedProject.
public static IProject createLinkedProject(String projectName, Plugin plugin, IPath linkPath) throws CoreException {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject project = workspace.getRoot().getProject(projectName);
IProjectDescription desc = workspace.newProjectDescription(projectName);
File file = FileTool.getFileInPlugin(plugin, linkPath);
IPath projectLocation = new Path(file.getAbsolutePath());
if (Platform.getLocation().equals(projectLocation))
projectLocation = null;
desc.setLocation(projectLocation);
project.create(desc, NULL_MONITOR);
if (!project.isOpen())
project.open(NULL_MONITOR);
return project;
}
use of org.eclipse.core.resources.IProjectDescription in project xtext-xtend by eclipse.
the class PerformanceTestProjectSetup method createJavaProject.
public static IJavaProject createJavaProject(final String projectName, String[] projectNatures) {
IProject project = null;
IJavaProject javaProject = null;
try {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
project = workspace.getRoot().getProject(projectName);
deleteProject(project);
javaProject = JavaCore.create(project);
IProjectDescription projectDescription = ResourcesPlugin.getWorkspace().newProjectDescription(projectName);
project.create(projectDescription, null);
List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
projectDescription.setNatureIds(projectNatures);
final ICommand java = projectDescription.newCommand();
java.setBuilderName(JavaCore.BUILDER_ID);
final ICommand manifest = projectDescription.newCommand();
manifest.setBuilderName("org.eclipse.pde.ManifestBuilder");
final ICommand schema = projectDescription.newCommand();
schema.setBuilderName("org.eclipse.pde.SchemaBuilder");
projectDescription.setBuildSpec(new ICommand[] { java, manifest, schema });
project.open(null);
project.setDescription(projectDescription, null);
classpathEntries.add(JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5")));
classpathEntries.add(JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins")));
javaProject.setRawClasspath(classpathEntries.toArray(new IClasspathEntry[classpathEntries.size()]), null);
makeJava5Compliant(javaProject);
javaProject.setOutputLocation(new Path("/" + projectName + "/bin"), null);
createManifest(projectName, project);
// project.build(IncrementalProjectBuilder.FULL_BUILD, null);
refreshExternalArchives(javaProject);
refresh(javaProject);
} catch (final Exception exception) {
throw new RuntimeException(exception);
}
return javaProject;
}
Aggregations