org.eclipse.cdt.managedbuilder.internal.core
Class ProjectType

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.BuildObject
      extended by org.eclipse.cdt.managedbuilder.internal.core.ProjectType
All Implemented Interfaces:
IBuildObject, IBuildObjectPropertiesContainer, IBuildPropertiesRestriction, IProjectType, IBuildPropertyChangeListener

public class ProjectType
extends BuildObject
implements IProjectType, IBuildPropertiesRestriction, IBuildPropertyChangeListener


Field Summary
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IProjectType
BUILD_ARTEFACT_TYPE, BUILD_PROPERTIES, CONFIGURATION_NAME_PROVIDER, CONVERT_TO_ID, IS_ABSTRACT, IS_TEST, PROJECT_ENVIRONMENT_SUPPLIER, PROJECT_MACRO_SUPPLIER, PROJECTTYPE_ELEMENT_NAME, SUPERCLASS, UNUSED_CHILDREN
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Constructor Summary
ProjectType(IManagedConfigElement element, java.lang.String managedBuildRevision)
          This constructor is called to create a projectType defined by an extension point in a plugin manifest file.
ProjectType(ProjectType superClass, java.lang.String Id, java.lang.String name, java.lang.String managedBuildRevision)
          This constructor is called to create a project type whose attributes and children will be added by separate calls.
 
Method Summary
 void addConfiguration(Configuration configuration)
           
 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.
 org.eclipse.core.runtime.IConfigurationElement getBuildMacroSupplierElement()
          Returns the plugin.xml element of the projectMacroSupplier extension or null if none.
 IBuildObjectProperties getBuildProperties()
           
 IConfiguration getConfiguration(java.lang.String id)
          Returns the configuration with the given id, or null if not found.
 IConfigurationNameProvider getConfigurationNameProvider()
          Returns the configurationNameProvider.
 org.eclipse.core.runtime.IConfigurationElement getConfigurationNameProviderElement()
           
 IConfiguration[] getConfigurations()
          Returns all of the configurations defined by this project-type.
 java.lang.String getConvertToId()
          Returns the 'convertToId' of this project type.
 org.eclipse.core.runtime.IConfigurationElement getCurrentMbsVersionConversionElement()
           
 IProjectEnvironmentVariableSupplier getEnvironmentVariableSupplier()
          Returns the tool-integrator provided implementation of the project environment variable supplier or null if none.
 org.eclipse.core.runtime.IConfigurationElement getEnvironmentVariableSupplierElement()
          Returns the plugin.xml element of the projectEnvironmentSupplier extension or null if none.
 java.lang.String getName()
           
 java.lang.String getNameAttribute()
           
 org.eclipse.core.runtime.IConfigurationElement getPreviousMbsVersionConversionElement()
           
 java.lang.String[] getRequiredTypeIds()
           
 IProjectType getSuperClass()
          Returns the IProjectType that is the superclass of this project-type, or null if the attribute was not specified.
 java.lang.String[] getSupportedTypeIds()
           
 java.lang.String[] getSupportedValueIds(java.lang.String typeId)
           
 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 propertiesChanged()
           
 void removeConfiguration(java.lang.String id)
          Removes the configuration with the ID specified in the argument.
 boolean requiresType(java.lang.String typeId)
           
 void resolveReferences()
           
 void setConfigurationNameProviderElement(org.eclipse.core.runtime.IConfigurationElement configurationElement)
           
 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.
 void setIsTest(boolean b)
           
 boolean supportsType(IBuildPropertyType type)
           
 boolean supportsType(java.lang.String typeId)
           
 boolean supportsValue(IBuildPropertyType type, IBuildPropertyValue value)
           
 boolean supportsValue(java.lang.String typeId, java.lang.String valueId)
           
 
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.BuildObject
getBaseId, getId, getManagedBuildRevision, getVersion, getVersionFromId, setId, setManagedBuildRevision, setName, setVersion, toString, updateManagedBuildRevision
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getVersion, setVersion
 

Constructor Detail

ProjectType

public ProjectType(IManagedConfigElement element,
                   java.lang.String managedBuildRevision)
This constructor is called to create a projectType defined by an extension point in a plugin manifest file.

Parameters:
element -
managedBuildRevision -

ProjectType

public ProjectType(ProjectType superClass,
                   java.lang.String Id,
                   java.lang.String name,
                   java.lang.String managedBuildRevision)
This constructor is called to create a project type whose attributes and children will be added by separate calls.

Parameters:
ProjectType - The superClass, if any
String - The id for the new project type
String - The name for the new project type
Method Detail

createConfiguration

public IConfiguration createConfiguration(IConfiguration parent,
                                          java.lang.String id,
                                          java.lang.String name)
Description copied from interface: IProjectType
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.

Specified by:
createConfiguration in interface IProjectType
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

getConfiguration

public IConfiguration getConfiguration(java.lang.String id)
Description copied from interface: IProjectType
Returns the configuration with the given id, or null if not found.

Specified by:
getConfiguration in interface IProjectType
Parameters:
id - The unique id of the configuration
Returns:
IConfiguration

getConfigurations

public IConfiguration[] getConfigurations()
Description copied from interface: IProjectType
Returns all of the configurations defined by this project-type.

Specified by:
getConfigurations in interface IProjectType
Returns:
IConfiguration[]

removeConfiguration

public void removeConfiguration(java.lang.String id)
Description copied from interface: IProjectType
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.

Specified by:
removeConfiguration in interface IProjectType
Parameters:
id - The unique id of the configuration

addConfiguration

public void addConfiguration(Configuration configuration)

getName

public java.lang.String getName()
Specified by:
getName in interface IBuildObject
Overrides:
getName in class BuildObject

getNameAttribute

public java.lang.String getNameAttribute()
Specified by:
getNameAttribute in interface IProjectType

getSuperClass

public IProjectType getSuperClass()
Description copied from interface: IProjectType
Returns the IProjectType that is the superclass of this project-type, or null if the attribute was not specified.

Specified by:
getSuperClass in interface IProjectType
Returns:
IProjectType

isAbstract

public boolean isAbstract()
Description copied from interface: IProjectType
Returns whether this element is abstract. Returns false if the attribute was not specified.

Specified by:
isAbstract in interface IProjectType
Returns:
boolean

getUnusedChildren

public java.lang.String getUnusedChildren()
Description copied from interface: IProjectType
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.

Specified by:
getUnusedChildren in interface IProjectType
Returns:
String

isTestProjectType

public boolean isTestProjectType()
Description copied from interface: IProjectType
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.

Specified by:
isTestProjectType in interface IProjectType
Returns:
boolean

setIsAbstract

public void setIsAbstract(boolean b)
Description copied from interface: IProjectType
Sets the isAbstract attribute of the tool-chain.

Specified by:
setIsAbstract in interface IProjectType

setIsTest

public void setIsTest(boolean b)

resolveReferences

public void resolveReferences()

isSupported

public boolean isSupported()
Description copied from interface: IProjectType
Returns true if at least one project-type contiguration is supported on the system otherwise returns false

Specified by:
isSupported in interface IProjectType
Returns:
boolean

getConfigurationNameProviderElement

public org.eclipse.core.runtime.IConfigurationElement getConfigurationNameProviderElement()

setConfigurationNameProviderElement

public void setConfigurationNameProviderElement(org.eclipse.core.runtime.IConfigurationElement configurationElement)

getConfigurationNameProvider

public IConfigurationNameProvider getConfigurationNameProvider()
Description copied from interface: IProjectType
Returns the configurationNameProvider.

Specified by:
getConfigurationNameProvider in interface IProjectType
Returns:
IConfigurationNameProvider

getEnvironmentVariableSupplierElement

public org.eclipse.core.runtime.IConfigurationElement getEnvironmentVariableSupplierElement()
Returns the plugin.xml element of the projectEnvironmentSupplier extension or null if none.

Returns:
IConfigurationElement

getEnvironmentVariableSupplier

public IProjectEnvironmentVariableSupplier getEnvironmentVariableSupplier()
Description copied from interface: IProjectType
Returns the tool-integrator provided implementation of the project environment variable supplier or null if none.

Specified by:
getEnvironmentVariableSupplier in interface IProjectType
Returns:
IProjectEnvironmentVariableSupplier

getBuildMacroSupplierElement

public org.eclipse.core.runtime.IConfigurationElement getBuildMacroSupplierElement()
Returns the plugin.xml element of the projectMacroSupplier extension or null if none.

Returns:
IConfigurationElement

getBuildMacroSupplier

public IProjectBuildMacroSupplier getBuildMacroSupplier()
Description copied from interface: IProjectType
Returns the tool-integrator provided implementation of the project build macro supplier or null if none.

Specified by:
getBuildMacroSupplier in interface IProjectType
Returns:
IProjectBuildMacroSupplier

getConvertToId

public java.lang.String getConvertToId()
Description copied from interface: IProjectType
Returns the 'convertToId' of this project type.

Specified by:
getConvertToId in interface IProjectType
Returns:
String

setConvertToId

public void setConvertToId(java.lang.String convertToId)
Description copied from interface: IProjectType
Sets the 'convertToId' attribute of the project type.

Specified by:
setConvertToId in interface IProjectType

checkForMigrationSupport

public boolean checkForMigrationSupport()
Description copied from interface: IProjectType
check for migration support.

Specified by:
checkForMigrationSupport in interface IProjectType
Returns:
boolean

getPreviousMbsVersionConversionElement

public org.eclipse.core.runtime.IConfigurationElement getPreviousMbsVersionConversionElement()

getCurrentMbsVersionConversionElement

public org.eclipse.core.runtime.IConfigurationElement getCurrentMbsVersionConversionElement()

getBuildProperties

public IBuildObjectProperties getBuildProperties()
Specified by:
getBuildProperties in interface IBuildObjectPropertiesContainer

propertiesChanged

public void propertiesChanged()
Specified by:
propertiesChanged in interface IBuildPropertyChangeListener

supportsType

public boolean supportsType(IBuildPropertyType type)

supportsValue

public boolean supportsValue(IBuildPropertyType type,
                             IBuildPropertyValue value)

supportsType

public boolean supportsType(java.lang.String typeId)
Specified by:
supportsType in interface IBuildPropertiesRestriction

supportsValue

public boolean supportsValue(java.lang.String typeId,
                             java.lang.String valueId)
Specified by:
supportsValue in interface IBuildPropertiesRestriction

getRequiredTypeIds

public java.lang.String[] getRequiredTypeIds()
Specified by:
getRequiredTypeIds in interface IBuildPropertiesRestriction

getSupportedTypeIds

public java.lang.String[] getSupportedTypeIds()
Specified by:
getSupportedTypeIds in interface IBuildPropertiesRestriction

getSupportedValueIds

public java.lang.String[] getSupportedValueIds(java.lang.String typeId)
Specified by:
getSupportedValueIds in interface IBuildPropertiesRestriction

requiresType

public boolean requiresType(java.lang.String typeId)
Specified by:
requiresType in interface IBuildPropertiesRestriction

getBuildArtefactType

public IBuildPropertyValue getBuildArtefactType()
Specified by:
getBuildArtefactType in interface IProjectType

isSystemObject

public boolean isSystemObject()
Specified by:
isSystemObject in interface IProjectType