org.eclipse.cdt.managedbuilder.core
Interface IManagedProject

All Superinterfaces:
IBuildObject, IBuildObjectPropertiesContainer
All Known Implementing Classes:
ManagedProject

public interface IManagedProject
extends IBuildObject, IBuildObjectPropertiesContainer

This class represents a project instance in the managed build system. Project instances are stored in the .cdtbuild file. Note that there is no reason to define a project element in a manifest file - it would never be used.

The following steps occur when a CDT user creates a new Managed Build project: 1. A new project element is created. Its projectType attribute is set to the projectType that the user selected. Its name attribute is set to the project name that the user entered. 2. When the user adds a default configuration, a configuration element is created as a child of the project element created in step 1. 3. Add a tool-chain element that specifies as its superClass the tool-chain that is the child of the selected configuration element. 4. For each tool element child of the tool-chain that is the child of the selected configuration element, create a tool element child of the cloned configuration's tool-chain element that specifies the original tool element as its superClass. This prepares the new project/configurations for modification by the user.

Since:
2.1

Field Summary
static java.lang.String BUILD_ARTEFACT_TYPE
           
static java.lang.String BUILD_PROPERTIES
           
static java.lang.String MANAGED_PROJECT_ELEMENT_NAME
           
static java.lang.String PROJECTTYPE
           
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Method Summary
 IConfiguration createConfiguration(IConfiguration parent, java.lang.String id)
          Creates a configuration for this project populated with the tools and options settings from the parent configuration.
 IConfiguration createConfigurationClone(IConfiguration parent, java.lang.String id)
          Creates a configuration for this project populated with the tools and options settings from the parent configuration.
 IConfiguration getConfiguration(java.lang.String id)
          Returns the configuration with the given id, or null if not found.
 IConfiguration[] getConfigurations()
          Returns all of the configurations defined by this project-type.
 java.lang.String getDefaultArtifactName()
          Returns the default build artifact name for the project
 org.eclipse.core.resources.IResource getOwner()
          Returns the owner of the managed project (an IProject).
 IProjectType getProjectType()
          Answers the IProjectType that is the superclass of this project-type, or null if the attribute was not specified.
 boolean isDirty()
          Returns true if this project has changes that need to be saved in the project file, else false.
 boolean isValid()
          Returns true if this project is valid else false.
 void removeConfiguration(java.lang.String id)
          Removes the configuration with the ID specified in the argument.
 void setDirty(boolean isDirty)
          Sets the element's "dirty" (have I been modified?)
 void setValid(boolean isValid)
          Sets the element's "Valid" flag.
 void updateOwner(org.eclipse.core.resources.IResource resource)
          Sets the owner of the managed project.
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getName, getVersion, setVersion
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObjectPropertiesContainer
getBuildProperties
 

Field Detail

MANAGED_PROJECT_ELEMENT_NAME

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

PROJECTTYPE

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

BUILD_PROPERTIES

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

BUILD_ARTEFACT_TYPE

static final java.lang.String BUILD_ARTEFACT_TYPE
See Also:
Constant Field Values
Method Detail

createConfiguration

IConfiguration createConfiguration(IConfiguration parent,
                                   java.lang.String id)
Creates a configuration for this project populated with the tools and options settings from the parent configuration. As options and tools change in the parent, unoverridden values are updated in the child configuration as well.

This method performs steps 3 & 4 described above.

Parameters:
parent - The IConfiguration to use as a settings template
id - The unique id the new configuration will have
Returns:
IConfiguration of the new configuration

createConfigurationClone

IConfiguration createConfigurationClone(IConfiguration parent,
                                        java.lang.String id)
Creates a configuration for this project populated with the tools and options settings from the parent configuration. As opposed to the createConfiguration method, this method creates a configuration from an existing configuration in the project.

In this case, the new configuration is cloned from the existing configuration, and does not retain a pointer to the existing configuration.

Parameters:
parent - The IConfiguration to clone
id - The unique id the new configuration will have
Returns:
IConfiguration of the new configuration

removeConfiguration

void removeConfiguration(java.lang.String id)
Removes the configuration with the ID specified in the argument.

Parameters:
id - The unique id of the configuration

getConfigurations

IConfiguration[] getConfigurations()
Returns all of the configurations defined by this project-type.

Returns:
IConfiguration[]

getConfiguration

IConfiguration getConfiguration(java.lang.String id)
Returns the configuration with the given id, or null if not found.

Parameters:
id - The unique id of the configuration
Returns:
IConfiguration

getProjectType

IProjectType getProjectType()
Answers the IProjectType that is the superclass of this project-type, or null if the attribute was not specified.

Returns:
IProjectType

getOwner

org.eclipse.core.resources.IResource getOwner()
Returns the owner of the managed project (an IProject).

Returns:
IResource

updateOwner

void updateOwner(org.eclipse.core.resources.IResource resource)
Sets the owner of the managed project.

Parameters:
resource -

isDirty

boolean isDirty()
Returns true if this project has changes that need to be saved in the project file, else false.

Returns:
boolean

setDirty

void setDirty(boolean isDirty)
Sets the element's "dirty" (have I been modified?) flag.

Parameters:
isDirty -

isValid

boolean isValid()
Returns true if this project is valid else false.

Returns:
boolean

setValid

void setValid(boolean isValid)
Sets the element's "Valid" flag.

Parameters:
isValid -

getDefaultArtifactName

java.lang.String getDefaultArtifactName()
Returns the default build artifact name for the project

Returns:
String