public abstract class ProjectNature extends Object implements org.eclipse.core.resources.IProjectNature
Modifier | Constructor and Description |
---|---|
protected |
ProjectNature(String id,
String builder)
Initializes me with my unique identifier and builder ID.
|
Modifier and Type | Method and Description |
---|---|
void |
configure() |
void |
deconfigure() |
org.eclipse.core.resources.IProject |
getProject() |
boolean |
hasNature(org.eclipse.core.resources.IProject project)
Query whether a
project has my nature. |
void |
setProject(org.eclipse.core.resources.IProject project) |
static void |
toggleNature(org.eclipse.core.resources.IProject project,
String natureID)
Toggles a nature on a project.
|
public void configure() throws org.eclipse.core.runtime.CoreException
configure
in interface org.eclipse.core.resources.IProjectNature
org.eclipse.core.runtime.CoreException
public void deconfigure() throws org.eclipse.core.runtime.CoreException
deconfigure
in interface org.eclipse.core.resources.IProjectNature
org.eclipse.core.runtime.CoreException
public org.eclipse.core.resources.IProject getProject()
getProject
in interface org.eclipse.core.resources.IProjectNature
public void setProject(org.eclipse.core.resources.IProject project)
setProject
in interface org.eclipse.core.resources.IProjectNature
public boolean hasNature(org.eclipse.core.resources.IProject project)
project
has my nature.project
- a projectpublic static void toggleNature(org.eclipse.core.resources.IProject project, String natureID) throws org.eclipse.core.runtime.CoreException
project
- to have sample nature added or removednatureID
- the nature ID to toggleorg.eclipse.core.runtime.CoreException
- issue while toggling natureCopyright © 2019. All rights reserved.