|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.managedbuilder.internal.core.OptionReference
public class OptionReference
An OptionReference
plays two roles in the managed build model.
It is used to store overridden option values in a toolchain specification at
the level of a Configuration
and it stores user option settings
between sessions.
Field Summary |
---|
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject |
---|
ID, NAME |
Constructor Summary | |
---|---|
OptionReference(ToolReference owner,
org.w3c.dom.Element element)
Created from project file. |
|
OptionReference(ToolReference owner,
IManagedConfigElement element)
This constructor will be called when the receiver is created from the settings found in an extension point. |
|
OptionReference(ToolReference owner,
IOption option)
Constructor called when the option reference is created from an existing IOption |
Method Summary | |
---|---|
IOptionApplicability |
getApplicabilityCalculator()
|
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 |
getBaseId()
|
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. |
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.lang.String |
getId()
|
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()
|
IOption |
getOption()
|
IHoldsOptions |
getOptionHolder()
Returns the holder (parent) of this option. |
IBuildObject |
getParent()
Returns the parent of this option. |
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. |
ToolReference |
getToolReference()
Answers the tool reference that contains the receiver. |
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 |
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 |
overridesOnlyValue()
Returns true if this option only oveerides the value attribute
of its superclass and false if it overrides other attributes. |
boolean |
references(IOption target)
Answers true if the receiver is a reference to the
IOption specified in the argument, esle answers false . |
void |
resolveReferences()
|
void |
serialize(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
Persist receiver to project file. |
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 |
setResourceFilter(int filter)
Sets the resourceFilter attribute. |
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(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 items. |
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)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OptionReference(ToolReference owner, IManagedConfigElement element)
owner
- element
- public OptionReference(ToolReference owner, IOption option)
IOption
owner
- option
- public OptionReference(ToolReference owner, org.w3c.dom.Element element)
owner
- element
- Method Detail |
---|
public void resolveReferences()
public void serialize(org.w3c.dom.Document doc, org.w3c.dom.Element element)
doc
- element
- public java.lang.String[] getApplicableValues()
IOption
null
.
getApplicableValues
in interface IOption
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)
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
public java.lang.String getEnumName(java.lang.String id)
IOption
getEnumName
in interface IOption
public java.lang.String getEnumeratedId(java.lang.String name)
getEnumeratedId
in interface IOption
public java.lang.String getId()
getId
in interface IBuildObject
public java.lang.String getBaseId()
getBaseId
in interface IBuildObject
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 getName()
getName
in interface IBuildObject
public boolean getBooleanValue() throws BuildException
IOption
getBooleanValue
in interface IOption
BuildException
public int getBrowseType()
IOption
getBrowseType
in interface IOption
public java.lang.String[] getBuiltIns()
IOption
null
.
getBuiltIns
in interface IOption
public IOption getOption()
IOption the reference is for
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 IBuildObject getParent()
IOption
getParent
in interface IOption
public IHoldsOptions getOptionHolder()
IOption
getOptionHolder
in interface IOption
public ToolReference getToolReference()
public java.lang.String[] getUserObjects() throws BuildException
IOption
getUserObjects
in interface IOption
BuildException
public int getValueType()
IOption
getValueType
in interface IOption
public java.lang.Object getValue()
IOption
getValue
in interface IOption
public boolean references(IOption target)
true
if the receiver is a reference to the
IOption
specified in the argument, esle answers false
.
target
-
public void setValue(boolean value) throws BuildException
setValue
in interface IOption
value
-
BuildException
public void setValue(java.lang.String value) throws BuildException
IOption
setValue
in interface IOption
value
-
BuildException
public void setValue(java.lang.String[] value) throws BuildException
setValue
in interface IOption
value
- An array of strings to place in the option reference.
BuildException
public java.lang.String toString()
toString
in class java.lang.Object
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 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 java.lang.Object getDefaultValue()
IOption
getDefaultValue
in interface IOption
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 IOption getSuperClass()
IOption
IOption
that is the superclass of this
option, or null
if the attribute was not specified.
getSuperClass
in interface IOption
public int getResourceFilter()
IOption
getResourceFilter
in interface IOption
public IOptionApplicability getApplicabilityCalculator()
getApplicabilityCalculator
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 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 org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
getVersion
in interface IBuildObject
public void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
setVersion
in interface IBuildObject
public java.lang.String getManagedBuildRevision()
getManagedBuildRevision
in interface IBuildObject
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 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 java.lang.String[] getBasicStringListValue() throws BuildException
IOption
getBasicStringListValue
in interface IOption
BuildException
public int getBasicValueType() throws BuildException
IOption
getBasicValueType
in interface IOption
BuildException
public OptionStringValue[] getBasicStringListValueElements() throws BuildException
getBasicStringListValueElements
in interface IOption
BuildException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |