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 theCoreModel.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ICConfigurationDescriptioncreateConfiguration(java.lang.String id, java.lang.String name, ICConfigurationDescription base)creates/adds a new configuration for this project descriptionICConfigurationDescriptioncreateConfiguration(java.lang.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 configurationsICConfigurationDescriptiongetActiveConfiguration()Returns the Project's active configuration.ICConfigurationDescriptiongetConfigurationById(java.lang.String id)ICConfigurationDescriptiongetConfigurationByName(java.lang.String name)ICConfigurationDescription[]getConfigurations()ICConfigurationDescriptiongetDefaultSettingConfiguration()Returns the default setting ICConfigurationDescription.org.eclipse.core.resources.IProjectgetProject()java.lang.ObjectgetSessionProperty(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.booleanisCdtProjectCreating()when true specifies that the project creation is in progress.booleanisModified()Returns whether any non-persisted changes exist in this treevoidremoveConfiguration(java.lang.String name)Remove Configuration of the given name from the project descriptionvoidremoveConfiguration(ICConfigurationDescription cfg)Remove the given configuration from the project descriptionvoidsetActiveConfiguration(ICConfigurationDescription cfg)sets active configuration for this project descriptionvoidsetCdtProjectCreated()sets the project creation state to falsevoidsetDefaultSettingConfiguration(ICConfigurationDescription cfg)Sets the default setting ICConfigurationDescription.voidsetSessionProperty(org.eclipse.core.runtime.QualifiedName name, java.lang.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 theCoreModel.getProjectDescription(org.eclipse.core.resources.IProject, false)call
-
createConfiguration
ICConfigurationDescription createConfiguration(java.lang.String id, java.lang.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:
ICConfigurationDescriptioncreated- Throws:
org.eclipse.core.runtime.CoreExceptionWriteAccessException- 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(java.lang.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:
ICConfigurationDescriptioncreated- Throws:
org.eclipse.core.runtime.CoreExceptionWriteAccessException- 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
ICConfigurationDescription getConfigurationByName(java.lang.String name)
- Parameters:
name- String name of the configuration to get- Returns:
ICConfigurationDescriptionof the given name or null if not found
-
getConfigurationById
ICConfigurationDescription getConfigurationById(java.lang.String id)
- Parameters:
id-ICConfigurationDescriptionid- Returns:
ICConfigurationDescriptionof the given id or null if not found
-
removeConfiguration
void removeConfiguration(java.lang.String name) throws WriteAccessExceptionRemove 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
void removeConfiguration(ICConfigurationDescription cfg) throws WriteAccessException
Remove the given configuration from the project description- Parameters:
cfg-ICConfigurationDescriptionto 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:ICSettingsStorageReturns whether any non-persisted changes exist in this tree- Specified by:
isModifiedin interfaceICSettingsStorage- Returns:
- true if the project description was modified, false otherwise
-
getSessionProperty
java.lang.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, java.lang.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. 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:
ICProjectDescriptionManager.createProjectDescription(IProject, boolean, boolean),setCdtProjectCreated()
-
setCdtProjectCreated
void setCdtProjectCreated()
sets the project creation state to false
-
-