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 by
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 by
CConfigurationDescriptionCache
and writable one by CConfigurationDescription
.- 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
Modifier and TypeMethodDescriptioncreateExternalSetting
(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 configurationscreateFileDescription
(org.eclipse.core.runtime.IPath path, ICResourceDescription base) Creates a new file description for the specified pathcreateFolderDescription
(org.eclipse.core.runtime.IPath path, ICFolderDescription base) Creates a new folder description for the specified pathReturns the build setting for this configurationReturns the ID of the build system used with this configuration i.e.Returns the CDT variable contributor that represent information on the CDT variables (Build Macros) contributed/used with this configurationThis method should be used by the build system only for getting the build-system contributed CConfigurationDataReturns the human-readable configuration description.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[]
Returns the ids of external setting providers used for the configurationReturns the complete set of file descriptions defined for this configuration The file description is the settings holder for the specified fileReturns the complete set of folder descriptions defined for this configuration The folder description is the settings holder for the specified foldergetLanguageSettingForFile
(org.eclipse.core.runtime.IPath path, boolean ignoreExludeStatus) Deprecated.Deprecated as of CDT 8.1.Returns the project description this configuration belongs toReturns a Map of configurations referenced by this configuration.getResourceDescription
(org.eclipse.core.runtime.IPath path, boolean exactPath) Returns the resource description for the given pathReturns the complete set of file and folder descriptions (resource descriptions) defined for this configuration The resource description is the settings holder for the specified resourceReturns 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 nullgetSessionProperty
(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.Returns the source entries for this configurationReturns the target platform settings for this configurationboolean
isActive()
Returns whether or not this is an active configuration.boolean
Returns whether or not the configuration description was modifiedboolean
void
void
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
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
Removes the given resource description from the configurationvoid
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
Sets the external setting providers to be used for the configurationvoid
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
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 settingsMethods 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 Details
-
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
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:
-
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:
-
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
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:
-
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:
-
getSourceEntries
ICSourceEntry[] getSourceEntries()Returns the source entries for this configuration- See Also:
-
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
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<String,String> of referenced Project -> Configuration ID
- See Also:
-
setReferenceInfo
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 -
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:
-
removeExternalSetting
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:
-
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 configurations- Throws:
WriteAccessException
- when the configuration description is read-only seeCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, boolean)
- See Also:
-
getBuildSetting
ICBuildSetting getBuildSetting()Returns the build setting for this configuration- See Also:
-
getBuildVariablesContributor
ICdtVariablesContributor getBuildVariablesContributor()Returns the CDT variable contributor that represent information on the CDT variables (Build Macros) contributed/used with this configuration- See Also:
-
getSessionProperty
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
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
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
-
create
ICConfigExtensionReference create(String extensionPoint, String extension) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
remove
- Throws:
org.eclipse.core.runtime.CoreException
-
remove
- 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
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
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:
-
getConfigurationStatus
CConfigurationStatus getConfigurationStatus()
-