java.lang.Object | +--com.ibm.lab.soln.resources.nature_builder.CustomNature
Simple implementation of a nature that customizes a project by adding the
ReadmeBuilder
to the list of builders found in a project description.
Constructor Summary | |
CustomNature()
CustomNature default constructor. |
Method Summary | |
void |
addReadmeBuilderToBuildSpec(org.eclipse.core.resources.IProject project)
Adds the ReadmeBuilder to the project description for the selected project if it does not already exist. |
void |
configure()
Customizes the project by adding a builder, the ReadmeBuilder in this scenario. |
void |
deconfigure()
Removes any nature customization and private resources as may be required. |
org.eclipse.core.resources.IProject |
getProject()
Returns local reference to associated project |
protected void |
resultError(java.lang.String title,
java.lang.String msg)
Used to show action results. |
protected void |
resultInformation(java.lang.String title,
java.lang.String msg)
Used to show action results. |
void |
setProject(org.eclipse.core.resources.IProject value)
Saves local reference to associated project. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CustomNature()
Method Detail |
public void addReadmeBuilderToBuildSpec(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
project
- selected project resourcepublic void configure() throws org.eclipse.core.runtime.CoreException
configure
in interface org.eclipse.core.resources.IProjectNature
IProjectNature.configure()
public void deconfigure() throws org.eclipse.core.runtime.CoreException
The ReadmeBuilder is not removed here, but is removed automatically by the platform as the plugin.xml definition links the builder to the nature.
This works when the nature identifies the builder using a
entry.
deconfigure
in interface org.eclipse.core.resources.IProjectNature
IProjectNature.deconfigure()
public org.eclipse.core.resources.IProject getProject()
getProject
in interface org.eclipse.core.resources.IProjectNature
IProjectNature.getProject()
protected void resultError(java.lang.String title, java.lang.String msg)
MessageDialog
protected void resultInformation(java.lang.String title, java.lang.String msg)
MessageDialog
public void setProject(org.eclipse.core.resources.IProject value)
setProject
in interface org.eclipse.core.resources.IProjectNature
IProjectNature.setProject(IProject)