Package org.eclipse.cdt.core.settings.model

## Interface ICProjectDescription

All Superinterfaces:
  `ICProjectDescriptionPreferences`, `ICSettingBase`, `ICSettingContainer`, `ICSettingObject`, `ICSettingsStorage`

    public interface ICProjectDescription
    extends ICSettingContainer, ICSettingObject, ICSettingsStorage, ICProjectDescriptionPreferences

The ICProjectDescription is the root element for obtaining the CDT project settings it can be obtained by the `CoreModel.getProjectDescription(IProject, boolean)` call

See Also:
  `CoreModel.getProjectDescription(IProject)`, `CoreModel.getProjectDescription(IProject, boolean)`

### Field Summary

### Fields inherited from interface org.eclipse.cdt.core.settings.model.ICProjectDescriptionPreferences

`CONFIGS_INDEPENDENT, CONFIGS_LINK_SETTINGS_AND_ACTIVE`

### 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
`ICConfigurationDescription` `createConfiguration​(String id, String name, ICConfigurationDescription base)` creates/adds a new configuration for this project description
`ICConfigurationDescription` `createConfiguration​(String buildSystemId, CConfigurationData data)` creates/adds a new configuration for this project description This method is typically used by the Build System-specific code for creating new configurations
`ICConfigurationDescription` `getActiveConfiguration()` Returns the Project's active configuration.
`ICConfigurationDescription` `getConfigurationById​(String id)`
`ICConfigurationDescription` `getConfigurationByName​(String name)`
`ICConfigurationDescription[]` `getConfigurations()`
`ICConfigurationDescription` `getDefaultSettingConfiguration()` Returns the default setting ICConfigurationDescription.
`org.eclipse.core.resources.IProject` `getProject()`
`Object` `getSessionProperty​(org.eclipse.core.runtime.QualifiedName name)` the get/setSettionsProperty methods allow to associate the session properties with the given project description session properties are not persisted and are not restored on the next eclipse session the scope of project description session properties is the current project description, i.e.
`boolean` `isCdtProjectCreating()` when true specifies that the project creation is in progress.
`boolean` `isModified()` Returns whether any non-persisted changes exist in this tree
`void` `removeConfiguration​(String name)` Remove Configuration of the given name from the project description
`void` `removeConfiguration​(ICConfigurationDescription cfg)` Remove the given configuration from the project description
`void` `setActiveConfiguration​(ICConfigurationDescription cfg)` sets active configuration for this project description
`void` `setCdtProjectCreated()` sets the project creation state to false
`void` `setDefaultSettingConfiguration​(ICConfigurationDescription cfg)` Sets the default setting ICConfigurationDescription.
`void` `setSessionProperty​(org.eclipse.core.runtime.QualifiedName name, Object value)` the get/setSettionsProperty methods allow to associate the session properties with the given project description session properties are not persisted and are not restored on the next eclipse session the scope of project description session properties is the current project description, i.e.

### Methods inherited from interface org.eclipse.cdt.core.settings.model.ICProjectDescriptionPreferences

`getConfigurationRelations, isDefaultConfigurationRelations, setConfigurationRelations, useDefaultConfigurationRelations`

### 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

#### getConfigurations

    ICConfigurationDescription[] getConfigurations()

Returns:
  `ICConfigurationDescription`[] containing all configurations in the project

#### getActiveConfiguration

    ICConfigurationDescription getActiveConfiguration()

Returns the Project's active configuration. This is the configuration which is built by default

Returns:
  active `ICConfigurationDescription` - the one which is built by default
See Also:
  `ICProjectDescriptionPreferences.setConfigurationRelations(int)`

#### setActiveConfiguration

    void setActiveConfiguration​(ICConfigurationDescription cfg)
                         throws WriteAccessException

sets active configuration for this project description

Parameters:
  `cfg` -
Throws:
  `WriteAccessException` - when the project description is read-only the description is read only if it was queried/returned by the `CoreModel.getProjectDescription(org.eclipse.core.resources.IProject, false)` call

#### createConfiguration

    ICConfigurationDescription createConfiguration​(String id,
                                                   String name,
                                                   ICConfigurationDescription base)
                                            throws org.eclipse.core.runtime.CoreException,
                                                   WriteAccessException

creates/adds a new configuration for this project description

Parameters:
  `id` - configuration id
  `name` - configuration name
  `base` - the configuration description from which the settings are to be copied
Returns:
  `ICConfigurationDescription` created
Throws:
  `org.eclipse.core.runtime.CoreException`
  `WriteAccessException` - when the project description is read-only the description is read only if it was queried/returned by the `CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)` call

#### createConfiguration

    ICConfigurationDescription createConfiguration​(String buildSystemId,
                                                   CConfigurationData data)
                                            throws org.eclipse.core.runtime.CoreException,
                                                   WriteAccessException

creates/adds a new configuration for this project description This method is typically used by the Build System-specific code for creating new configurations

Parameters:
  `buildSystemId` - build system id, i.e. the extension id contributing to the org.eclipse.cdt.core.CConfigurationDataProvider extension point
  `data` - CConfigurationData to be associated with this configuration
Returns:
  `ICConfigurationDescription` created
Throws:
  `org.eclipse.core.runtime.CoreException`
  `WriteAccessException` - when the project description is read-only the description is read only if it was queried/returned by the `CoreModel.getProjectDescription(org.eclipse.core.resources.IProject, false)` call

#### getConfigurationByName

    ICConfigurationDescription getConfigurationByName​(String name)

Parameters:
  `name` - String name of the configuration to get
Returns:
  `ICConfigurationDescription` of the given name or null if not found

#### getConfigurationById

    ICConfigurationDescription getConfigurationById​(String id)

Parameters:
  `id` - `ICConfigurationDescription` id
Returns:
  `ICConfigurationDescription` of the given id or null if not found

#### removeConfiguration

    void removeConfiguration​(String name)
                      throws WriteAccessException

Remove Configuration of the given name from the project description

Parameters:
  `name` - String name of the configuration to remove
Throws:
  `WriteAccessException` - when the project description is read-only the description is read only if it was queried/returned by the `CoreModel.getProjectDescription(org.eclipse.core.resources.IProject, false)` call

#### removeConfiguration

    void removeConfiguration​(ICConfigurationDescription cfg)
                      throws WriteAccessException

Remove the given configuration from the project description

Parameters:
  `cfg` - `ICConfigurationDescription` to remove
Throws:
  `WriteAccessException` - when the project description is read-only the description is read only if it was queried/returned by the `CoreModel.getProjectDescription(IProject, false)` call

#### getProject

    org.eclipse.core.resources.IProject getProject()

Returns:
  IProject this project description is associated with

#### isModified

    boolean isModified()

Description copied from interface: `ICSettingsStorage`
Returns whether any non-persisted changes exist in this tree

Specified by:
  `isModified` in interface `ICSettingsStorage`
Returns:
  true if the project description was modified, false otherwise

#### getSessionProperty

    Object getSessionProperty​(org.eclipse.core.runtime.QualifiedName name)

the get/setSettionsProperty methods allow to associate the session properties with the given project description session properties are not persisted and are not restored on the next eclipse session the scope of project description session properties is the current project description, i.e. modifications to the properties are not applied until the setProjectDescription call

Parameters:
  `name` -

#### setSessionProperty

    void setSessionProperty​(org.eclipse.core.runtime.QualifiedName name,
                            Object value)

the get/setSettionsProperty methods allow to associate the session properties with the given project description session properties are not persisted and are not restored on the next eclipse session the scope of project description session properties is the current project description, i.e. modifications to the properties are not applied until the setProjectDescription call

Parameters:
  `name` -
  `value` -

#### getDefaultSettingConfiguration

    ICConfigurationDescription getDefaultSettingConfiguration()

Returns the default setting ICConfigurationDescription. This is the configuration used by the CDT editor and views.

Returns:
  the default `ICConfigurationDescription`
See Also:
  `ICProjectDescriptionPreferences.setConfigurationRelations(int)`

#### setDefaultSettingConfiguration

    void setDefaultSettingConfiguration​(ICConfigurationDescription cfg)

Sets the default setting ICConfigurationDescription. This is the configuration used by the CDT editor and views.

Parameters:
  `cfg` -

#### isCdtProjectCreating

    boolean isCdtProjectCreating()

when true specifies that the project creation is in progress. Sometimes project creation might be performed via multiple steps, e.g. the New Project Wizard may create a temporary project with temporary settings and delete it on cancel, etc. Thus the project may exist as well as the project may contain the associated ICProjectDescription, but its initialization may not be completed. once the flag is set to false it can never be reset back to true. if `ICProjectDescriptionManager.setProjectDescription(IProject, ICProjectDescription)` is called for the description containing the true "isCdtProjectCreating" state, but the project already contains the project description with the false "isCdtProjectCreating" state the true state will be ignored, i.e. the resulting setting will contain false "isCdtProjectCreating" state so only the newly created descriptions (created via a `ICProjectDescriptionManager.createProjectDescription(IProject, boolean, boolean)`) may contain true "isCdtProjectCreating" state

Returns:
  boolean
See Also:
  `ICProjectDescriptionManager.createProjectDescription(IProject, boolean, boolean)`, `setCdtProjectCreated()`

#### setCdtProjectCreated

    void setCdtProjectCreated()

sets the project creation state to false

See Also:
  `isCdtProjectCreating()`, `ICProjectDescriptionManager.createProjectDescription(IProject, boolean, boolean)`