Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.project
Class MTJNature

java.lang.Object
  extended by 
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

Constructor Summary
MTJNature ()
           
 
Method Summary
static void addNatureToProject (IProject project, String natureId, IProgressMonitor monitor)
          Adds the specified nature in the given project.
 void configure ()
           
 void deconfigure ()
           
 IProject getProject ()
           
static void removeNatureFromProject (IProject project, String natureId, IProgressMonitor monitor)
          Removes the specified nature from the given project.
 void setProject (IProject project)
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTJNature

public MTJNature()
Method Detail

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.

Mobile Tools for Java
Release 1.0


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire