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-
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
Modifier and TypeMethodDescriptioncreateConfiguration
(String id, String name, ICConfigurationDescription base) creates/adds a new configuration for this project descriptioncreateConfiguration
(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 configurationsReturns the Project's active configuration.getConfigurationByName
(String name) Returns the default setting ICConfigurationDescription.org.eclipse.core.resources.IProject
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
when true specifies that the project creation is in progress.boolean
Returns whether any non-persisted changes exist in this treevoid
removeConfiguration
(String name) Remove Configuration of the given name from the project descriptionvoid
Remove the given configuration from the project descriptionvoid
sets active configuration for this project descriptionvoid
sets the project creation state to falsevoid
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 Details
-
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:
-
setActiveConfiguration
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 theCoreModel.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 idname
- configuration namebase
- 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 theCoreModel#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 pointdata
- 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 theCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, false)
call
-
getConfigurationByName
- Parameters:
name
- String name of the configuration to get- Returns:
ICConfigurationDescription
of the given name or null if not found
-
getConfigurationById
- Parameters:
id
-ICConfigurationDescription
id- Returns:
ICConfigurationDescription
of the given id or null if not found
-
removeConfiguration
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 theCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, false)
call
-
removeConfiguration
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 theCoreModel.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 interfaceICSettingsStorage
- Returns:
- true if the project description was modified, false otherwise
-
getSessionProperty
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
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:
-
setDefaultSettingConfiguration
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. ifICProjectDescriptionManager.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 aICProjectDescriptionManager.createProjectDescription(IProject, boolean, boolean)
) may contain true "isCdtProjectCreating" state- Returns:
- boolean
- See Also:
-
setCdtProjectCreated
void setCdtProjectCreated()sets the project creation state to false
-