Interface ICConfigurationDescription
-
- All Superinterfaces:
ICSettingBase
,ICSettingContainer
,ICSettingObject
,ICSettingsStorage
- All Known Subinterfaces:
ICMultiConfigDescription
public interface ICConfigurationDescription extends ICSettingContainer, ICSettingObject, ICSettingsStorage
This is the class representing configuration and thus this is the root element for configuration-specific settings.
A typical (simplified) life-cycle of configuration description in CDT is as following:
1. A project is created or opened. A new read-only configuration description is loaded.
2. If a description needs to be changed, a client gets a copy as a writable configuration description first. Then, that instance can be edited.
3. The changed writable configuration description gets applied to the model and becomes read-only.
4. The project gets closed or removed. The configuration description gets disposed.
Typically read-only configuration description would be represented byCConfigurationDescriptionCache
and writable one byCConfigurationDescription
.- See Also:
CProjectDescriptionEvent
,CConfigurationDescriptionCache
-
-
Field Summary
-
Fields inherited from interface org.eclipse.cdt.core.settings.model.ICSettingBase
SETTING_BUILD, SETTING_CONFIGURATION, SETTING_FILE, SETTING_FOLDER, SETTING_LANGUAGE, SETTING_PROJECT, SETTING_TARGET_PLATFORM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ICConfigExtensionReference
create(String extensionPoint, String extension)
ICExternalSetting
createExternalSetting(String[] languageIDs, String[] contentTypeIds, String[] extensions, ICSettingEntry[] entries)
Creates/adds external setting to this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurationsICFileDescription
createFileDescription(org.eclipse.core.runtime.IPath path, ICResourceDescription base)
Creates a new file description for the specified pathICFolderDescription
createFolderDescription(org.eclipse.core.runtime.IPath path, ICFolderDescription base)
Creates a new folder description for the specified pathICConfigExtensionReference[]
get(String extensionPointID)
ICBuildSetting
getBuildSetting()
Returns the build setting for this configurationString
getBuildSystemId()
Returns the ID of the build system used with this configuration i.e.ICdtVariablesContributor
getBuildVariablesContributor()
Returns the CDT variable contributor that represent information on the CDT variables (Build Macros) contributed/used with this configurationCConfigurationData
getConfigurationData()
This method should be used by the build system only for getting the build-system contributed CConfigurationDataCConfigurationStatus
getConfigurationStatus()
String
getDescription()
Returns the human-readable configuration description.ICExternalSetting[]
getExternalSettings()
Returns an array of settings exported by this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurationsString[]
getExternalSettingsProviderIds()
Returns the ids of external setting providers used for the configurationICFileDescription[]
getFileDescriptions()
Returns the complete set of file descriptions defined for this configuration The file description is the settings holder for the specified fileICFolderDescription[]
getFolderDescriptions()
Returns the complete set of folder descriptions defined for this configuration The folder description is the settings holder for the specified folderICLanguageSetting
getLanguageSettingForFile(org.eclipse.core.runtime.IPath path, boolean ignoreExludeStatus)
Deprecated.Deprecated as of CDT 8.1.ICProjectDescription
getProjectDescription()
Returns the project description this configuration belongs toMap<String,String>
getReferenceInfo()
Returns a Map of configurations referenced by this configuration.ICSourceEntry[]
getResolvedSourceEntries()
ICResourceDescription
getResourceDescription(org.eclipse.core.runtime.IPath path, boolean exactPath)
Returns the resource description for the given pathICResourceDescription[]
getResourceDescriptions()
Returns the complete set of file and folder descriptions (resource descriptions) defined for this configuration The resource description is the settings holder for the specified resourceICFolderDescription
getRootFolderDescription()
Returns the "root" folder description The root folder description is the default one used for the project root folder The root folder description can not be nullObject
getSessionProperty(org.eclipse.core.runtime.QualifiedName name)
The get/setSettionsProperty methods allow to associate the session properties mechanism on the configuration level session properties are not persisted and are not restored on the next eclipse session the scope of configuration session properties is the current configuration description, i.e.ICSourceEntry[]
getSourceEntries()
Returns the source entries for this configurationICTargetPlatformSetting
getTargetPlatformSetting()
Returns the target platform settings for this configurationboolean
isActive()
Returns whether or not this is an active configuration.boolean
isModified()
Returns whether or not the configuration description was modifiedboolean
isPreferenceConfiguration()
void
remove(String extensionPoint)
void
remove(ICConfigExtensionReference ext)
void
removeExternalSetting(ICExternalSetting setting)
Removes external setting from this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurationsvoid
removeExternalSettings()
Removes all external settings from this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurationsvoid
removeResourceDescription(ICResourceDescription des)
Removes the given resource description from the configurationvoid
setActive()
Sets this configuration as active this call is equivalent toICProjectDescription.setActiveConfiguration(ICConfigurationDescription)
Active configuration is the one that is built by default.void
setConfigurationData(String buildSystemId, CConfigurationData data)
This method should be used by the build system only for updating the build-system contributed CConfigurationDatavoid
setDescription(String des)
Sets the configuration descriptionvoid
setExternalSettingsProviderIds(String[] ids)
Sets the external setting providers to be used for the configurationvoid
setName(String name)
Sets the name for this configurationvoid
setReferenceInfo(Map<String,String> refs)
Sets the reference information for this configuration.void
setSessionProperty(org.eclipse.core.runtime.QualifiedName name, Object value)
The get/setSettionsProperty methods allow to associate the session properties mechanism on the configuration level session properties are not persisted and are not restored on the next eclipse session the scope of configuration session properties is the current configuration description, i.e.void
setSourceEntries(ICSourceEntry[] entries)
Sets the source entries for this configurationvoid
updateExternalSettingsProviders(String[] ids)
Tells the configuration to update the given providers In case the specified ids contain provider ids not associated with the configuration, those ids will be ignored and will NOT be added to the configuration settings-
Methods inherited from interface org.eclipse.cdt.core.settings.model.ICSettingContainer
getChildSettings
-
Methods inherited from interface org.eclipse.cdt.core.settings.model.ICSettingObject
getConfiguration, getId, getName, getParent, getType, isReadOnly, isValid
-
Methods inherited from interface org.eclipse.cdt.core.settings.model.ICSettingsStorage
getStorage, importStorage, isReadOnly, removeStorage, setReadOnly
-
-
-
-
Method Detail
-
isActive
boolean isActive()
Returns whether or not this is an active configuration. Active configuration is the one that is built by default. This configuration is returned by theICProjectDescription.getActiveConfiguration()
call- Returns:
- boolean
-
getDescription
String getDescription()
Returns the human-readable configuration description.
-
setDescription
void setDescription(String des) throws WriteAccessException
Sets the configuration description- Parameters:
des
-- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
getProjectDescription
ICProjectDescription getProjectDescription()
Returns the project description this configuration belongs to
-
getRootFolderDescription
ICFolderDescription getRootFolderDescription()
Returns the "root" folder description The root folder description is the default one used for the project root folder The root folder description can not be null
-
getFolderDescriptions
ICFolderDescription[] getFolderDescriptions()
Returns the complete set of folder descriptions defined for this configuration The folder description is the settings holder for the specified folder- See Also:
ICFolderDescription
-
getFileDescriptions
ICFileDescription[] getFileDescriptions()
Returns the complete set of file descriptions defined for this configuration The file description is the settings holder for the specified file- See Also:
ICFileDescription
-
getResourceDescriptions
ICResourceDescription[] getResourceDescriptions()
Returns the complete set of file and folder descriptions (resource descriptions) defined for this configuration The resource description is the settings holder for the specified resource
-
getResourceDescription
ICResourceDescription getResourceDescription(org.eclipse.core.runtime.IPath path, boolean exactPath)
Returns the resource description for the given path- Parameters:
path
- - project-relative workspace resource pathexactPath
- - when true the resource description of the given path is searched and if not found null is returned, if false, the resource description applicable for the given path is returned, i.e. if the configuration contains resource descriptions of the following paths "" and "a/" getResourceDescription(new Path("a/b"), true) returns null getResourceDescription(new Path("a/b"), false) returns the "a" folder description- Returns:
ICResourceDescription
that is either aICFolderDescription
or anICFileDescription
-
removeResourceDescription
void removeResourceDescription(ICResourceDescription des) throws org.eclipse.core.runtime.CoreException, WriteAccessException
Removes the given resource description from the configuration- Parameters:
des
-- Throws:
org.eclipse.core.runtime.CoreException
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
createFileDescription
ICFileDescription createFileDescription(org.eclipse.core.runtime.IPath path, ICResourceDescription base) throws org.eclipse.core.runtime.CoreException, WriteAccessException
Creates a new file description for the specified path- Parameters:
path
- project-relative file workspace pathbase
- resource description from which settings will be coppied/inheritted- Throws:
org.eclipse.core.runtime.CoreException
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
createFolderDescription
ICFolderDescription createFolderDescription(org.eclipse.core.runtime.IPath path, ICFolderDescription base) throws org.eclipse.core.runtime.CoreException, WriteAccessException
Creates a new folder description for the specified path- Parameters:
path
- project-relative folder workspace pathbase
- resource description from which settings will be coppied/inheritted- Throws:
org.eclipse.core.runtime.CoreException
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
getBuildSystemId
String getBuildSystemId()
Returns the ID of the build system used with this configuration i.e. the id of extension contributing to the org.eclipse.cdt.core.CConfigurationDataProvider extension point used with this configuration- Returns:
- String
-
getConfigurationData
CConfigurationData getConfigurationData()
This method should be used by the build system only for getting the build-system contributed CConfigurationData
-
setActive
void setActive() throws WriteAccessException
Sets this configuration as active this call is equivalent toICProjectDescription.setActiveConfiguration(ICConfigurationDescription)
Active configuration is the one that is built by default. This configuration is returned by theICProjectDescription.getActiveConfiguration()
call- Throws:
WriteAccessException
- when the configuration description is read-only, seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
setConfigurationData
void setConfigurationData(String buildSystemId, CConfigurationData data) throws WriteAccessException
This method should be used by the build system only for updating the build-system contributed CConfigurationData- Throws:
WriteAccessException
- when the configuration description is read-only, seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
- See Also:
and the extension point org.eclipse.cdt.core.CConfigurationDataProvider
-
isModified
boolean isModified()
Returns whether or not the configuration description was modified- Specified by:
isModified
in interfaceICSettingsStorage
- Returns:
- boolean indicating whether any elements in this tree have been modified
-
getTargetPlatformSetting
ICTargetPlatformSetting getTargetPlatformSetting()
Returns the target platform settings for this configuration- See Also:
ICTargetPlatformSetting
-
getSourceEntries
ICSourceEntry[] getSourceEntries()
Returns the source entries for this configuration- See Also:
ICSourceEntry
-
getResolvedSourceEntries
ICSourceEntry[] getResolvedSourceEntries()
-
setSourceEntries
void setSourceEntries(ICSourceEntry[] entries) throws org.eclipse.core.runtime.CoreException, WriteAccessException
Sets the source entries for this configuration- Parameters:
entries
-- Throws:
WriteAccessException
- when the configuration description is read-only, seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
org.eclipse.core.runtime.CoreException
-
getReferenceInfo
Map<String,String> getReferenceInfo()
Returns a Map of configurations referenced by this configuration. Settings exported by a project configuration are automatically picked up by any referencing configurations.This Map is keyed by project name with value equal to the referenced configuration's ID, or the empty string. The empty string is a special configuration value which indicates the reference tracks the Active configuration in the referenced Project.
If the current configuration does not reference any other configurations, an empty map is returned.
- Returns:
- Map
of referenced Project -> Configuration ID - See Also:
setReferenceInfo(Map)
,getExternalSettings()
,createExternalSetting(String[], String[], String[], ICSettingEntry[])
-
setReferenceInfo
void setReferenceInfo(Map<String,String> refs) throws WriteAccessException
Sets the reference information for this configuration. This configuration will pick up settings exported by referenced configurations.This reference information is a map from project name to configuration ID within the referenced project. The empty string is a special configuration value which indicates the reference tracks the Active configuration in the referenced Project.
- Parameters:
refs
- Map of project name -> configuration ID of referenced configurations- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
getExternalSettings
ICExternalSetting[] getExternalSettings()
Returns an array of settings exported by this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurations- See Also:
ICExternalSetting
,getReferenceInfo()
,setReferenceInfo(Map)
-
createExternalSetting
ICExternalSetting createExternalSetting(String[] languageIDs, String[] contentTypeIds, String[] extensions, ICSettingEntry[] entries) throws WriteAccessException
Creates/adds external setting to this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurations- Parameters:
languageIDs
-contentTypeIds
-extensions
-entries
-- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
- See Also:
ICExternalSetting
,getReferenceInfo()
,setReferenceInfo(Map)
,getExternalSettings()
-
removeExternalSetting
void removeExternalSetting(ICExternalSetting setting) throws WriteAccessException
Removes external setting from this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurations- Parameters:
setting
-- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
- See Also:
ICExternalSetting
,getReferenceInfo()
,setReferenceInfo(Map)
,getExternalSettings()
-
removeExternalSettings
void removeExternalSettings() throws WriteAccessException
Removes all external settings from this configuration in case some configurations refer (depend on) this configuration exported settings of this configuration get applied to those configurations- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
- See Also:
ICExternalSetting
,getReferenceInfo()
,setReferenceInfo(Map)
,getExternalSettings()
-
getBuildSetting
ICBuildSetting getBuildSetting()
Returns the build setting for this configuration- See Also:
ICBuildSetting
-
getBuildVariablesContributor
ICdtVariablesContributor getBuildVariablesContributor()
Returns the CDT variable contributor that represent information on the CDT variables (Build Macros) contributed/used with this configuration- See Also:
ICdtVariablesContributor
-
getSessionProperty
Object getSessionProperty(org.eclipse.core.runtime.QualifiedName name)
The get/setSettionsProperty methods allow to associate the session properties mechanism on the configuration level session properties are not persisted and are not restored on the next eclipse session the scope of configuration session properties is the current configuration description, i.e. modifications to the properties are not applied until the setProjectDescription call
-
setSessionProperty
void setSessionProperty(org.eclipse.core.runtime.QualifiedName name, Object value)
The get/setSettionsProperty methods allow to associate the session properties mechanism on the configuration level session properties are not persisted and are not restored on the next eclipse session the scope of configuration session properties is the current configuration description, i.e. modifications to the properties are not applied until the setProjectDescription call- Parameters:
name
-value
-
-
setName
void setName(String name) throws WriteAccessException
Sets the name for this configuration- Parameters:
name
-- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
-
get
ICConfigExtensionReference[] get(String extensionPointID)
-
create
ICConfigExtensionReference create(String extensionPoint, String extension) throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
-
remove
void remove(ICConfigExtensionReference ext) throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
-
remove
void remove(String extensionPoint) throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
-
isPreferenceConfiguration
boolean isPreferenceConfiguration()
-
getLanguageSettingForFile
@Deprecated ICLanguageSetting getLanguageSettingForFile(org.eclipse.core.runtime.IPath path, boolean ignoreExludeStatus)
Deprecated.Deprecated as of CDT 8.1. This method returns settings supplied by MBS only.- Restriction:
- This method is not intended to be referenced by clients.
-
setExternalSettingsProviderIds
void setExternalSettingsProviderIds(String[] ids)
Sets the external setting providers to be used for the configuration- Parameters:
ids
- the ids of externalSettinsProvider extensions
-
getExternalSettingsProviderIds
String[] getExternalSettingsProviderIds()
Returns the ids of external setting providers used for the configuration- Returns:
- the ids of externalSettinsProvider extensions
-
updateExternalSettingsProviders
void updateExternalSettingsProviders(String[] ids) throws WriteAccessException
Tells the configuration to update the given providers In case the specified ids contain provider ids not associated with the configuration, those ids will be ignored and will NOT be added to the configuration settings- Parameters:
ids
- the ids of externalSettinsProvider extensions- Throws:
WriteAccessException
- See Also:
ICProjectDescriptionManager.updateExternalSettingsProviders(String[], org.eclipse.core.runtime.IProgressMonitor)
-
getConfigurationStatus
CConfigurationStatus getConfigurationStatus()
-
-