org.eclipse.cdt.managedbuilder.internal.core
Class ConfigurationV2

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.BuildObject
      extended by org.eclipse.cdt.managedbuilder.internal.core.ConfigurationV2
All Implemented Interfaces:
IBuildObject, IConfigurationV2

public class ConfigurationV2
extends BuildObject
implements IConfigurationV2

This class is deprecated in 2.1


Field Summary
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IConfigurationV2
CONFIGURATION_ELEMENT_NAME, PARENT, TOOLREF_ELEMENT_NAME
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Constructor Summary
ConfigurationV2(Target target, org.w3c.dom.Element element)
          Build a configuration from the project manifest file.
ConfigurationV2(Target target, IConfigurationV2 parentConfig, java.lang.String id)
          Create a new configuration based on one already defined.
ConfigurationV2(Target target, IManagedConfigElement element)
          Create a new ConfigurationV2 based on the specification in the plugin manifest.
ConfigurationV2(Target target, java.lang.String id)
          A fresh new configuration for a target.
 
Method Summary
 void addToolReference(ToolReference toolRef)
          Adds a tool reference to the receiver.
 IConfiguration getCreatedConfig()
          Returns the configuration that was created from this V2.0 configuration.
 ITool[] getFilteredTools(org.eclipse.core.resources.IProject project)
          Projects have C or CC natures.
 java.lang.String getName()
           
 org.eclipse.core.resources.IResource getOwner()
          Returns the resource that owns the project that owns the configuration.
 IConfigurationV2 getParent()
          Answers the configuration that this configuration is based on.
 ITarget getTarget()
          Returns the target for this configuration.
 ITool getToolById(java.lang.String id)
          Answers the ITool in the receiver with the same id as the argument, or null.
 IToolReference[] getToolReferences()
          Returns the tool references that are children of this configuration.
 ITool[] getTools()
          Returns the tools that are used in this configuration.
 boolean isDirty()
          Answers true the receiver has changes that need to be saved in the project file, else false.
 boolean needsRebuild()
          Answers whether the receiver has been changed and requires the project to be rebuilt.
 void reset(IManagedConfigElement element)
           
 void resolveReferences()
           
 void serialize(org.w3c.dom.Document doc, org.w3c.dom.Element element)
          Persist receiver to project file.
 void setCreatedConfig(IConfiguration config)
          Sets the configuration that was created from this V2.0 configuration.
 void setDirty(boolean isDirty)
          Sets the element's "dirty" (have I been modified?)
 void setOption(IOption option, boolean value)
          Sets the value of a boolean option for this configuration.
 void setOption(IOption option, java.lang.String value)
          Sets the value of a string option for this configuration.
 void setOption(IOption option, java.lang.String[] value)
          Sets the value of a list option for this configuration.
 void setRebuildState(boolean rebuild)
          Sets the rebuild state in the receiver.
 void setToolCommand(ITool tool, java.lang.String command)
          Overrides the tool command for a tool defined in the receiver.
 
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.BuildObject
getBaseId, getId, getManagedBuildRevision, getVersion, getVersionFromId, setId, setManagedBuildRevision, setName, setVersion, toString, updateManagedBuildRevision
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IConfigurationV2
setName
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getVersion, setVersion
 

Constructor Detail

ConfigurationV2

public ConfigurationV2(Target target,
                       org.w3c.dom.Element element)
Build a configuration from the project manifest file.

Parameters:
target - The Target the configuration belongs to.
element - The element from the manifest that contains the overridden configuration information.

ConfigurationV2

public ConfigurationV2(Target target,
                       IConfigurationV2 parentConfig,
                       java.lang.String id)
Create a new configuration based on one already defined.

Parameters:
target - The Target the receiver will be added to.
parentConfig - The IConfigurationV2 to copy the settings from.
id - A unique ID for the configuration.

ConfigurationV2

public ConfigurationV2(Target target,
                       IManagedConfigElement element)
Create a new ConfigurationV2 based on the specification in the plugin manifest.

Parameters:
target - The Target the receiver will be added to.
element - The element from the manifest that contains the default configuration settings.

ConfigurationV2

public ConfigurationV2(Target target,
                       java.lang.String id)
A fresh new configuration for a target.

Parameters:
target -
id -
Method Detail

resolveReferences

public void resolveReferences()

addToolReference

public void addToolReference(ToolReference toolRef)
Adds a tool reference to the receiver.

Parameters:
toolRef -

getToolReferences

public IToolReference[] getToolReferences()
Description copied from interface: IConfigurationV2
Returns the tool references that are children of this configuration.

Specified by:
getToolReferences in interface IConfigurationV2
Returns:

getFilteredTools

public ITool[] getFilteredTools(org.eclipse.core.resources.IProject project)
Description copied from interface: IConfigurationV2
Projects have C or CC natures. Tools can specify a filter so they are not misapplied to a project. This method allows the caller to retrieve a list of tools from a project that are correct for a project's nature.

Specified by:
getFilteredTools in interface IConfigurationV2
Parameters:
project - the project to filter for
Returns:
an array of ITools that have compatible filters for the specified project

getName

public java.lang.String getName()
Specified by:
getName in interface IBuildObject
Overrides:
getName in class BuildObject

getTools

public ITool[] getTools()
Description copied from interface: IConfigurationV2
Returns the tools that are used in this configuration.

Specified by:
getTools in interface IConfigurationV2
Returns:
ITool[]

isDirty

public boolean isDirty()
Description copied from interface: IConfigurationV2
Answers true the receiver has changes that need to be saved in the project file, else false.

Specified by:
isDirty in interface IConfigurationV2
Returns:
boolean

needsRebuild

public boolean needsRebuild()
Description copied from interface: IConfigurationV2
Answers whether the receiver has been changed and requires the project to be rebuilt.

Specified by:
needsRebuild in interface IConfigurationV2
Returns:
true if the receiver contains a change that needs the project to be rebuilt

getParent

public IConfigurationV2 getParent()
Description copied from interface: IConfigurationV2
Answers the configuration that this configuration is based on.

Specified by:
getParent in interface IConfigurationV2
Returns:

getToolById

public ITool getToolById(java.lang.String id)
Description copied from interface: IConfigurationV2
Answers the ITool in the receiver with the same id as the argument, or null.

Specified by:
getToolById in interface IConfigurationV2
Parameters:
id - unique identifier to search for
Returns:
ITool

getTarget

public ITarget getTarget()
Description copied from interface: IConfigurationV2
Returns the target for this configuration.

Specified by:
getTarget in interface IConfigurationV2
Returns:

getOwner

public org.eclipse.core.resources.IResource getOwner()
Description copied from interface: IConfigurationV2
Returns the resource that owns the project that owns the configuration.

Specified by:
getOwner in interface IConfigurationV2
Returns:

reset

public void reset(IManagedConfigElement element)
Parameters:
targetElement -

serialize

public void serialize(org.w3c.dom.Document doc,
                      org.w3c.dom.Element element)
Persist receiver to project file.

Parameters:
doc -
element -

setDirty

public void setDirty(boolean isDirty)
Description copied from interface: IConfigurationV2
Sets the element's "dirty" (have I been modified?) flag.

Specified by:
setDirty in interface IConfigurationV2

setOption

public void setOption(IOption option,
                      boolean value)
               throws BuildException
Description copied from interface: IConfigurationV2
Sets the value of a boolean option for this configuration.

Specified by:
setOption in interface IConfigurationV2
Parameters:
option - The option to change.
value - The value to apply to the option.
Throws:
BuildException

setOption

public void setOption(IOption option,
                      java.lang.String value)
               throws BuildException
Description copied from interface: IConfigurationV2
Sets the value of a string option for this configuration.

Specified by:
setOption in interface IConfigurationV2
Parameters:
option - The option that will be effected by change.
value - The value to apply to the option.
Throws:
BuildException

setOption

public void setOption(IOption option,
                      java.lang.String[] value)
               throws BuildException
Description copied from interface: IConfigurationV2
Sets the value of a list option for this configuration.

Specified by:
setOption in interface IConfigurationV2
Parameters:
option - The option to change.
value - The values to apply to the option.
Throws:
BuildException

setRebuildState

public void setRebuildState(boolean rebuild)
Description copied from interface: IConfigurationV2
Sets the rebuild state in the receiver.

Specified by:
setRebuildState in interface IConfigurationV2
Parameters:
rebuild - true will force a rebuild the next time the project builds
See Also:
IManagedBuildInfo.setRebuildState(boolean)

setToolCommand

public void setToolCommand(ITool tool,
                           java.lang.String command)
Description copied from interface: IConfigurationV2
Overrides the tool command for a tool defined in the receiver.

Specified by:
setToolCommand in interface IConfigurationV2
Parameters:
tool - The tool that will have its command modified
command - The command

setCreatedConfig

public void setCreatedConfig(IConfiguration config)
Description copied from interface: IConfigurationV2
Sets the configuration that was created from this V2.0 configuration.

Specified by:
setCreatedConfig in interface IConfigurationV2

getCreatedConfig

public IConfiguration getCreatedConfig()
Description copied from interface: IConfigurationV2
Returns the configuration that was created from this V2.0 configuration.

Specified by:
getCreatedConfig in interface IConfigurationV2
Returns:
IConfiguration