org.eclipse.mtj.core.project
Class MTJNature
java.lang.Object
org.eclipse.mtj.core.project.MTJNature
-
Direct Known Subclasses:
-
J2MENature
-
public abstract class MTJNature
- extends
Object
This abstract Nature
implementation must be the
superclass of all natures that may be created to be added to a
IMTJProject
project.
All clients interested in adding a new nature to MTJ must
extend this class.
EXPERIMENTAL. This class or interface has been added as part
of a work in progress. There is no guarantee that this API will work or that
it will remain the same. Please do not use this API without consulting with
the MTJ team.
-
Since:
- 1.0
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
MTJNature
public MTJNature()
configure
public void configure()
throws CoreException
-
-
Throws:
-
CoreException
deconfigure
public void deconfigure()
throws CoreException
-
-
Throws:
-
CoreException
getProject
public IProject getProject()
-
setProject
public void setProject(IProject project)
-
addNatureToProject
public static void addNatureToProject(IProject project,
String natureId,
IProgressMonitor monitor)
throws CoreException,
OperationCanceledException
- Adds the specified nature in the given project.
The nature will be append in the end of the list of natures associated
with the given project.
-
-
Parameters:
-
project
- the project in which we'll associate the given nature. -
natureId
- the fully qualified nature extension identifier, formed
by combining the nature extension id with the id of the
declaring plug-in. (e.g. "org.eclipse.mtj.core.l10nNature") -
monitor
- a progress monitor, or null
if progress
reporting is not desired.
-
Throws:
-
CoreException
- if this method fails. Reasons include:
- The project does not exist in the workspace.
- The project is not open.
- The location in the local file system corresponding to
the project description file is occupied by a directory.
- The workspace is out of sync with the project description
file in the local file system .
- The file modification validator disallowed the change.
-
OperationCanceledException
- if the operation is canceled.
Cancellation can occur even if no progress monitor is
provided.
removeNatureFromProject
public static void removeNatureFromProject(IProject project,
String natureId,
IProgressMonitor monitor)
throws CoreException
- Removes the specified nature from the given project.
After removal of specified nature, the order of the remaining natures
will be maintained
-
-
Parameters:
-
project
- the project from which we'll remove the association to the
given nature. -
natureId
- the fully qualified nature extension identifier, formed
by combining the nature extension id with the id of the
declaring plug-in. (e.g. "org.eclipse.mtj.core.l10nNature") -
monitor
- a progress monitor, or null
if progress
reporting is not desired.
-
Throws:
-
CoreException
- if this method fails. Reasons include:
- The project does not exist in the workspace.
- The project is not open.
- The location in the local file system corresponding to
the project description file is occupied by a directory.
- The workspace is out of sync with the project description
file in the local file system .
- The file modification validator disallowed the change.
-
OperationCanceledException
- if the operation is canceled.
Cancellation can occur even if no progress monitor is
provided.