org.eclipse.cdt.managedbuilder.core
Interface IProjectType

All Superinterfaces:
IBuildObject, IBuildObjectPropertiesContainer
All Known Implementing Classes:
ProjectType, TestProjectType

public interface IProjectType
extends IBuildObject, IBuildObjectPropertiesContainer

This class represents project-types in the managed build system. A project-type is a tool-integrator defined class of project which acts as a template for the projects that a user will create. The project-type contains one or more children of type configuration. These are the default configurations that the user can choose from. Note that there is no reason to define a project-type element in a .cdtbuild file. It would never be used since project-type elements are used to primarily populate the "New Project" dialog boxes. Project types can be arranged into hierarchies to promote the efficient sharing of configurations. If you have defined a project type that should not be selected by the user, but is a root for other project types, it may be declared abstract by setting the isAbstract attribute to 'true'. Abstract project types do not appear in the UI. You must provide a unique identifier for the project type in the id attribute. Children of the abstract project type will have the same configurations that the abstract project type has, unless they are explicitly named in the unusedChildren attribute of the child project. For these children to function properly, their superClass attribute must contain the unique identifier of the super class project type. A concrete project type must have at least one configuration defined for it. A project type must also define (or inherit) a set of tool-chain definitions that work together to produce the build goal as an output. You must also provide a meaningful name that will be displayed to the user in the UI and New Project wizards.

Since:
2.1

Field Summary
static java.lang.String BUILD_ARTEFACT_TYPE
           
static java.lang.String BUILD_PROPERTIES
           
static java.lang.String CONFIGURATION_NAME_PROVIDER
           
static java.lang.String CONVERT_TO_ID
           
static java.lang.String IS_ABSTRACT
           
static java.lang.String IS_TEST
           
static java.lang.String PROJECT_ENVIRONMENT_SUPPLIER
           
static java.lang.String PROJECT_MACRO_SUPPLIER
           
static java.lang.String PROJECTTYPE_ELEMENT_NAME
           
static java.lang.String SUPERCLASS
           
static java.lang.String UNUSED_CHILDREN
           
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Method Summary
 boolean checkForMigrationSupport()
          check for migration support.
 IConfiguration createConfiguration(IConfiguration parent, java.lang.String id, java.lang.String name)
          Creates a configuration for this project-type populated with the tools and options settings from the parent configuration.
 IBuildPropertyValue getBuildArtefactType()
           
 IProjectBuildMacroSupplier getBuildMacroSupplier()
          Returns the tool-integrator provided implementation of the project build macro supplier or null if none.
 IConfiguration getConfiguration(java.lang.String id)
          Returns the configuration with the given id, or null if not found.
 IConfigurationNameProvider getConfigurationNameProvider()
          Returns the configurationNameProvider.
 IConfiguration[] getConfigurations()
          Returns all of the configurations defined by this project-type.
 java.lang.String getConvertToId()
          Returns the 'convertToId' of this project type.
 IProjectEnvironmentVariableSupplier getEnvironmentVariableSupplier()
          Returns the tool-integrator provided implementation of the project environment variable supplier or null if none.
 java.lang.String getNameAttribute()
           
 IProjectType getSuperClass()
          Returns the IProjectType that is the superclass of this project-type, or null if the attribute was not specified.
 java.lang.String getUnusedChildren()
          Returns a semi-colon delimited list of child Ids of the superclass' children that should not be automatically inherited by this element.
 boolean isAbstract()
          Returns whether this element is abstract.
 boolean isSupported()
          Returns true if at least one project-type contiguration is supported on the system otherwise returns false
 boolean isSystemObject()
           
 boolean isTestProjectType()
          Returns true if the project-type is defined for testing purposes only, else false.
 void removeConfiguration(java.lang.String id)
          Removes the configuration with the ID specified in the argument.
 void setConvertToId(java.lang.String convertToId)
          Sets the 'convertToId' attribute of the project type.
 void setIsAbstract(boolean b)
          Sets the isAbstract attribute of the tool-chain.
 
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

PROJECTTYPE_ELEMENT_NAME

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

SUPERCLASS

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

IS_ABSTRACT

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

UNUSED_CHILDREN

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

IS_TEST

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

CONVERT_TO_ID

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

CONFIGURATION_NAME_PROVIDER

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

PROJECT_ENVIRONMENT_SUPPLIER

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

PROJECT_MACRO_SUPPLIER

static final java.lang.String PROJECT_MACRO_SUPPLIER
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,
                                   java.lang.String name)
Creates a configuration for this project-type 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.

NOTE: This routine affects the in-memory representation of the project-type, but since project-types are never written to the .cdtbuild file, the manifest definition does not change.

Parameters:
parent - The IConfiguration to use as a settings template
id - The unique id the new configuration will have
name - The name 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.

NOTE: This routine affects the in-memory representation of the project-type, but since project-types are never written to the .cdtbuild file, the manifest definition does not change.

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

getSuperClass

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

Returns:
IProjectType

isAbstract

boolean isAbstract()
Returns whether this element is abstract. Returns false if the attribute was not specified.

Returns:
boolean

setIsAbstract

void setIsAbstract(boolean b)
Sets the isAbstract attribute of the tool-chain.

Parameters:
b -

getUnusedChildren

java.lang.String getUnusedChildren()
Returns a semi-colon delimited list of child Ids of the superclass' children that should not be automatically inherited by this element. Returns an empty string if the attribute was not specified.

Returns:
String

isTestProjectType

boolean isTestProjectType()
Returns true if the project-type is defined for testing purposes only, else false. A test project-type will not be shown in the UI but can still be manipulated programmatically. Returns false if the attribute was not specified.

Returns:
boolean

isSupported

boolean isSupported()
Returns true if at least one project-type contiguration is supported on the system otherwise returns false

Returns:
boolean

getConfigurationNameProvider

IConfigurationNameProvider getConfigurationNameProvider()
Returns the configurationNameProvider.

Returns:
IConfigurationNameProvider

getEnvironmentVariableSupplier

IProjectEnvironmentVariableSupplier getEnvironmentVariableSupplier()
Returns the tool-integrator provided implementation of the project environment variable supplier or null if none.

Returns:
IProjectEnvironmentVariableSupplier

getBuildMacroSupplier

IProjectBuildMacroSupplier getBuildMacroSupplier()
Returns the tool-integrator provided implementation of the project build macro supplier or null if none.

Returns:
IProjectBuildMacroSupplier

getConvertToId

java.lang.String getConvertToId()
Returns the 'convertToId' of this project type.

Returns:
String

setConvertToId

void setConvertToId(java.lang.String convertToId)
Sets the 'convertToId' attribute of the project type.

Parameters:
convertToId -

checkForMigrationSupport

boolean checkForMigrationSupport()
check for migration support.

Returns:
boolean

getNameAttribute

java.lang.String getNameAttribute()

getBuildArtefactType

IBuildPropertyValue getBuildArtefactType()

isSystemObject

boolean isSystemObject()