|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.managedbuilder.internal.core.BuildObject
org.eclipse.cdt.managedbuilder.internal.core.HoldsOptions
public abstract class HoldsOptions
Implements the functionality that is needed to hold options and option
categories. In CDT 3.0, the functionality has been moved from ITool and
Tool to this class.
This class is intended to be used as base class for all MBS grammar
elements that can hold Options and Option Categories. These are currently
Tool and ToolChain.
Note that the member superClass
must be shared with the
derived class. This requires to wrap this member by access functions
in the derived class or frequent casts, because the type of superClass
in HoldsOptions
must be IHoldOptions
. Further
note that the member resolved
must inherit the value of its
derived class. This achieved through the constructor.
Field Summary |
---|
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IHoldsOptions |
---|
OPTION, OPTION_CAT, OPTION_REF |
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject |
---|
ID, NAME |
Method Summary | |
---|---|
void |
addChildCategory(IOptionCategory category)
|
void |
addOption(Option option)
|
void |
addOptionCategory(IOptionCategory category)
Adds the IOptionCategory to this Option Holder's
list of Option Categories. |
void |
adjustOptions(boolean extensions)
|
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)
This is a deprecated method for retrieving an IOption from
the receiver based on an ID. |
IOption |
getOptionById(java.lang.String id)
Get the IOption in the receiver with the specified
ID. |
IOption |
getOptionBySuperClassId(java.lang.String optionId)
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 |
java.lang.String[] |
getRequiredTypeIds()
|
java.lang.String[] |
getSupportedTypeIds()
|
java.lang.String[] |
getSupportedValueIds(java.lang.String typeId)
|
abstract boolean |
isExtensionElement()
|
boolean |
needsRebuild()
specifies whether the option holder is modified and needs rebuild |
void |
propertiesChanged()
|
void |
removeOption(IOption option)
Removes an option. |
boolean |
requiresType(java.lang.String typeId)
|
void |
setRebuildState(boolean rebuild)
sets the holder rebuild state |
boolean |
supportsType(IBuildPropertyType type)
|
boolean |
supportsType(java.lang.String type)
|
boolean |
supportsValue(IBuildPropertyType type,
IBuildPropertyValue value)
|
boolean |
supportsValue(java.lang.String type,
java.lang.String value)
|
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.BuildObject |
---|
getBaseId, getId, getManagedBuildRevision, getName, 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.IBuildObject |
---|
getBaseId, getId, getManagedBuildRevision, getName, getVersion, setVersion |
Method Detail |
---|
public IOption createOption(IOption superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
IHoldsOptions
createOption
in interface IHoldsOptions
public void createOptions(IHoldsOptions superClass)
IHoldsOptions
createOptions
in interface IHoldsOptions
public void removeOption(IOption option)
IHoldsOptions
removeOption
in interface IHoldsOptions
public IOption[] getOptions()
IHoldsOptions
getOptions
in interface IHoldsOptions
public IOption getOption(java.lang.String id)
IHoldsOptions
IOption
from
the receiver based on an ID. It is preferred that you use the newer method
getOptionById
getOption
in interface IHoldsOptions
id
- unique identifier of the option to search for
IOption
org.eclipse.cdt.core.build.managed.IHoldsOptions#getOptionById(java.lang.String)
public IOption getOptionById(java.lang.String id)
IHoldsOptions
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.
getOptionById
in interface IHoldsOptions
id
- unique identifier of the option to search for
IOption
public IOption getOptionBySuperClassId(java.lang.String optionId)
IHoldsOptions
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.
getOptionBySuperClassId
in interface IHoldsOptions
optionId
- unique identifier of the option to search for
IOption
public IOptionCategory[] getChildCategories()
IHoldsOptions
getChildCategories
in interface IHoldsOptions
public void addChildCategory(IOptionCategory category)
category
- public void addOption(Option option)
option
- public void addOptionCategory(IOptionCategory category)
IHoldsOptions
IOptionCategory
to this Option Holder's
list of Option Categories.
addOptionCategory
in interface IHoldsOptions
category
- The option category to be addedpublic IOptionCategory getOptionCategory(java.lang.String id)
IHoldsOptions
IOptionCategory
that has the unique identifier
specified in the argument.
getOptionCategory
in interface IHoldsOptions
id
- The unique identifier of the option category
IOptionCategory
with the id specified in the argumentpublic IOption getOptionToSet(IOption option, boolean adjustExtension) throws BuildException
IHoldsOptions
getOptionToSet
in interface IHoldsOptions
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!
BuildException
public boolean needsRebuild()
IHoldsOptions
needsRebuild
in interface IHoldsOptions
public void setRebuildState(boolean rebuild)
IHoldsOptions
setRebuildState
in interface IHoldsOptions
public void propertiesChanged()
propertiesChanged
in interface IBuildPropertyChangeListener
public void adjustOptions(boolean extensions)
public boolean supportsType(java.lang.String type)
supportsType
in interface IBuildPropertiesRestriction
public boolean supportsType(IBuildPropertyType type)
public boolean supportsValue(java.lang.String type, java.lang.String value)
supportsValue
in interface IBuildPropertiesRestriction
public boolean supportsValue(IBuildPropertyType type, IBuildPropertyValue value)
public abstract boolean isExtensionElement()
public java.lang.String[] getRequiredTypeIds()
getRequiredTypeIds
in interface IBuildPropertiesRestriction
public java.lang.String[] getSupportedTypeIds()
getSupportedTypeIds
in interface IBuildPropertiesRestriction
public java.lang.String[] getSupportedValueIds(java.lang.String typeId)
getSupportedValueIds
in interface IBuildPropertiesRestriction
public boolean requiresType(java.lang.String typeId)
requiresType
in interface IBuildPropertiesRestriction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |