org.eclipse.cdt.managedbuilder.core
Class ManagedCProjectNature

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature
All Implemented Interfaces:
org.eclipse.core.resources.IProjectNature

public class ManagedCProjectNature
extends java.lang.Object
implements org.eclipse.core.resources.IProjectNature


Field Summary
static java.lang.String BUILDER_ID
           
static java.lang.String BUILDER_NAME
           
static java.lang.String MNG_NATURE_ID
           
 
Constructor Summary
ManagedCProjectNature()
           
 
Method Summary
static void addManagedBuilder(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor)
           
static void addManagedNature(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor)
          Utility method for adding a managed nature to a project.
static void addNature(org.eclipse.core.resources.IProject project, java.lang.String natureId, org.eclipse.core.runtime.IProgressMonitor monitor)
          Utility method for adding a nature to a project.
 void configure()
           
 void deconfigure()
           
static java.lang.String getBuilderID()
          Get the correct builderID
static org.eclipse.core.resources.ICommand getBuildSpec(org.eclipse.core.resources.IProjectDescription description, java.lang.String builderID)
           
 org.eclipse.core.resources.IProject getProject()
           
static void removeManagedNature(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor mon)
          Utility method to remove the managed nature from a project.
static void removeNature(org.eclipse.core.resources.IProject project, java.lang.String natureId, org.eclipse.core.runtime.IProgressMonitor monitor)
          Utility method for removing a project nature from a project.
static org.eclipse.core.resources.IProjectDescription setBuildSpec(org.eclipse.core.resources.IProjectDescription description, org.eclipse.core.resources.ICommand newCommand)
          Update the Java command in the build spec (replace existing one if present, add one first if none).
 void setProject(org.eclipse.core.resources.IProject project)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILDER_NAME

public static final java.lang.String BUILDER_NAME
See Also:
Constant Field Values

BUILDER_ID

public static final java.lang.String BUILDER_ID

MNG_NATURE_ID

public static final java.lang.String MNG_NATURE_ID
Constructor Detail

ManagedCProjectNature

public ManagedCProjectNature()
Method Detail

addManagedNature

public static void addManagedNature(org.eclipse.core.resources.IProject project,
                                    org.eclipse.core.runtime.IProgressMonitor monitor)
                             throws org.eclipse.core.runtime.CoreException
Utility method for adding a managed nature to a project.

Parameters:
proj - the project to add the managed nature to.
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
org.eclipse.core.runtime.CoreException

addManagedBuilder

public static void addManagedBuilder(org.eclipse.core.resources.IProject project,
                                     org.eclipse.core.runtime.IProgressMonitor monitor)
                              throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

addNature

public static void addNature(org.eclipse.core.resources.IProject project,
                             java.lang.String natureId,
                             org.eclipse.core.runtime.IProgressMonitor monitor)
                      throws org.eclipse.core.runtime.CoreException
Utility method for adding a nature to a project.

Parameters:
proj - the project to add the nature to.
natureId - the id of the nature to assign to the project
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
org.eclipse.core.runtime.CoreException

setBuildSpec

public static org.eclipse.core.resources.IProjectDescription setBuildSpec(org.eclipse.core.resources.IProjectDescription description,
                                                                          org.eclipse.core.resources.ICommand newCommand)
Update the Java command in the build spec (replace existing one if present, add one first if none).


getBuildSpec

public static org.eclipse.core.resources.ICommand getBuildSpec(org.eclipse.core.resources.IProjectDescription description,
                                                               java.lang.String builderID)

getBuilderID

public static java.lang.String getBuilderID()
Get the correct builderID


configure

public void configure()
               throws org.eclipse.core.runtime.CoreException
Specified by:
configure in interface org.eclipse.core.resources.IProjectNature
Throws:
org.eclipse.core.runtime.CoreException

deconfigure

public void deconfigure()
                 throws org.eclipse.core.runtime.CoreException
Specified by:
deconfigure in interface org.eclipse.core.resources.IProjectNature
Throws:
org.eclipse.core.runtime.CoreException

getProject

public org.eclipse.core.resources.IProject getProject()
Specified by:
getProject in interface org.eclipse.core.resources.IProjectNature

removeManagedNature

public static void removeManagedNature(org.eclipse.core.resources.IProject project,
                                       org.eclipse.core.runtime.IProgressMonitor mon)
                                throws org.eclipse.core.runtime.CoreException
Utility method to remove the managed nature from a project.

Parameters:
project - to remove the managed nature from
mon - progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
org.eclipse.core.runtime.CoreException

removeNature

public static void removeNature(org.eclipse.core.resources.IProject project,
                                java.lang.String natureId,
                                org.eclipse.core.runtime.IProgressMonitor monitor)
                         throws org.eclipse.core.runtime.CoreException
Utility method for removing a project nature from a project.

Parameters:
proj - the project to remove the nature from
natureId - the nature id to remove
monitor - a progress monitor to indicate the duration of the operation, or null if progress reporting is not required.
Throws:
org.eclipse.core.runtime.CoreException

setProject

public void setProject(org.eclipse.core.resources.IProject project)
Specified by:
setProject in interface org.eclipse.core.resources.IProjectNature