org.eclipse.cdt.managedbuilder.core
Interface IHoldsOptions

All Superinterfaces:
IBuildObject
All Known Subinterfaces:
ITool, IToolChain, IToolReference
All Known Implementing Classes:
HoldsOptions, TestToolchain, Tool, ToolChain, ToolReference

public interface IHoldsOptions
extends IBuildObject

Implements the functionality that is needed to hold options and option categories. The functionality has been moved from ITool to here in CDT 3.0. Backwards compatibility of interfaces has been maintained because ITool extends IHoldOptions.

Since:
3.0

Field Summary
static java.lang.String OPTION
           
static java.lang.String OPTION_CAT
           
static java.lang.String OPTION_REF
           
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Method Summary
 void addOptionCategory(IOptionCategory category)
          Adds the IOptionCategory to this Option Holder's list of Option Categories.
 IOption createOption(IOption superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
          Creates a child Option
 void createOptions(IHoldsOptions superClass)
          Creates options from the superclass and adds it to this class.
 IOptionCategory[] getChildCategories()
          Returns the option category children of this tool.
 IOption getOption(java.lang.String id)
          Deprecated. use getOptionById() instead
 IOption getOptionById(java.lang.String id)
          Get the IOption in the receiver with the specified ID.
 IOption getOptionBySuperClassId(java.lang.String id)
          Get the IOption in the receiver with the specified ID, or an option with a superclass with this id.
 IOptionCategory getOptionCategory(java.lang.String id)
          Answers the IOptionCategory that has the unique identifier specified in the argument.
 IOption[] getOptions()
          Returns the complete list of options that are available for this object.
 IOption getOptionToSet(IOption option, boolean adjustExtension)
          This method should be called in order to obtain the option whose value and attributes could be directly changed/adjusted
 boolean needsRebuild()
          specifies whether the option holder is modified and needs rebuild
 void removeOption(IOption option)
          Removes an option.
 void setRebuildState(boolean rebuild)
          sets the holder rebuild state
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getName, getVersion, setVersion
 

Field Detail

OPTION

static final java.lang.String OPTION
See Also:
Constant Field Values

OPTION_CAT

static final java.lang.String OPTION_CAT
See Also:
Constant Field Values

OPTION_REF

static final java.lang.String OPTION_REF
See Also:
Constant Field Values
Method Detail

createOption

IOption createOption(IOption superClass,
                     java.lang.String Id,
                     java.lang.String name,
                     boolean isExtensionElement)
Creates a child Option

Parameters:
Option - The superClass, if any
String - The id for the new option
String - The name for the new option
boolean - Indicates whether this is an extension element or a managed project element
Returns:
IOption

removeOption

void removeOption(IOption option)
Removes an option.

Parameters:
option -

getOption

IOption getOption(java.lang.String id)
Deprecated. use getOptionById() instead

This is a deprecated method for retrieving an IOption from the receiver based on an ID. It is preferred that you use the newer method getOptionById

Parameters:
id - unique identifier of the option to search for
Returns:
IOption
See Also:
org.eclipse.cdt.core.build.managed.IHoldsOptions#getOptionById(java.lang.String)

getOptionById

IOption getOptionById(java.lang.String id)
Get the IOption in the receiver with the specified ID. This is an efficient search in the receiver.

If the receiver does not have an option with that ID, the method returns null. It is the responsibility of the caller to verify the return value.

Parameters:
id - unique identifier of the option to search for
Returns:
IOption
Since:
2.0

getOptionBySuperClassId

IOption getOptionBySuperClassId(java.lang.String id)
Get the IOption in the receiver with the specified ID, or an option with a superclass with this id.

If the receiver does not have an option with that ID, the method returns null. It is the responsibility of the caller to verify the return value.

Parameters:
id - unique identifier of the option to search for
Returns:
IOption
Since:
3.0

getOptions

IOption[] getOptions()
Returns the complete list of options that are available for this object. The list is a merging of the options specified for this object with the options of its superclasses. The lowest option instance in the hierarchy takes precedence.

Returns:
IOption[]

getChildCategories

IOptionCategory[] getChildCategories()
Returns the option category children of this tool.

Returns:
IOptionCategory[]

addOptionCategory

void addOptionCategory(IOptionCategory category)
Adds the IOptionCategory to this Option Holder's list of Option Categories.

Parameters:
category - The option category to be added

getOptionCategory

IOptionCategory getOptionCategory(java.lang.String id)
Answers the IOptionCategory that has the unique identifier specified in the argument.

Parameters:
id - The unique identifier of the option category
Returns:
IOptionCategory with the id specified in the argument
Since:
3.0

createOptions

void createOptions(IHoldsOptions superClass)
Creates options from the superclass and adds it to this class. Each individual option in superclass, will become the superclass for the new option.

Parameters:
IHoldsOptions - The superClass
Since:
3.0

getOptionToSet

IOption getOptionToSet(IOption option,
                       boolean adjustExtension)
                       throws BuildException
This method should be called in order to obtain the option whose value and attributes could be directly changed/adjusted

Parameters:
id - -the option to be modified
adjustExtension - - if false, modifications are to be made for the non-extension element (only for some particular configuration associated with some eclipse project) This is the most common use of this method. True is allowed only while while handling the LOAD value handler event. In this case modifications are to be made for the extension element. This could be used for adjusting extension options Note: changing this option will affect all non-extension configurations using this option!
Throws:
BuildException

needsRebuild

boolean needsRebuild()
specifies whether the option holder is modified and needs rebuild

Returns:
boolean

setRebuildState

void setRebuildState(boolean rebuild)
sets the holder rebuild state

Parameters:
rebuild -