org.eclipse.cdt.managedbuilder.core
Interface IOption

All Superinterfaces:
IBuildObject
All Known Implementing Classes:
Option, OptionReference

public interface IOption
extends IBuildObject


Field Summary
static java.lang.String ALL
           
static java.lang.String APPLICABILITY_CALCULATOR
           
static int BOOLEAN
           
static int BROWSE_DIR
           
static int BROWSE_FILE
           
static int BROWSE_NONE
           
static java.lang.String BROWSE_TYPE
           
static java.lang.String CATEGORY
           
static java.lang.String COMMAND
           
static java.lang.String COMMAND_FALSE
           
static java.lang.String DEFAULT_VALUE
           
static java.lang.String DIR
           
static java.lang.String ENUM_VALUE
           
static int ENUMERATED
           
static java.lang.String FILE
           
static int FILTER_ALL
           
static int FILTER_FILE
           
static int FILTER_PROJECT
           
static int INCLUDE_FILES
           
static int INCLUDE_PATH
           
static java.lang.String IS_DEFAULT
           
static int LIBRARIES
           
static int LIBRARY_FILES
           
static int LIBRARY_PATHS
           
static java.lang.String LIST_ITEM_BUILTIN
           
static java.lang.String LIST_ITEM_VALUE
           
static java.lang.String LIST_VALUE
           
static int MACRO_FILES
           
static java.lang.String NONE
           
static int OBJECTS
           
static int PREPROCESSOR_SYMBOLS
           
static java.lang.String PROJECT
           
static java.lang.String RESOURCE_FILTER
           
static int STRING
           
static int STRING_LIST
           
static java.lang.String TOOL_TIP
           
static java.lang.String TYPE_BOOL
           
static java.lang.String TYPE_DEFINED_SYMBOLS
           
static java.lang.String TYPE_ENUM
           
static java.lang.String TYPE_INC_FILES
           
static java.lang.String TYPE_INC_PATH
           
static java.lang.String TYPE_LIB
           
static java.lang.String TYPE_LIB_FILES
           
static java.lang.String TYPE_LIB_PATHS
           
static java.lang.String TYPE_STR_LIST
           
static java.lang.String TYPE_STRING
           
static java.lang.String TYPE_SYMBOL_FILES
           
static java.lang.String TYPE_UNDEF_DEFINED_SYMBOLS
           
static java.lang.String TYPE_UNDEF_INC_FILES
           
static java.lang.String TYPE_UNDEF_INC_PATH
           
static java.lang.String TYPE_UNDEF_LIB_FILES
           
static java.lang.String TYPE_UNDEF_LIB_PATHS
           
static java.lang.String TYPE_UNDEF_SYMBOL_FILES
           
static java.lang.String TYPE_USER_OBJS
           
static int UNDEF_INCLUDE_FILES
           
static int UNDEF_INCLUDE_PATH
           
static int UNDEF_LIBRARY_FILES
           
static int UNDEF_LIBRARY_PATHS
           
static int UNDEF_MACRO_FILES
           
static int UNDEF_PREPROCESSOR_SYMBOLS
           
static java.lang.String VALUE
           
static java.lang.String VALUE_HANDLER
           
static java.lang.String VALUE_HANDLER_EXTRA_ARGUMENT
           
static java.lang.String VALUE_TYPE
           
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
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[] 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[] getIncludePaths()
          Answers an array of String containing the includes paths defined in the build model.
 java.lang.String[] getLibraries()
          Answers an array or Strings containing the libraries that must be linked into the project.
 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.
 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.
 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.
 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()
          Deprecated.  
 void setBrowseType(int type)
          Sets the browseType attribute.
 void setCategory(IOptionCategory category)
          Sets the category for this option.
 void setCommand(java.lang.String command)
          Sets a String containing the actual command line option associated with the option
 void setCommandFalse(java.lang.String commandFalse)
          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 strings.
 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.
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getName, getVersion, setVersion
 

Field Detail

BOOLEAN

static final int BOOLEAN
See Also:
Constant Field Values

ENUMERATED

static final int ENUMERATED
See Also:
Constant Field Values

STRING

static final int STRING
See Also:
Constant Field Values

STRING_LIST

static final int STRING_LIST
See Also:
Constant Field Values

INCLUDE_PATH

static final int INCLUDE_PATH
See Also:
Constant Field Values

PREPROCESSOR_SYMBOLS

static final int PREPROCESSOR_SYMBOLS
See Also:
Constant Field Values

LIBRARIES

static final int LIBRARIES
See Also:
Constant Field Values

OBJECTS

static final int OBJECTS
See Also:
Constant Field Values

INCLUDE_FILES

static final int INCLUDE_FILES
See Also:
Constant Field Values

LIBRARY_PATHS

static final int LIBRARY_PATHS
See Also:
Constant Field Values

LIBRARY_FILES

static final int LIBRARY_FILES
See Also:
Constant Field Values

MACRO_FILES

static final int MACRO_FILES
See Also:
Constant Field Values

UNDEF_INCLUDE_PATH

static final int UNDEF_INCLUDE_PATH
See Also:
Constant Field Values

UNDEF_PREPROCESSOR_SYMBOLS

static final int UNDEF_PREPROCESSOR_SYMBOLS
See Also:
Constant Field Values

UNDEF_INCLUDE_FILES

static final int UNDEF_INCLUDE_FILES
See Also:
Constant Field Values

UNDEF_LIBRARY_PATHS

static final int UNDEF_LIBRARY_PATHS
See Also:
Constant Field Values

UNDEF_LIBRARY_FILES

static final int UNDEF_LIBRARY_FILES
See Also:
Constant Field Values

UNDEF_MACRO_FILES

static final int UNDEF_MACRO_FILES
See Also:
Constant Field Values

BROWSE_NONE

static final int BROWSE_NONE
See Also:
Constant Field Values

NONE

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

BROWSE_FILE

static final int BROWSE_FILE
See Also:
Constant Field Values

FILE

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

BROWSE_DIR

static final int BROWSE_DIR
See Also:
Constant Field Values

DIR

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

FILTER_ALL

static final int FILTER_ALL
See Also:
Constant Field Values

ALL

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

FILTER_FILE

static final int FILTER_FILE
See Also:
Constant Field Values

FILTER_PROJECT

static final int FILTER_PROJECT
See Also:
Constant Field Values

PROJECT

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

BROWSE_TYPE

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

CATEGORY

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

COMMAND

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

COMMAND_FALSE

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

TOOL_TIP

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

DEFAULT_VALUE

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

ENUM_VALUE

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

IS_DEFAULT

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

LIST_VALUE

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

RESOURCE_FILTER

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

APPLICABILITY_CALCULATOR

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

TYPE_BOOL

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

TYPE_ENUM

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

TYPE_INC_PATH

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

TYPE_LIB

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

TYPE_STRING

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

TYPE_STR_LIST

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

TYPE_USER_OBJS

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

TYPE_DEFINED_SYMBOLS

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

TYPE_LIB_PATHS

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

TYPE_LIB_FILES

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

TYPE_INC_FILES

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

TYPE_SYMBOL_FILES

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

TYPE_UNDEF_INC_PATH

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

TYPE_UNDEF_DEFINED_SYMBOLS

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

TYPE_UNDEF_LIB_PATHS

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

TYPE_UNDEF_LIB_FILES

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

TYPE_UNDEF_INC_FILES

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

TYPE_UNDEF_SYMBOL_FILES

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

VALUE

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

VALUE_TYPE

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

VALUE_HANDLER

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

VALUE_HANDLER_EXTRA_ARGUMENT

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

LIST_ITEM_VALUE

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

LIST_ITEM_BUILTIN

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

getParent

IBuildObject getParent()
Returns the parent of this option. This is an object implementing ITool or IToolChain.

Returns:
IBuildObject
Since:
3.0 - changed return type from ITool to IBuildObject. The method returns the same object as getOptionHolder(). It is included as a convenience for clients.

getOptionHolder

IHoldsOptions getOptionHolder()
Returns the holder (parent) of this option. This may be an object implenting ITool or IToolChain, which both extend IHoldsOptions

Returns:
IHoldsOptions
Since:
3.0

getSuperClass

IOption getSuperClass()
Returns the IOption that is the superclass of this option, or null if the attribute was not specified.

Returns:
IOption

getApplicableValues

java.lang.String[] getApplicableValues()
If this option is defined as an enumeration, this function returns the list of possible values for that enum. If this option is not defined as an enumeration, it returns null.

Returns:
String []

getBooleanValue

boolean getBooleanValue()
                        throws BuildException
Answers the value for a boolean option.

Returns:
boolean
Throws:
BuildException

getBrowseType

int getBrowseType()
Returns the setting of the browseType attribute

Returns:
int

setBrowseType

void setBrowseType(int type)
Sets the browseType attribute.

Parameters:
int -

getResourceFilter

int getResourceFilter()
Returns the setting of the resourceFilter attribute

Returns:
int

setResourceFilter

void setResourceFilter(int filter)
Sets the resourceFilter attribute.

Parameters:
int -

getApplicabilityCalculator

IOptionApplicability getApplicabilityCalculator()
Returns:
an instance of the class that calculates whether the option is visible, enabled, and used in command line generation

getBuiltIns

java.lang.String[] getBuiltIns()
Answers an array of strings containing the built-in values defined for a stringList, includePaths, definedSymbols, or libs option. If none have been defined, the array will be empty but never null.

Returns:
String[]

getCategory

IOptionCategory getCategory()
Returns the category for this option.

Returns:
IOptionCategory

setCategory

void setCategory(IOptionCategory category)
Sets the category for this option.

Parameters:
IOptionCategory -

getCommand

java.lang.String getCommand()
Answers a String containing the actual command line option associated with the option

Returns:
String

setCommand

void setCommand(java.lang.String command)
Sets a String containing the actual command line option associated with the option

Parameters:
String -

getCommandFalse

java.lang.String getCommandFalse()
Answers a String containing the actual command line option associated with a Boolean option when the value is False

Returns:
String

setCommandFalse

void setCommandFalse(java.lang.String commandFalse)
Sets a String containing the actual command line option associated with a Boolean option when the value is False

Parameters:
String -

getToolTip

java.lang.String getToolTip()
Answers a String containing the tooltip associated with the option

Returns:
String

setToolTip

void setToolTip(java.lang.String tooltip)
Sets a String containing the tooltip associated with the option

Parameters:
String -

getDefinedSymbols

java.lang.String[] getDefinedSymbols()
                                     throws BuildException
Answers the user-defined preprocessor symbols.

Returns:
String[]
Throws:
BuildException

getEnumCommand

java.lang.String getEnumCommand(java.lang.String id)
                                throws BuildException
Answers the command associated with the enumeration id. For example, if the enumeration id was 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"

Returns:
Throws:
BuildException

getEnumName

java.lang.String getEnumName(java.lang.String id)
                             throws BuildException
Answers the "name" associated with the enumeration id.

Returns:
Throws:
BuildException

getEnumeratedId

java.lang.String getEnumeratedId(java.lang.String name)
                                 throws BuildException
Parameters:
name -
Returns:
Throws:
BuildException

getIncludePaths

java.lang.String[] getIncludePaths()
                                   throws BuildException
Answers an array of String containing the includes paths defined in the build model.

Returns:
String[]
Throws:
BuildException

getLibraries

java.lang.String[] getLibraries()
                                throws BuildException
Answers an array or Strings containing the libraries that must be linked into the project.

Returns:
String[]
Throws:
BuildException

getSelectedEnum

java.lang.String getSelectedEnum()
                                 throws BuildException
Answers a 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.

Returns:
String
Throws:
BuildException - if the option type is not an enumeration

getStringListValue

java.lang.String[] getStringListValue()
                                      throws BuildException
Returns the current value for this option if it is a List of Strings.

Returns:
String []
Throws:
BuildException

getStringValue

java.lang.String getStringValue()
                                throws BuildException
Returns the current value for this option if it is a String

Returns:
String
Throws:
BuildException

getUserObjects

java.lang.String[] getUserObjects()
                                  throws BuildException
Answers all of the user-defined object files that must be linked with the final build target.

Returns:
Throws:
BuildException

getValue

java.lang.Object getValue()
Returns the raw value of this option.

Returns:
Object The Object that contains the raw value of the option. The type of Object is specific to the option type.

getDefaultValue

java.lang.Object getDefaultValue()
Returns the raw default value of this option.

Returns:
Object The Object that contains the raw default value of the option. The type of Object is specific to the option type.

getValueType

int getValueType()
                 throws BuildException
Get the type for the value of the option.

Returns:
int
Throws:
BuildException

setValue

void setValue(boolean value)
              throws BuildException
Sets the boolean value of the receiver to the value specified in the argument. If the receiver is not a reference to a boolean option, method will throw an exception.

Parameters:
value -
Throws:
BuildException

setValue

void setValue(java.lang.String value)
              throws BuildException
Sets the string value of the receiver to the value specified in the argument.

Parameters:
value -
Throws:
BuildException

setValue

void setValue(java.lang.String[] value)
              throws BuildException
Sets the value of the receiver to be an array of strings.

Parameters:
value - An array of strings to place in the option reference.
Throws:
BuildException

setValue

void setValue(java.lang.Object v)
Sets the raw value of this option.

Parameters:
v - The Object that contains the raw value of the option. The type of Object is specific to the option type.

setDefaultValue

void setDefaultValue(java.lang.Object v)
Sets the default value of this option.

Parameters:
v - The Object that contains the default value of the option. The type of Object is specific to the option type.

setValueType

void setValueType(int type)
Sets the value-type of this option. Use with care.

Parameters:
type -

getValueHandler

IManagedOptionValueHandler getValueHandler()
Returns the value handler specified for this tool.

Returns:
IManagedOptionValueHandler
Since:
3.0

getValueHandlerExtraArgument

java.lang.String getValueHandlerExtraArgument()
Returns the value handlers extra argument specified for this tool

Returns:
String
Since:
3.0

setValueHandlerExtraArgument

void setValueHandlerExtraArgument(java.lang.String extraArgument)
Sets the value handlers extra argument specified for this tool

Parameters:
extraArgument -
Since:
3.0

isExtensionElement

boolean isExtensionElement()
Returns true if this option was loaded from a manifest file, and false if it was loaded from a project (.cdtbuild) file.

Returns:
boolean

overridesOnlyValue

boolean overridesOnlyValue()
Deprecated. 

Returns true if this option only oveerides the value attribute of its superclass and false if it overrides other attributes.

Returns:
boolean

isValid

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.

Returns:
boolean
Since:
3.0

getBasicValueType

int getBasicValueType()
                      throws BuildException
Returns the type of the option value, i.e. whether it is string, boolean, string list or enumenration. As opposed to the getValueType() method, the returned type does not specifies the "sense" of the value, e.g. whether it represents the list of includes or not. possible return values: IOption.BOOLEAN IOption.STRING IOption.ENUMERATED IOption.STRING_LIST the STRING_LIST basic value type corresponds to the following option value types: INCLUDE_PATH, PREPROCESSOR_SYMBOLS, LIBRARIES, OBJECTS, INCLUDE_FILES, LIBRARY_PATHS, LIBRARY_FILES, MACRO_FILES

Throws:
BuildException

getBasicStringListValue

java.lang.String[] getBasicStringListValue()
                                           throws BuildException
in case the option basic value type is STRING_LIST, returns the String list value, throws BuildException otherwise

Returns:
Throws:
BuildException

getBasicStringListValueElements

OptionStringValue[] getBasicStringListValueElements()
                                                    throws BuildException
Throws:
BuildException