mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 16:56:04 +02:00
Bug 388484: Cosmetics
This commit is contained in:
parent
76fcfce0ab
commit
fd53d6c37c
3 changed files with 882 additions and 1172 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2011 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 2013 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -17,8 +17,8 @@ package org.eclipse.cdt.managedbuilder.core;
|
|||
import org.eclipse.cdt.managedbuilder.macros.IOptionContextData;
|
||||
|
||||
/**
|
||||
* Basic Tool / Toolchain Option type.
|
||||
*
|
||||
* Basic Tool / Tool-chain Option type.
|
||||
*
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ public interface IOption extends IBuildObject {
|
|||
/**
|
||||
* String list of library names to link against searched for
|
||||
* via LIBRARY_PATHS by the linker. In the GNU
|
||||
* toolchain these correspond to -l{lib_name}. <br/>
|
||||
* tool-chain these correspond to -l{lib_name}. <br/>
|
||||
* This option type is persisted / referenced by the name
|
||||
* {@link IOption#TYPE_LIB}
|
||||
*/
|
||||
|
@ -42,7 +42,7 @@ public interface IOption extends IBuildObject {
|
|||
public static final int INCLUDE_FILES = 8;
|
||||
/**
|
||||
* String list of library search paths <br/>
|
||||
* This option type is persisted / referenced by the name
|
||||
* This option type is persisted / referenced by the name
|
||||
* {@link IOption#TYPE_LIB_PATHS}
|
||||
*/
|
||||
public static final int LIBRARY_PATHS = 9;
|
||||
|
@ -82,7 +82,7 @@ public interface IOption extends IBuildObject {
|
|||
public static final int FILTER_FILE = 1;
|
||||
public static final int FILTER_PROJECT = 2;
|
||||
public static final String PROJECT = "project"; //$NON-NLS-1$
|
||||
|
||||
|
||||
// Schema attribute names for option elements
|
||||
public static final String BROWSE_TYPE = "browseType"; //$NON-NLS-1$
|
||||
/** @since 7.0 */
|
||||
|
@ -148,12 +148,12 @@ public interface IOption extends IBuildObject {
|
|||
* @since 8.1
|
||||
*/
|
||||
public static final String TYPE_TREE = "tree"; //$NON-NLS-1$
|
||||
|
||||
|
||||
public static final String VALUE = "value"; //$NON-NLS-1$
|
||||
public static final String VALUE_TYPE = "valueType"; //$NON-NLS-1$
|
||||
public static final String VALUE_HANDLER = "valueHandler"; //$NON-NLS-1$
|
||||
public static final String VALUE_HANDLER_EXTRA_ARGUMENT = "valueHandlerExtraArgument"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/** @since 8.0 */
|
||||
public static final String FIELD_EDITOR_ID = "fieldEditor"; //$NON-NLS-1$
|
||||
/** @since 8.0 */
|
||||
|
@ -185,7 +185,7 @@ public interface IOption extends IBuildObject {
|
|||
* option, or <code>null</code> if the attribute was not specified.
|
||||
*/
|
||||
public IOption getSuperClass();
|
||||
|
||||
|
||||
/**
|
||||
* @param holder - the actual option-holder for the context-data. This holder
|
||||
* is usually a subclass of this option's {@link #getOptionHolder() holder}.
|
||||
|
@ -193,11 +193,11 @@ public interface IOption extends IBuildObject {
|
|||
* @since 7.0
|
||||
*/
|
||||
public IOptionContextData getOptionContextData(IHoldsOptions holder);
|
||||
|
||||
|
||||
/**
|
||||
* @return 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 <code>null</code>.
|
||||
*/
|
||||
public String [] getApplicableValues();
|
||||
|
@ -206,46 +206,46 @@ public interface IOption extends IBuildObject {
|
|||
* @return the value for a boolean option.
|
||||
*/
|
||||
public boolean getBooleanValue() throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* @return the setting of the browseType attribute
|
||||
*/
|
||||
public int getBrowseType();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the browseType attribute.
|
||||
*
|
||||
*
|
||||
* @param type - browseType attribute
|
||||
*/
|
||||
public void setBrowseType(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @return the setting of the browseFilterPath attribute. For options of {@link #BROWSE_FILE} and {@link #BROWSE_DIR} types.
|
||||
* @since 7.0
|
||||
*/
|
||||
public String getBrowseFilterPath();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the browseFilterPath attribute. For options of {@link #BROWSE_FILE} and {@link #BROWSE_DIR} types.
|
||||
* @param path - default filter-path for the underlying browse dialog
|
||||
* @since 7.0
|
||||
*/
|
||||
public void setBrowseFilterPath(String path);
|
||||
|
||||
|
||||
/**
|
||||
* @return the setting of the browseFilterExtensions attribute. For options of {@link #BROWSE_FILE} type.
|
||||
* @since 7.0
|
||||
*/
|
||||
public String[] getBrowseFilterExtensions();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the browseFilterExtensions attribute. For options of {@link #BROWSE_FILE} type.
|
||||
* @param extensions - file extensions to show in browse files dialog
|
||||
*
|
||||
*
|
||||
* @since 7.0
|
||||
*/
|
||||
public void setBrowseFilterExtensions(String[] extensions);
|
||||
|
||||
|
||||
/**
|
||||
* @return the setting of the resourceFilter attribute
|
||||
*/
|
||||
|
@ -253,65 +253,65 @@ public interface IOption extends IBuildObject {
|
|||
|
||||
/**
|
||||
* Sets the resourceFilter attribute.
|
||||
*
|
||||
*
|
||||
* @param filter - resourceFilter attribute
|
||||
*/
|
||||
public void setResourceFilter(int filter);
|
||||
|
||||
|
||||
/**
|
||||
* @return an instance of the class that calculates whether the option is visible,
|
||||
* enabled, and used in command line generation
|
||||
*/
|
||||
public IOptionApplicability getApplicabilityCalculator();
|
||||
|
||||
|
||||
/**
|
||||
* @return an array of strings containing the built-in values
|
||||
* @return 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 <code>null</code>.
|
||||
*/
|
||||
public String[] getBuiltIns();
|
||||
|
||||
|
||||
/**
|
||||
* @return the category for this option.
|
||||
*/
|
||||
public IOptionCategory getCategory();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the category for this option.
|
||||
*/
|
||||
public void setCategory(IOptionCategory category);
|
||||
|
||||
|
||||
/**
|
||||
* @return a <code>String</code> containing the actual command line
|
||||
* @return a <code>String</code> containing the actual command line
|
||||
* option associated with the option
|
||||
*/
|
||||
public String getCommand();
|
||||
|
||||
|
||||
/**
|
||||
* @return an instance of the class that overrides the default command generation for the option
|
||||
* @since 8.0
|
||||
*/
|
||||
public IOptionCommandGenerator getCommandGenerator();
|
||||
|
||||
|
||||
/**
|
||||
* Sets a <code>String</code> containing the actual command line
|
||||
* Sets a <code>String</code> containing the actual command line
|
||||
* option associated with the option
|
||||
*
|
||||
*
|
||||
* @param command - the actual command line option
|
||||
*/
|
||||
public void setCommand(String command);
|
||||
|
||||
|
||||
/**
|
||||
* @return {@code String} containing the actual command line
|
||||
* option associated with a Boolean option when the value is {@code false}
|
||||
*/
|
||||
public String getCommandFalse();
|
||||
|
||||
|
||||
/**
|
||||
* Sets a <code>String</code> containing the actual command line
|
||||
* option associated with a Boolean option when the value is {@code false}
|
||||
*
|
||||
*
|
||||
* @param commandFalse - the actual command line option associated
|
||||
* with a Boolean option when the value is {@code false}
|
||||
*/
|
||||
|
@ -322,10 +322,10 @@ public interface IOption extends IBuildObject {
|
|||
* associated with the option
|
||||
*/
|
||||
public String getToolTip();
|
||||
|
||||
|
||||
/**
|
||||
* Sets a <code>String</code> containing the tooltip associated with the option
|
||||
*
|
||||
*
|
||||
* @param tooltip - the tooltip associated with the option
|
||||
*/
|
||||
public void setToolTip(String tooltip);
|
||||
|
@ -336,25 +336,25 @@ public interface IOption extends IBuildObject {
|
|||
*/
|
||||
public String getContextId();
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets a <code>String</code> containing the contextId associated with the option
|
||||
*
|
||||
*
|
||||
* @param id - the contextId associated with the option
|
||||
*/
|
||||
public void setContextId(String id);
|
||||
|
||||
|
||||
/**
|
||||
* @return the user-defined preprocessor symbols.
|
||||
* @return the user-defined preprocessor symbols.
|
||||
*/
|
||||
public String[] getDefinedSymbols() throws BuildException;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id - enumeration id
|
||||
* @return the command associated with the enumeration id. For
|
||||
* example, if the enumeration id was <code>gnu.debug.level.default</code>
|
||||
* for the debug level option of the Gnu compiler, and the plugin
|
||||
* manifest defined that as -g, then the return value would be the
|
||||
* example, if the enumeration id was <code>gnu.debug.level.default</code>
|
||||
* 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"
|
||||
*/
|
||||
public String getEnumCommand (String id) throws BuildException;
|
||||
|
@ -371,7 +371,7 @@ public interface IOption extends IBuildObject {
|
|||
* manifest defined that as -g, then the return value would be the
|
||||
* String "-g"
|
||||
*
|
||||
* @throws BuildException
|
||||
* @throws BuildException if this option is not of type {@link #TREE} or {@link #ENUMERATED}
|
||||
* @since 8.1
|
||||
*/
|
||||
public String getCommand (String id) throws BuildException;
|
||||
|
@ -417,7 +417,7 @@ public interface IOption extends IBuildObject {
|
|||
* defined in the build model.
|
||||
*/
|
||||
public String[] getIncludePaths() throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* @return an array or <code>String</code>s containing the libraries
|
||||
* that must be linked into the project.
|
||||
|
@ -427,7 +427,7 @@ public interface IOption extends IBuildObject {
|
|||
/**
|
||||
* @return an array or <code>String</code>s containing the library files
|
||||
* that must be linked into the project.
|
||||
*
|
||||
*
|
||||
* @since 7.0
|
||||
*/
|
||||
public String[] getLibraryFiles() throws BuildException;
|
||||
|
@ -442,51 +442,51 @@ public interface IOption extends IBuildObject {
|
|||
public String[] getLibraryPaths() throws BuildException;
|
||||
|
||||
/**
|
||||
* @return a <code>String</code> 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
|
||||
* @return a <code>String</code> 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.
|
||||
*
|
||||
*
|
||||
* @throws BuildException if the option type is not an enumeration
|
||||
*/
|
||||
public String getSelectedEnum () throws BuildException;
|
||||
public String getSelectedEnum () throws BuildException;
|
||||
|
||||
/**
|
||||
* @return the current value for this option if it is a List of Strings.
|
||||
*/
|
||||
public String [] getStringListValue() throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* @return the current value for this option if it is a String
|
||||
*/
|
||||
public String getStringValue() throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* @return all of the user-defined object files that must be linked with
|
||||
* the final build target.
|
||||
* the final build target.
|
||||
*/
|
||||
public String [] getUserObjects() throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* @return the raw value of this option which is the Object that contains the raw value of the option.
|
||||
* The type of Object is specific to the option type.
|
||||
*/
|
||||
public Object getValue();
|
||||
|
||||
|
||||
/**
|
||||
* @return the raw default value of this option which is the Object that contains the raw default value of the option.
|
||||
* The type of Object is specific to the option type.
|
||||
*/
|
||||
public Object getDefaultValue();
|
||||
|
||||
|
||||
/**
|
||||
* @return the type for the value of the option.
|
||||
*/
|
||||
public int getValueType() throws BuildException;
|
||||
|
||||
/**
|
||||
* Sets the boolean value of the receiver to the value specified in the argument.
|
||||
* 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.
|
||||
*/
|
||||
|
@ -496,25 +496,25 @@ public interface IOption extends IBuildObject {
|
|||
* Sets the string value of the receiver to the value specified in the argument.
|
||||
*/
|
||||
public void setValue(String value) throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of the receiver to be an array of strings.
|
||||
*
|
||||
*
|
||||
* @param value An array of strings to place in the option reference.
|
||||
*/
|
||||
public void setValue(String [] value) throws BuildException;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the raw value of this option.
|
||||
*
|
||||
*
|
||||
* @param v The Object that contains the raw value of the option. The type
|
||||
* of Object is specific to the option type.
|
||||
*/
|
||||
public void setValue(Object v);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the default value of this option.
|
||||
*
|
||||
*
|
||||
* @param v The Object that contains the default value of the option. The type
|
||||
* of Object is specific to the option type.
|
||||
*/
|
||||
|
@ -524,19 +524,19 @@ public interface IOption extends IBuildObject {
|
|||
* Sets the value-type of this option. Use with care.
|
||||
*/
|
||||
public void setValueType(int type);
|
||||
|
||||
|
||||
/**
|
||||
* @return the value handler specified for this tool.
|
||||
* @since 3.0
|
||||
*/
|
||||
public IManagedOptionValueHandler getValueHandler();
|
||||
|
||||
|
||||
/**
|
||||
* @return the value handlers extra argument specified for this tool
|
||||
* @since 3.0
|
||||
*/
|
||||
public String getValueHandlerExtraArgument();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value handlers extra argument specified for this tool
|
||||
* @since 3.0
|
||||
|
@ -545,25 +545,25 @@ public interface IOption extends IBuildObject {
|
|||
|
||||
/**
|
||||
* @return the custom field-editor ID for this build-option. This ID should match a custom-field editor
|
||||
* contributed through the {@code <fieldEditor>} element of the
|
||||
* {@code org.eclipse.cdt.managedbuilder.ui.buildDefinitionsUI} extension-point.
|
||||
* contributed through the {@code <fieldEditor>} element of the
|
||||
* {@code org.eclipse.cdt.managedbuilder.ui.buildDefinitionsUI} extension-point.
|
||||
* @since 8.0
|
||||
*/
|
||||
public String getFieldEditorId();
|
||||
|
||||
|
||||
/**
|
||||
* @return an optional extra argument for the {@link #getFieldEditorId() field-editor}.
|
||||
* @since 8.0
|
||||
*/
|
||||
public String getFieldEditorExtraArgument();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the optional extra argument for the field-editor.
|
||||
* @param extraArgument free-form extra argument to be interpreted by the {@link #getFieldEditorId() field-editor}
|
||||
* @since 8.0
|
||||
*/
|
||||
public void setFieldEditorExtraArgument(String extraArgument);
|
||||
|
||||
|
||||
/**
|
||||
* @return <code>true</code> if this option was loaded from a manifest file,
|
||||
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
||||
|
@ -573,15 +573,15 @@ public interface IOption extends IBuildObject {
|
|||
/**
|
||||
* @return <code>true</code> if this option is valid and <code>false</code>
|
||||
* if the option cannot be safely used due to an error in the MBS grammar.
|
||||
*
|
||||
*
|
||||
* @since 3.0
|
||||
*
|
||||
*
|
||||
* @pre Can only be used after Ids in MBS grammar have been resolved by pointers.
|
||||
*/
|
||||
public boolean isValid();
|
||||
|
||||
|
||||
/**
|
||||
* @return the type of the option value, i.e. whether it is string, boolean,
|
||||
* @return the type of the option value, i.e. whether it is string, boolean,
|
||||
* string list or enumeration. 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.
|
||||
*
|
||||
|
@ -596,13 +596,13 @@ public interface IOption extends IBuildObject {
|
|||
* {@link IOption#LIBRARY_FILES}, {@link IOption#MACRO_FILES}
|
||||
*/
|
||||
int getBasicValueType() throws BuildException ;
|
||||
|
||||
|
||||
/**
|
||||
* @return in case the option basic value type is STRING_LIST, returns the String list value,
|
||||
* throws BuildException otherwise
|
||||
* throws BuildException otherwise
|
||||
*/
|
||||
String[] getBasicStringListValue() throws BuildException;
|
||||
|
||||
|
||||
public OptionStringValue[] getBasicStringListValueElements() throws BuildException;
|
||||
|
||||
/**
|
||||
|
@ -693,9 +693,9 @@ public interface IOption extends IBuildObject {
|
|||
|
||||
/**
|
||||
* Adds a new child directly under this node.
|
||||
* @param id
|
||||
* @param name
|
||||
* @return
|
||||
* @param id The id of the new child.
|
||||
* @param name The name of the new child.
|
||||
* @return The added child.
|
||||
*/
|
||||
ITreeOption addChild(String id, String name);
|
||||
void remove();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2011 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 2013 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -113,46 +113,46 @@ public class OptionReference implements IOption {
|
|||
|
||||
// value
|
||||
switch (optValType) {
|
||||
case BOOLEAN:
|
||||
value = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
case ENUMERATED:
|
||||
// Pre-2.0 the value was the string for the UI
|
||||
// Post-2.0 it is the ID of the enumerated option
|
||||
value = element.getAttribute(DEFAULT_VALUE);
|
||||
break;
|
||||
case STRING_LIST:
|
||||
case INCLUDE_PATH:
|
||||
case PREPROCESSOR_SYMBOLS:
|
||||
case LIBRARIES:
|
||||
case OBJECTS:
|
||||
case INCLUDE_FILES:
|
||||
case LIBRARY_PATHS:
|
||||
case LIBRARY_FILES:
|
||||
case MACRO_FILES:
|
||||
case UNDEF_INCLUDE_PATH:
|
||||
case UNDEF_PREPROCESSOR_SYMBOLS:
|
||||
case UNDEF_INCLUDE_FILES:
|
||||
case UNDEF_LIBRARY_PATHS:
|
||||
case UNDEF_LIBRARY_FILES:
|
||||
case UNDEF_MACRO_FILES:
|
||||
List<String> valueList = new ArrayList<String>();
|
||||
NodeList nodes = element.getElementsByTagName(LIST_VALUE);
|
||||
for (int i = 0; i < nodes.getLength(); ++i) {
|
||||
Node node = nodes.item(i);
|
||||
if (node.getNodeType() == Node.ELEMENT_NODE) {
|
||||
Boolean isBuiltIn = new Boolean(((Element)node).getAttribute(LIST_ITEM_BUILTIN));
|
||||
if (isBuiltIn.booleanValue()) {
|
||||
getBuiltInList().add(((Element)node).getAttribute(LIST_ITEM_VALUE));
|
||||
} else {
|
||||
valueList.add(((Element)node).getAttribute(LIST_ITEM_VALUE));
|
||||
}
|
||||
case BOOLEAN:
|
||||
value = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
case ENUMERATED:
|
||||
// Pre-2.0 the value was the string for the UI
|
||||
// Post-2.0 it is the ID of the enumerated option
|
||||
value = element.getAttribute(DEFAULT_VALUE);
|
||||
break;
|
||||
case STRING_LIST:
|
||||
case INCLUDE_PATH:
|
||||
case PREPROCESSOR_SYMBOLS:
|
||||
case LIBRARIES:
|
||||
case OBJECTS:
|
||||
case INCLUDE_FILES:
|
||||
case LIBRARY_PATHS:
|
||||
case LIBRARY_FILES:
|
||||
case MACRO_FILES:
|
||||
case UNDEF_INCLUDE_PATH:
|
||||
case UNDEF_PREPROCESSOR_SYMBOLS:
|
||||
case UNDEF_INCLUDE_FILES:
|
||||
case UNDEF_LIBRARY_PATHS:
|
||||
case UNDEF_LIBRARY_FILES:
|
||||
case UNDEF_MACRO_FILES:
|
||||
List<String> valueList = new ArrayList<String>();
|
||||
NodeList nodes = element.getElementsByTagName(LIST_VALUE);
|
||||
for (int i = 0; i < nodes.getLength(); ++i) {
|
||||
Node node = nodes.item(i);
|
||||
if (node.getNodeType() == Node.ELEMENT_NODE) {
|
||||
Boolean isBuiltIn = new Boolean(((Element)node).getAttribute(LIST_ITEM_BUILTIN));
|
||||
if (isBuiltIn.booleanValue()) {
|
||||
getBuiltInList().add(((Element)node).getAttribute(LIST_ITEM_VALUE));
|
||||
} else {
|
||||
valueList.add(((Element)node).getAttribute(LIST_ITEM_VALUE));
|
||||
}
|
||||
}
|
||||
value = valueList;
|
||||
break;
|
||||
}
|
||||
value = valueList;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -184,48 +184,47 @@ public class OptionReference implements IOption {
|
|||
|
||||
// value
|
||||
switch (optValType) {
|
||||
case BOOLEAN:
|
||||
value = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
break;
|
||||
case STRING:
|
||||
value = element.getAttribute(DEFAULT_VALUE);
|
||||
break;
|
||||
case TREE:
|
||||
case ENUMERATED:
|
||||
String temp = element.getAttribute(DEFAULT_VALUE);
|
||||
if (temp != null) {
|
||||
value = temp;
|
||||
case BOOLEAN:
|
||||
value = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
break;
|
||||
case STRING:
|
||||
value = element.getAttribute(DEFAULT_VALUE);
|
||||
break;
|
||||
case TREE:
|
||||
case ENUMERATED:
|
||||
String temp = element.getAttribute(DEFAULT_VALUE);
|
||||
if (temp != null) {
|
||||
value = temp;
|
||||
}
|
||||
break;
|
||||
case STRING_LIST:
|
||||
case INCLUDE_PATH:
|
||||
case PREPROCESSOR_SYMBOLS:
|
||||
case LIBRARIES:
|
||||
case OBJECTS:
|
||||
case INCLUDE_FILES:
|
||||
case LIBRARY_PATHS:
|
||||
case LIBRARY_FILES:
|
||||
case MACRO_FILES:
|
||||
case UNDEF_INCLUDE_PATH:
|
||||
case UNDEF_PREPROCESSOR_SYMBOLS:
|
||||
case UNDEF_INCLUDE_FILES:
|
||||
case UNDEF_LIBRARY_PATHS:
|
||||
case UNDEF_LIBRARY_FILES:
|
||||
case UNDEF_MACRO_FILES:
|
||||
List<String> valueList = new ArrayList<String>();
|
||||
IManagedConfigElement[] valueElements = element.getChildren(LIST_VALUE);
|
||||
for (IManagedConfigElement valueElement : valueElements) {
|
||||
Boolean isBuiltIn = new Boolean(valueElement.getAttribute(LIST_ITEM_BUILTIN));
|
||||
if (isBuiltIn.booleanValue()) {
|
||||
getBuiltInList().add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
||||
}
|
||||
break;
|
||||
case STRING_LIST:
|
||||
case INCLUDE_PATH:
|
||||
case PREPROCESSOR_SYMBOLS:
|
||||
case LIBRARIES:
|
||||
case OBJECTS:
|
||||
case INCLUDE_FILES:
|
||||
case LIBRARY_PATHS:
|
||||
case LIBRARY_FILES:
|
||||
case MACRO_FILES:
|
||||
case UNDEF_INCLUDE_PATH:
|
||||
case UNDEF_PREPROCESSOR_SYMBOLS:
|
||||
case UNDEF_INCLUDE_FILES:
|
||||
case UNDEF_LIBRARY_PATHS:
|
||||
case UNDEF_LIBRARY_FILES:
|
||||
case UNDEF_MACRO_FILES:
|
||||
List<String> valueList = new ArrayList<String>();
|
||||
IManagedConfigElement[] valueElements = element.getChildren(LIST_VALUE);
|
||||
for (int i = 0; i < valueElements.length; ++i) {
|
||||
IManagedConfigElement valueElement = valueElements[i];
|
||||
Boolean isBuiltIn = new Boolean(valueElement.getAttribute(LIST_ITEM_BUILTIN));
|
||||
if (isBuiltIn.booleanValue()) {
|
||||
getBuiltInList().add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
||||
}
|
||||
else {
|
||||
valueList.add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
||||
}
|
||||
else {
|
||||
valueList.add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
||||
}
|
||||
value = valueList;
|
||||
break;
|
||||
}
|
||||
value = valueList;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,133 +245,104 @@ public class OptionReference implements IOption {
|
|||
|
||||
// value
|
||||
switch (optValType) {
|
||||
case BOOLEAN:
|
||||
element.setAttribute(DEFAULT_VALUE, ((Boolean)value).toString());
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
case ENUMERATED:
|
||||
element.setAttribute(DEFAULT_VALUE, (String)value);
|
||||
break;
|
||||
case STRING_LIST:
|
||||
case INCLUDE_PATH:
|
||||
case PREPROCESSOR_SYMBOLS:
|
||||
case LIBRARIES:
|
||||
case OBJECTS:
|
||||
case INCLUDE_FILES:
|
||||
case LIBRARY_PATHS:
|
||||
case LIBRARY_FILES:
|
||||
case MACRO_FILES:
|
||||
case UNDEF_INCLUDE_PATH:
|
||||
case UNDEF_PREPROCESSOR_SYMBOLS:
|
||||
case UNDEF_INCLUDE_FILES:
|
||||
case UNDEF_LIBRARY_PATHS:
|
||||
case UNDEF_LIBRARY_FILES:
|
||||
case UNDEF_MACRO_FILES:
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> stringList = (ArrayList<String>)value;
|
||||
for (String val : stringList) {
|
||||
case BOOLEAN:
|
||||
element.setAttribute(DEFAULT_VALUE, ((Boolean)value).toString());
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
case ENUMERATED:
|
||||
element.setAttribute(DEFAULT_VALUE, (String)value);
|
||||
break;
|
||||
case STRING_LIST:
|
||||
case INCLUDE_PATH:
|
||||
case PREPROCESSOR_SYMBOLS:
|
||||
case LIBRARIES:
|
||||
case OBJECTS:
|
||||
case INCLUDE_FILES:
|
||||
case LIBRARY_PATHS:
|
||||
case LIBRARY_FILES:
|
||||
case MACRO_FILES:
|
||||
case UNDEF_INCLUDE_PATH:
|
||||
case UNDEF_PREPROCESSOR_SYMBOLS:
|
||||
case UNDEF_INCLUDE_FILES:
|
||||
case UNDEF_LIBRARY_PATHS:
|
||||
case UNDEF_LIBRARY_FILES:
|
||||
case UNDEF_MACRO_FILES:
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> stringList = (ArrayList<String>)value;
|
||||
for (String val : stringList) {
|
||||
Element valueElement = doc.createElement(LIST_VALUE);
|
||||
valueElement.setAttribute(LIST_ITEM_VALUE, val);
|
||||
valueElement.setAttribute(LIST_ITEM_BUILTIN, "false"); //$NON-NLS-1$
|
||||
element.appendChild(valueElement);
|
||||
}
|
||||
// Serialize the built-ins that have been overridden
|
||||
if (builtIns != null) {
|
||||
for (String builtIn : builtIns) {
|
||||
Element valueElement = doc.createElement(LIST_VALUE);
|
||||
valueElement.setAttribute(LIST_ITEM_VALUE, val);
|
||||
valueElement.setAttribute(LIST_ITEM_BUILTIN, "false"); //$NON-NLS-1$
|
||||
valueElement.setAttribute(LIST_ITEM_VALUE, builtIn);
|
||||
valueElement.setAttribute(LIST_ITEM_BUILTIN, "true"); //$NON-NLS-1$
|
||||
element.appendChild(valueElement);
|
||||
}
|
||||
// Serialize the built-ins that have been overridden
|
||||
if (builtIns != null) {
|
||||
for (String builtIn : builtIns) {
|
||||
Element valueElement = doc.createElement(LIST_VALUE);
|
||||
valueElement.setAttribute(LIST_ITEM_VALUE, builtIn);
|
||||
valueElement.setAttribute(LIST_ITEM_BUILTIN, "true"); //$NON-NLS-1$
|
||||
element.appendChild(valueElement);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getOptionContextData(org.eclipse.cdt.managedbuilder.core.IHoldsOptions)
|
||||
*/
|
||||
@Override
|
||||
public IOptionContextData getOptionContextData(IHoldsOptions holder) {
|
||||
return option.getOptionContextData(holder);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getApplicableValues()
|
||||
*/
|
||||
@Override
|
||||
public String[] getApplicableValues() {
|
||||
return option.getApplicableValues();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getCategory()
|
||||
*/
|
||||
@Override
|
||||
public IOptionCategory getCategory() {
|
||||
return option.getCategory();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getCommand()
|
||||
*/
|
||||
@Override
|
||||
public String getCommand() {
|
||||
return option.getCommand();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getCommandGenerator()
|
||||
*/
|
||||
@Override
|
||||
public IOptionCommandGenerator getCommandGenerator() {
|
||||
return option.getCommandGenerator();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getCommandFalse()
|
||||
*/
|
||||
@Override
|
||||
public String getCommandFalse() {
|
||||
return option.getCommandFalse();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getToolTip()
|
||||
*/
|
||||
@Override
|
||||
public String getToolTip() {
|
||||
return option.getToolTip();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getContextID()
|
||||
*/
|
||||
@Override
|
||||
public String getContextId() {
|
||||
return option.getContextId();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getDefinedSymbols()
|
||||
*/
|
||||
@Override
|
||||
public String[] getDefinedSymbols() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getDefinedSymbols();
|
||||
else if (getValueType() == PREPROCESSOR_SYMBOLS) {
|
||||
} else if (getValueType() == PREPROCESSOR_SYMBOLS) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getEnumCommand(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getEnumCommand(String id) {
|
||||
if (!resolved) {
|
||||
|
@ -387,6 +357,7 @@ public class OptionReference implements IOption {
|
|||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommand(String id) throws BuildException {
|
||||
if (!resolved) {
|
||||
resolveReferences();
|
||||
|
@ -400,9 +371,6 @@ public class OptionReference implements IOption {
|
|||
return new String();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getEnumName(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getEnumName(String id) {
|
||||
if (!resolved) {
|
||||
|
@ -417,6 +385,7 @@ public class OptionReference implements IOption {
|
|||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(String id) throws BuildException {
|
||||
if (!resolved) {
|
||||
resolveReferences();
|
||||
|
@ -430,9 +399,6 @@ public class OptionReference implements IOption {
|
|||
return new String();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getEnumeratedId(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getEnumeratedId(String name) {
|
||||
if (!resolved) {
|
||||
|
@ -447,6 +413,7 @@ public class OptionReference implements IOption {
|
|||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId(String name) throws BuildException {
|
||||
if (!resolved) {
|
||||
resolveReferences();
|
||||
|
@ -460,100 +427,80 @@ public class OptionReference implements IOption {
|
|||
return new String();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IBuildObject#getId()
|
||||
*/
|
||||
@Override
|
||||
public String getId() {
|
||||
// A reference has the same id as the option it references
|
||||
return option.getId();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IBuildObject#getBaseId()
|
||||
*/
|
||||
@Override
|
||||
public String getBaseId() {
|
||||
// A reference has the same id as the option it references
|
||||
return option.getBaseId();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths()
|
||||
*/
|
||||
@Override
|
||||
public String[] getIncludePaths() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getIncludePaths();
|
||||
else if (getValueType() == INCLUDE_PATH) {
|
||||
} else if (getValueType() == INCLUDE_PATH) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getLibraries()
|
||||
*/
|
||||
@Override
|
||||
public String[] getLibraries() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getLibraries();
|
||||
else if (getValueType() == LIBRARIES) {
|
||||
} else if (getValueType() == LIBRARIES) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getLibraryFiles()
|
||||
*/
|
||||
@Override
|
||||
public String[] getLibraryFiles() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getLibraryFiles();
|
||||
else if (getValueType() == LIBRARY_FILES) {
|
||||
} else if (getValueType() == LIBRARY_FILES) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getLibraryPaths()
|
||||
*/
|
||||
@Override
|
||||
public String[] getLibraryPaths() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getLibraryPaths();
|
||||
else if (getValueType() == LIBRARY_PATHS) {
|
||||
} else if (getValueType() == LIBRARY_PATHS) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IBuildObject#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
// A reference has the same name as the option it references
|
||||
return option.getName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getBooleanValue()
|
||||
*/
|
||||
@Override
|
||||
public boolean getBooleanValue() throws BuildException {
|
||||
if (value == null){
|
||||
|
@ -567,25 +514,16 @@ public class OptionReference implements IOption {
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getBrowseType()
|
||||
*/
|
||||
@Override
|
||||
public int getBrowseType() {
|
||||
return option.getBrowseType();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getBrowseFilterPath()
|
||||
*/
|
||||
@Override
|
||||
public String getBrowseFilterPath() {
|
||||
return option.getBrowseFilterPath();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getBrowseFilterExtensions()
|
||||
*/
|
||||
@Override
|
||||
public String[] getBrowseFilterExtensions() {
|
||||
return option.getBrowseFilterExtensions();
|
||||
|
@ -598,9 +536,6 @@ public class OptionReference implements IOption {
|
|||
return builtIns;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getBuiltIns()
|
||||
*/
|
||||
@Override
|
||||
public String[] getBuiltIns() {
|
||||
List<String> answer = new ArrayList<String>();
|
||||
|
@ -631,9 +566,6 @@ public class OptionReference implements IOption {
|
|||
return option;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getSelectedEnum()
|
||||
*/
|
||||
@Override
|
||||
public String getSelectedEnum() throws BuildException {
|
||||
// A reference to an enumerated option stores the ID of the selected enum in its value
|
||||
|
@ -648,46 +580,37 @@ public class OptionReference implements IOption {
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getStringListValue()
|
||||
*/
|
||||
@Override
|
||||
public String[] getStringListValue() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getStringListValue();
|
||||
else if (getValueType() == STRING_LIST) {
|
||||
} else if (getValueType() == STRING_LIST) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getStringValue()
|
||||
*/
|
||||
@Override
|
||||
public String getStringValue() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getStringValue();
|
||||
else if (getValueType() == STRING)
|
||||
} else if (getValueType() == STRING) {
|
||||
return (String)value;
|
||||
else
|
||||
}
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getParent()
|
||||
*/
|
||||
@Override
|
||||
public IBuildObject getParent() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getOptionHolder()
|
||||
*/
|
||||
@Override
|
||||
public IHoldsOptions getOptionHolder() {
|
||||
return owner;
|
||||
|
@ -702,25 +625,20 @@ public class OptionReference implements IOption {
|
|||
return owner;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getUserObjects()
|
||||
*/
|
||||
@Override
|
||||
public String[] getUserObjects() throws BuildException {
|
||||
if (value == null)
|
||||
if (value == null) {
|
||||
return option.getDefinedSymbols();
|
||||
else if (getValueType() == OBJECTS) {
|
||||
} else if (getValueType() == OBJECTS) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ArrayList<String> list = (ArrayList<String>)value;
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueType()
|
||||
*/
|
||||
@Override
|
||||
public int getValueType() {
|
||||
int optValType;
|
||||
|
@ -731,9 +649,6 @@ public class OptionReference implements IOption {
|
|||
return optValType;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* Returns the raw value.
|
||||
*/
|
||||
@Override
|
||||
public Object getValue() {
|
||||
return value;
|
||||
|
@ -763,10 +678,12 @@ public class OptionReference implements IOption {
|
|||
*/
|
||||
@Override
|
||||
public void setValue(boolean value) throws BuildException {
|
||||
if (getValueType() == BOOLEAN)
|
||||
if (getValueType() == BOOLEAN) {
|
||||
this.value = new Boolean(value);
|
||||
else
|
||||
}
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -787,31 +704,29 @@ public class OptionReference implements IOption {
|
|||
@Override
|
||||
public void setValue(String [] value) throws BuildException {
|
||||
if (getValueType() == STRING_LIST
|
||||
|| getValueType() == INCLUDE_PATH
|
||||
|| getValueType() == PREPROCESSOR_SYMBOLS
|
||||
|| getValueType() == LIBRARIES
|
||||
|| getValueType() == OBJECTS
|
||||
|| getValueType() == INCLUDE_FILES
|
||||
|| getValueType() == LIBRARY_PATHS
|
||||
|| getValueType() == LIBRARY_FILES
|
||||
|| getValueType() == MACRO_FILES
|
||||
|| getValueType() == UNDEF_INCLUDE_PATH
|
||||
|| getValueType() == UNDEF_PREPROCESSOR_SYMBOLS
|
||||
|| getValueType() == UNDEF_INCLUDE_FILES
|
||||
|| getValueType() == UNDEF_LIBRARY_PATHS
|
||||
|| getValueType() == UNDEF_LIBRARY_FILES
|
||||
|| getValueType() == UNDEF_MACRO_FILES
|
||||
) {
|
||||
|| getValueType() == INCLUDE_PATH
|
||||
|| getValueType() == PREPROCESSOR_SYMBOLS
|
||||
|| getValueType() == LIBRARIES
|
||||
|| getValueType() == OBJECTS
|
||||
|| getValueType() == INCLUDE_FILES
|
||||
|| getValueType() == LIBRARY_PATHS
|
||||
|| getValueType() == LIBRARY_FILES
|
||||
|| getValueType() == MACRO_FILES
|
||||
|| getValueType() == UNDEF_INCLUDE_PATH
|
||||
|| getValueType() == UNDEF_PREPROCESSOR_SYMBOLS
|
||||
|| getValueType() == UNDEF_INCLUDE_FILES
|
||||
|| getValueType() == UNDEF_LIBRARY_PATHS
|
||||
|| getValueType() == UNDEF_LIBRARY_FILES
|
||||
|| getValueType() == UNDEF_MACRO_FILES
|
||||
) {
|
||||
// Just replace what the option reference is holding onto
|
||||
this.value = new ArrayList<String>(Arrays.asList(value));
|
||||
}
|
||||
else
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
String answer = new String();
|
||||
|
@ -831,132 +746,82 @@ public class OptionReference implements IOption {
|
|||
* They should never be called.
|
||||
*/
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#isExtensionElement()
|
||||
*/
|
||||
@Override
|
||||
public boolean isExtensionElement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* Sets the raw value.
|
||||
*/
|
||||
@Override
|
||||
public void setValue(Object v) {
|
||||
value = v;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setValueType()
|
||||
*/
|
||||
@Override
|
||||
public void setValueType(int type) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* Returns the raw default value.
|
||||
*/
|
||||
@Override
|
||||
public Object getDefaultValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setValue(Object)
|
||||
*/
|
||||
@Override
|
||||
public void setDefaultValue(Object v) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getSuperClass()
|
||||
*/
|
||||
@Override
|
||||
public IOption getSuperClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getResourceFilter()
|
||||
*/
|
||||
@Override
|
||||
public int getResourceFilter() {
|
||||
return FILTER_ALL;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getApplicabilityCalculator()
|
||||
*/
|
||||
@Override
|
||||
public IOptionApplicability getApplicabilityCalculator() {
|
||||
return option.getApplicabilityCalculator();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setResourceFilter(int)
|
||||
*/
|
||||
@Override
|
||||
public void setResourceFilter(int filter) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setBrowseType(int)
|
||||
*/
|
||||
@Override
|
||||
public void setBrowseType(int type) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setBrowseFilterPath(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setBrowseFilterPath(String path) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setBrowseFilterExtensions(java.lang.String[])
|
||||
*/
|
||||
@Override
|
||||
public void setBrowseFilterExtensions(String[] extensions) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setCategory(org.eclipse.cdt.core.build.managed.IOptionCategory)
|
||||
*/
|
||||
@Override
|
||||
public void setCategory(IOptionCategory category) {
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setCommand(String)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void setCommand(String cmd) {
|
||||
if (cmd == null && command == null) return;
|
||||
if (cmd == null && command == null) {
|
||||
return;
|
||||
}
|
||||
if (cmd == null || command == null || !cmd.equals(command)) {
|
||||
command = cmd;
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setCommandFalse(String)
|
||||
*/
|
||||
@Override
|
||||
public void setCommandFalse(String cmd) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setToolTip(String)
|
||||
*/
|
||||
@Override
|
||||
public void setToolTip(String tooltip) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setContextId(String)
|
||||
*/
|
||||
@Override
|
||||
public void setContextId(String contextId) {
|
||||
}
|
||||
|
@ -976,68 +841,41 @@ public class OptionReference implements IOption {
|
|||
return option.getManagedBuildRevision();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueHandlerElement()
|
||||
*/
|
||||
public IConfigurationElement getValueHandlerElement() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#setValueHandlerElement(IConfigurationElement)
|
||||
*/
|
||||
public void setValueHandlerElement(IConfigurationElement element) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueHandler()
|
||||
*/
|
||||
@Override
|
||||
public IManagedOptionValueHandler getValueHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueHandlerExtraArgument())
|
||||
*/
|
||||
@Override
|
||||
public String getValueHandlerExtraArgument() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setValueHandlerExtraArgument(String))
|
||||
*/
|
||||
@Override
|
||||
public void setValueHandlerExtraArgument(String extraArgument) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getFieldEditorId()
|
||||
*/
|
||||
@Override
|
||||
public String getFieldEditorId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getFieldEditorExtraArgument()
|
||||
*/
|
||||
@Override
|
||||
public String getFieldEditorExtraArgument() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setFieldEditorExtraArgument(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setFieldEditorExtraArgument(String extraArgument) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#isValid()
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return option.isValid();
|
||||
|
@ -1083,6 +921,7 @@ public class OptionReference implements IOption {
|
|||
}
|
||||
return ve;
|
||||
}
|
||||
@Override
|
||||
public ITreeRoot getTreeRoot() {
|
||||
if (!resolved) {
|
||||
resolveReferences();
|
||||
|
|
Loading…
Add table
Reference in a new issue