|
||||||||||
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.Option
public class Option
Field Summary | |
---|---|
static OptionStringValue[] |
EMPTY_LV_ARRAY
|
static java.lang.String |
EMPTY_STRING
|
static java.lang.String[] |
EMPTY_STRING_ARRAY
|
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject |
---|
ID, NAME |
Constructor Summary | |
---|---|
Option(IHoldsOptions parent,
org.eclipse.cdt.core.settings.model.ICStorageElement element)
Create an Option based on the specification stored in the
project file (.cdtbuild). |
|
Option(IHoldsOptions parent,
IManagedConfigElement element)
This constructor is called to create an option defined by an extension point in a plugin manifest file, or returned by a dynamic element provider |
|
Option(IHoldsOptions parent,
IOption superClass,
java.lang.String Id,
java.lang.String name,
boolean isExtensionElement)
This constructor is called to create an Option whose attributes and children will be added by separate calls. |
|
Option(IHoldsOptions parent,
java.lang.String Id,
java.lang.String name,
Option option)
Create an Option based upon an existing option. |
Method Summary | |
---|---|
IOptionApplicability |
getApplicabilityCalculator()
|
org.eclipse.core.runtime.IConfigurationElement |
getApplicabilityCalculatorElement()
|
java.lang.String[] |
getApplicableValues()
If this option is defined as an enumeration, this function returns the list of possible values for that enum. |
java.lang.String[] |
getBasicStringListValue()
in case the option basic value type is STRING_LIST, returns the String list value, throws BuildException otherwise |
OptionStringValue[] |
getBasicStringListValueElements()
|
int |
getBasicValueType()
Returns the type of the option value, i.e. whether it is string, boolean, string list or enumenration. |
BooleanExpressionApplicabilityCalculator |
getBooleanExpressionCalculator(boolean isExtensionAdjustment)
|
boolean |
getBooleanValue()
Answers the value for a boolean option. |
int |
getBrowseType()
Returns the setting of the browseType attribute |
java.lang.String[] |
getBuiltIns()
Answers an array of strings containing the built-in values defined for a stringList, includePaths, definedSymbols, or libs option. |
IOptionCategory |
getCategory()
Returns the category for this option. |
java.lang.String |
getCommand()
Answers a String containing the actual command line
option associated with the option |
java.lang.String |
getCommandFalse()
Answers a String containing the actual command line
option associated with a Boolean option when the value is False |
java.lang.Object |
getDefaultValue()
Returns the raw default value of this option. |
java.lang.String[] |
getDefinedSymbols()
Answers the user-defined preprocessor symbols. |
java.lang.String |
getEnumCommand(java.lang.String id)
Answers the command associated with the enumeration id. |
java.lang.String |
getEnumeratedId(java.lang.String name)
|
java.lang.String |
getEnumName(java.lang.String id)
Answers the "name" associated with the enumeration id. |
java.util.List |
getExactBuiltinsList()
|
java.lang.Object |
getExactDefaultValue()
|
java.lang.Object |
getExactRawValue()
|
java.lang.Object |
getExactValue()
|
java.lang.String[] |
getIncludePaths()
Answers an array of String containing the includes paths
defined in the build model. |
java.lang.String[] |
getLibraries()
Answers an array or String s containing the libraries
that must be linked into the project. |
java.lang.String |
getManagedBuildRevision()
|
java.lang.String |
getName()
|
static int |
getOppositeType(int type)
|
IHoldsOptions |
getOptionHolder()
Returns the holder (parent) of this option. |
IBuildObject |
getParent()
Returns the parent of this option. |
java.lang.Object |
getRawValue()
|
java.lang.String[] |
getRequiredTypeIds()
|
int |
getResourceFilter()
Returns the setting of the resourceFilter attribute |
java.lang.String |
getSelectedEnum()
Answers a String containing the unique ID of the selected
enumeration in an enumerated option. |
java.lang.String[] |
getStringListValue()
Returns the current value for this option if it is a List of Strings. |
java.lang.String |
getStringValue()
Returns the current value for this option if it is a String |
IOption |
getSuperClass()
Returns the IOption that is the superclass of this
option, or null if the attribute was not specified. |
java.lang.String[] |
getSupportedTypeIds()
|
java.lang.String[] |
getSupportedValueIds(java.lang.String typeId)
|
java.lang.String |
getToolTip()
Answers a String containing the tooltip
associated with the option |
java.lang.String[] |
getUserObjects()
Answers all of the user-defined object files that must be linked with the final build target. |
java.lang.Object |
getValue()
Returns the raw value of this option. |
IManagedOptionValueHandler |
getValueHandler()
Returns the value handler specified for this tool. |
org.eclipse.core.runtime.IConfigurationElement |
getValueHandlerElement()
|
java.lang.String |
getValueHandlerExtraArgument()
Returns the value handlers extra argument specified for this tool |
int |
getValueType()
Get the type for the value of the option. |
org.eclipse.core.runtime.PluginVersionIdentifier |
getVersion()
|
boolean |
hasCustomSettings()
|
boolean |
isAdjustedExtension()
|
boolean |
isDirty()
|
boolean |
isExtensionElement()
Returns true if this option was loaded from a manifest file,
and false if it was loaded from a project (.cdtbuild) file. |
boolean |
isValid()
Returns true if this option is valid and false
if the option cannot be safely used due to an error in the MBS grammar. |
boolean |
matches(IOption option)
|
boolean |
needsRebuild()
|
boolean |
overridesOnlyValue()
Returns true if this option only oveerides the value attribute
of its superclass and false if it overrides other attributes. |
boolean |
requiresType(java.lang.String typeId)
|
void |
resolveReferences()
|
void |
serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)
Persist the option to the project file. |
void |
setAdjusted(boolean adjusted)
|
void |
setBrowseType(int type)
Sets the browseType attribute. |
void |
setCategory(IOptionCategory category)
Sets the category for this option. |
void |
setCommand(java.lang.String cmd)
Sets a String containing the actual command line
option associated with the option |
void |
setCommandFalse(java.lang.String cmd)
Sets a String containing the actual command line
option associated with a Boolean option when the value is False |
void |
setDefaultValue(java.lang.Object v)
Sets the default value of this option. |
void |
setDirty(boolean isDirty)
|
void |
setRebuildState(boolean rebuild)
|
void |
setResourceFilter(int filter)
Sets the resourceFilter attribute. |
void |
setSuperClass(IOption superClass)
|
void |
setToolTip(java.lang.String tooltip)
Sets a String containing the tooltip
associated with the option |
void |
setValue(boolean value)
Sets the boolean value of the receiver to the value specified in the argument. |
void |
setValue(java.lang.Object v)
Sets the raw value of this option. |
void |
setValue(OptionStringValue[] value)
|
void |
setValue(java.lang.String value)
Sets the string value of the receiver to the value specified in the argument. |
void |
setValue(java.lang.String[] value)
Sets the value of the receiver to be an array of strings. |
void |
setValueHandlerElement(org.eclipse.core.runtime.IConfigurationElement element)
|
void |
setValueHandlerExtraArgument(java.lang.String extraArgument)
Sets the value handlers extra argument specified for this tool |
void |
setValueType(int type)
Sets the value-type of this option. |
void |
setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
|
void |
setWasOptRef(boolean was)
|
boolean |
supportsType(java.lang.String id)
|
boolean |
supportsValue(java.lang.String typeId,
java.lang.String valueId)
|
boolean |
wasOptRef()
|
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.BuildObject |
---|
getBaseId, getId, getVersionFromId, setId, setManagedBuildRevision, setName, 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 |
Field Detail |
---|
public static final java.lang.String EMPTY_STRING
public static final java.lang.String[] EMPTY_STRING_ARRAY
public static final OptionStringValue[] EMPTY_LV_ARRAY
Constructor Detail |
---|
public Option(IHoldsOptions parent, IManagedConfigElement element)
parent
- The IHoldsOptions parent of this option, or null
if
defined at the top levelelement
- The option definition from the manifest file or a dynamic element
providerpublic Option(IHoldsOptions parent, IOption superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
IHoldsOptions
- The parent of the option, if anyOption
- The superClass, if anyString
- The id for the new optionString
- The name for the new optionboolean
- Indicates whether this is an extension element or a managed project elementpublic Option(IHoldsOptions parent, org.eclipse.cdt.core.settings.model.ICStorageElement element)
Option
based on the specification stored in the
project file (.cdtbuild).
parent
- The IHoldsOptions
the option will be added to.element
- The XML element that contains the option settings.public Option(IHoldsOptions parent, java.lang.String Id, java.lang.String name, Option option)
Option
based upon an existing option.
parent
- The IHoldsOptions
the option will be added to.Id
- New ID for the option.name
- New name for the option.option
- The existing option to clone, except for the above fields.Method Detail |
---|
public void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element) throws BuildException
doc
- element
-
BuildException
public IBuildObject getParent()
IOption
getParent
in interface IOption
public IHoldsOptions getOptionHolder()
IOption
getOptionHolder
in interface IOption
public IOption getSuperClass()
IOption
IOption
that is the superclass of this
option, or null
if the attribute was not specified.
getSuperClass
in interface IOption
public java.lang.String getName()
getName
in interface IBuildObject
getName
in class BuildObject
public java.lang.String[] getApplicableValues()
IOption
null
.
getApplicableValues
in interface IOption
public boolean getBooleanValue()
IOption
getBooleanValue
in interface IOption
public int getBrowseType()
IOption
getBrowseType
in interface IOption
public int getResourceFilter()
IOption
getResourceFilter
in interface IOption
public org.eclipse.core.runtime.IConfigurationElement getApplicabilityCalculatorElement()
public IOptionApplicability getApplicabilityCalculator()
getApplicabilityCalculator
in interface IOption
public java.lang.String[] getBuiltIns()
IOption
null
.
getBuiltIns
in interface IOption
public java.util.List getExactBuiltinsList()
public IOptionCategory getCategory()
IOption
getCategory
in interface IOption
public java.lang.String getCommand()
IOption
String
containing the actual command line
option associated with the option
getCommand
in interface IOption
public java.lang.String getCommandFalse()
IOption
String
containing the actual command line
option associated with a Boolean option when the value is False
getCommandFalse
in interface IOption
public java.lang.String getToolTip()
IOption
String
containing the tooltip
associated with the option
getToolTip
in interface IOption
public java.lang.String[] getDefinedSymbols() throws BuildException
IOption
getDefinedSymbols
in interface IOption
BuildException
public java.lang.String getEnumCommand(java.lang.String id) throws BuildException
IOption
gnu.debug.level.default
for the debug level option of the Gnu compiler, and the plugin
manifest defined that as -g, then the return value would be the
String "-g"
getEnumCommand
in interface IOption
BuildException
public java.lang.String getEnumName(java.lang.String id) throws BuildException
IOption
getEnumName
in interface IOption
BuildException
public java.lang.String getEnumeratedId(java.lang.String name) throws BuildException
getEnumeratedId
in interface IOption
BuildException
public java.lang.String[] getIncludePaths() throws BuildException
IOption
String
containing the includes paths
defined in the build model.
getIncludePaths
in interface IOption
BuildException
public java.lang.String[] getLibraries() throws BuildException
IOption
String
s containing the libraries
that must be linked into the project.
getLibraries
in interface IOption
BuildException
public java.lang.String getSelectedEnum() throws BuildException
IOption
String
containing the unique ID of the selected
enumeration in an enumerated option. For an option that has not been
changed by the user, the receiver will answer with the default defined
in the plugin manifest. If the user has modified the selection, the
receiver will answer with the overridden selection.
getSelectedEnum
in interface IOption
BuildException
- if the option type is not an enumerationpublic java.lang.String[] getStringListValue() throws BuildException
IOption
getStringListValue
in interface IOption
BuildException
public java.lang.String getStringValue() throws BuildException
IOption
getStringValue
in interface IOption
BuildException
public java.lang.String[] getUserObjects() throws BuildException
IOption
getUserObjects
in interface IOption
BuildException
public int getValueType() throws BuildException
IOption
getValueType
in interface IOption
BuildException
public java.lang.Object getValue()
IOption
getValue
in interface IOption
public java.lang.Object getExactValue()
public java.lang.Object getRawValue()
public java.lang.Object getExactRawValue()
public java.lang.Object getDefaultValue()
IOption
getDefaultValue
in interface IOption
public java.lang.Object getExactDefaultValue()
public void setDefaultValue(java.lang.Object v)
IOption
setDefaultValue
in interface IOption
v
- The Object that contains the default value of the option. The type
of Object is specific to the option type.public void setCategory(IOptionCategory category)
IOption
setCategory
in interface IOption
public void setCommand(java.lang.String cmd)
IOption
String
containing the actual command line
option associated with the option
setCommand
in interface IOption
public void setCommandFalse(java.lang.String cmd)
IOption
String
containing the actual command line
option associated with a Boolean option when the value is False
setCommandFalse
in interface IOption
public void setToolTip(java.lang.String tooltip)
IOption
String
containing the tooltip
associated with the option
setToolTip
in interface IOption
public void setResourceFilter(int filter)
IOption
setResourceFilter
in interface IOption
public void setBrowseType(int type)
IOption
setBrowseType
in interface IOption
public void setValue(boolean value) throws BuildException
IOption
setValue
in interface IOption
BuildException
public void setValue(java.lang.String value) throws BuildException
IOption
setValue
in interface IOption
BuildException
public void setValue(java.lang.String[] value) throws BuildException
IOption
setValue
in interface IOption
value
- An array of strings to place in the option reference.
BuildException
public void setValue(OptionStringValue[] value) throws BuildException
BuildException
public void setValue(java.lang.Object v)
IOption
setValue
in interface IOption
v
- The Object that contains the raw value of the option. The type
of Object is specific to the option type.public void setValueType(int type)
IOption
setValueType
in interface IOption
public org.eclipse.core.runtime.IConfigurationElement getValueHandlerElement()
public void setValueHandlerElement(org.eclipse.core.runtime.IConfigurationElement element)
public IManagedOptionValueHandler getValueHandler()
IOption
getValueHandler
in interface IOption
public java.lang.String getValueHandlerExtraArgument()
IOption
getValueHandlerExtraArgument
in interface IOption
public void setValueHandlerExtraArgument(java.lang.String extraArgument)
IOption
setValueHandlerExtraArgument
in interface IOption
public boolean isExtensionElement()
IOption
true
if this option was loaded from a manifest file,
and false
if it was loaded from a project (.cdtbuild) file.
isExtensionElement
in interface IOption
public boolean overridesOnlyValue()
IOption
true
if this option only oveerides the value attribute
of its superclass and false
if it overrides other attributes.
overridesOnlyValue
in interface IOption
public boolean isDirty()
public void setDirty(boolean isDirty)
public void resolveReferences()
public java.lang.String getManagedBuildRevision()
getManagedBuildRevision
in interface IBuildObject
getManagedBuildRevision
in class BuildObject
public boolean isValid()
IOption
true
if this option is valid and false
if the option cannot be safely used due to an error in the MBS grammar.
isValid
in interface IOption
public boolean wasOptRef()
public void setWasOptRef(boolean was)
public org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
getVersion
in interface IBuildObject
getVersion
in class BuildObject
public void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
setVersion
in interface IBuildObject
setVersion
in class BuildObject
version
- The version to set.public BooleanExpressionApplicabilityCalculator getBooleanExpressionCalculator(boolean isExtensionAdjustment)
public boolean isAdjustedExtension()
public void setAdjusted(boolean adjusted)
public void setSuperClass(IOption superClass)
public boolean needsRebuild()
public void setRebuildState(boolean rebuild)
public boolean matches(IOption option)
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
public boolean supportsType(java.lang.String id)
supportsType
in interface IBuildPropertiesRestriction
public boolean supportsValue(java.lang.String typeId, java.lang.String valueId)
supportsValue
in interface IBuildPropertiesRestriction
public java.lang.String[] getBasicStringListValue() throws BuildException
IOption
getBasicStringListValue
in interface IOption
BuildException
public OptionStringValue[] getBasicStringListValueElements() throws BuildException
getBasicStringListValueElements
in interface IOption
BuildException
public int getBasicValueType() throws BuildException
IOption
getBasicValueType
in interface IOption
BuildException
public boolean hasCustomSettings()
public static int getOppositeType(int type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |