mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -17,7 +17,7 @@ package org.eclipse.cdt.managedbuilder.core;
|
||||||
import org.eclipse.cdt.managedbuilder.macros.IOptionContextData;
|
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.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noimplement This interface is not intended to be implemented 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
|
* String list of library names to link against searched for
|
||||||
* via LIBRARY_PATHS by the linker. In the GNU
|
* 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
|
* This option type is persisted / referenced by the name
|
||||||
* {@link IOption#TYPE_LIB}
|
* {@link IOption#TYPE_LIB}
|
||||||
*/
|
*/
|
||||||
|
@ -371,7 +371,7 @@ public interface IOption extends IBuildObject {
|
||||||
* manifest defined that as -g, then the return value would be the
|
* manifest defined that as -g, then the return value would be the
|
||||||
* String "-g"
|
* String "-g"
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException if this option is not of type {@link #TREE} or {@link #ENUMERATED}
|
||||||
* @since 8.1
|
* @since 8.1
|
||||||
*/
|
*/
|
||||||
public String getCommand (String id) throws BuildException;
|
public String getCommand (String id) throws BuildException;
|
||||||
|
@ -693,9 +693,9 @@ public interface IOption extends IBuildObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new child directly under this node.
|
* Adds a new child directly under this node.
|
||||||
* @param id
|
* @param id The id of the new child.
|
||||||
* @param name
|
* @param name The name of the new child.
|
||||||
* @return
|
* @return The added child.
|
||||||
*/
|
*/
|
||||||
ITreeOption addChild(String id, String name);
|
ITreeOption addChild(String id, String name);
|
||||||
void remove();
|
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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -214,8 +214,7 @@ public class OptionReference implements IOption {
|
||||||
case UNDEF_MACRO_FILES:
|
case UNDEF_MACRO_FILES:
|
||||||
List<String> valueList = new ArrayList<String>();
|
List<String> valueList = new ArrayList<String>();
|
||||||
IManagedConfigElement[] valueElements = element.getChildren(LIST_VALUE);
|
IManagedConfigElement[] valueElements = element.getChildren(LIST_VALUE);
|
||||||
for (int i = 0; i < valueElements.length; ++i) {
|
for (IManagedConfigElement valueElement : valueElements) {
|
||||||
IManagedConfigElement valueElement = valueElements[i];
|
|
||||||
Boolean isBuiltIn = new Boolean(valueElement.getAttribute(LIST_ITEM_BUILTIN));
|
Boolean isBuiltIn = new Boolean(valueElement.getAttribute(LIST_ITEM_BUILTIN));
|
||||||
if (isBuiltIn.booleanValue()) {
|
if (isBuiltIn.booleanValue()) {
|
||||||
getBuiltInList().add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
getBuiltInList().add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
||||||
|
@ -290,89 +289,60 @@ public class OptionReference implements IOption {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getOptionContextData(org.eclipse.cdt.managedbuilder.core.IHoldsOptions)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IOptionContextData getOptionContextData(IHoldsOptions holder) {
|
public IOptionContextData getOptionContextData(IHoldsOptions holder) {
|
||||||
return option.getOptionContextData(holder);
|
return option.getOptionContextData(holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getApplicableValues()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getApplicableValues() {
|
public String[] getApplicableValues() {
|
||||||
return option.getApplicableValues();
|
return option.getApplicableValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getCategory()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IOptionCategory getCategory() {
|
public IOptionCategory getCategory() {
|
||||||
return option.getCategory();
|
return option.getCategory();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getCommand()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getCommand() {
|
public String getCommand() {
|
||||||
return option.getCommand();
|
return option.getCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getCommandGenerator()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IOptionCommandGenerator getCommandGenerator() {
|
public IOptionCommandGenerator getCommandGenerator() {
|
||||||
return option.getCommandGenerator();
|
return option.getCommandGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getCommandFalse()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getCommandFalse() {
|
public String getCommandFalse() {
|
||||||
return option.getCommandFalse();
|
return option.getCommandFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getToolTip()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getToolTip() {
|
public String getToolTip() {
|
||||||
return option.getToolTip();
|
return option.getToolTip();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getContextID()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getContextId() {
|
public String getContextId() {
|
||||||
return option.getContextId();
|
return option.getContextId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getDefinedSymbols()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDefinedSymbols() throws BuildException {
|
public String[] getDefinedSymbols() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getDefinedSymbols();
|
return option.getDefinedSymbols();
|
||||||
else if (getValueType() == PREPROCESSOR_SYMBOLS) {
|
} else if (getValueType() == PREPROCESSOR_SYMBOLS) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public String getEnumCommand(String id) {
|
public String getEnumCommand(String id) {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
|
@ -387,6 +357,7 @@ public class OptionReference implements IOption {
|
||||||
return new String();
|
return new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getCommand(String id) throws BuildException {
|
public String getCommand(String id) throws BuildException {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
resolveReferences();
|
resolveReferences();
|
||||||
|
@ -400,9 +371,6 @@ public class OptionReference implements IOption {
|
||||||
return new String();
|
return new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getEnumName(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getEnumName(String id) {
|
public String getEnumName(String id) {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
|
@ -417,6 +385,7 @@ public class OptionReference implements IOption {
|
||||||
return new String();
|
return new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName(String id) throws BuildException {
|
public String getName(String id) throws BuildException {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
resolveReferences();
|
resolveReferences();
|
||||||
|
@ -430,9 +399,6 @@ public class OptionReference implements IOption {
|
||||||
return new String();
|
return new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getEnumeratedId(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getEnumeratedId(String name) {
|
public String getEnumeratedId(String name) {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
|
@ -447,6 +413,7 @@ public class OptionReference implements IOption {
|
||||||
return new String();
|
return new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getId(String name) throws BuildException {
|
public String getId(String name) throws BuildException {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
resolveReferences();
|
resolveReferences();
|
||||||
|
@ -460,100 +427,80 @@ public class OptionReference implements IOption {
|
||||||
return new String();
|
return new String();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IBuildObject#getId()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getId() {
|
public String getId() {
|
||||||
// A reference has the same id as the option it references
|
// A reference has the same id as the option it references
|
||||||
return option.getId();
|
return option.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IBuildObject#getBaseId()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getBaseId() {
|
public String getBaseId() {
|
||||||
// A reference has the same id as the option it references
|
// A reference has the same id as the option it references
|
||||||
return option.getBaseId();
|
return option.getBaseId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getIncludePaths() throws BuildException {
|
public String[] getIncludePaths() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getIncludePaths();
|
return option.getIncludePaths();
|
||||||
else if (getValueType() == INCLUDE_PATH) {
|
} else if (getValueType() == INCLUDE_PATH) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public String[] getLibraries() throws BuildException {
|
public String[] getLibraries() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getLibraries();
|
return option.getLibraries();
|
||||||
else if (getValueType() == LIBRARIES) {
|
} else if (getValueType() == LIBRARIES) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public String[] getLibraryFiles() throws BuildException {
|
public String[] getLibraryFiles() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getLibraryFiles();
|
return option.getLibraryFiles();
|
||||||
else if (getValueType() == LIBRARY_FILES) {
|
} else if (getValueType() == LIBRARY_FILES) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getLibraryPaths()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getLibraryPaths() throws BuildException {
|
public String[] getLibraryPaths() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getLibraryPaths();
|
return option.getLibraryPaths();
|
||||||
else if (getValueType() == LIBRARY_PATHS) {
|
} else if (getValueType() == LIBRARY_PATHS) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
// A reference has the same name as the option it references
|
// A reference has the same name as the option it references
|
||||||
return option.getName();
|
return option.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getBooleanValue()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getBooleanValue() throws BuildException {
|
public boolean getBooleanValue() throws BuildException {
|
||||||
if (value == null){
|
if (value == null){
|
||||||
|
@ -567,25 +514,16 @@ public class OptionReference implements IOption {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getBrowseType()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getBrowseType() {
|
public int getBrowseType() {
|
||||||
return option.getBrowseType();
|
return option.getBrowseType();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getBrowseFilterPath()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getBrowseFilterPath() {
|
public String getBrowseFilterPath() {
|
||||||
return option.getBrowseFilterPath();
|
return option.getBrowseFilterPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getBrowseFilterExtensions()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getBrowseFilterExtensions() {
|
public String[] getBrowseFilterExtensions() {
|
||||||
return option.getBrowseFilterExtensions();
|
return option.getBrowseFilterExtensions();
|
||||||
|
@ -598,9 +536,6 @@ public class OptionReference implements IOption {
|
||||||
return builtIns;
|
return builtIns;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getBuiltIns()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getBuiltIns() {
|
public String[] getBuiltIns() {
|
||||||
List<String> answer = new ArrayList<String>();
|
List<String> answer = new ArrayList<String>();
|
||||||
|
@ -631,9 +566,6 @@ public class OptionReference implements IOption {
|
||||||
return option;
|
return option;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getSelectedEnum()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getSelectedEnum() throws BuildException {
|
public String getSelectedEnum() throws BuildException {
|
||||||
// A reference to an enumerated option stores the ID of the selected enum in its value
|
// 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
|
@Override
|
||||||
public String[] getStringListValue() throws BuildException {
|
public String[] getStringListValue() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getStringListValue();
|
return option.getStringListValue();
|
||||||
else if (getValueType() == STRING_LIST) {
|
} else if (getValueType() == STRING_LIST) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public String getStringValue() throws BuildException {
|
public String getStringValue() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getStringValue();
|
return option.getStringValue();
|
||||||
else if (getValueType() == STRING)
|
} else if (getValueType() == STRING) {
|
||||||
return (String)value;
|
return (String)value;
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public IBuildObject getParent() {
|
public IBuildObject getParent() {
|
||||||
return owner;
|
return owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getOptionHolder()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IHoldsOptions getOptionHolder() {
|
public IHoldsOptions getOptionHolder() {
|
||||||
return owner;
|
return owner;
|
||||||
|
@ -702,25 +625,20 @@ public class OptionReference implements IOption {
|
||||||
return owner;
|
return owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getUserObjects()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getUserObjects() throws BuildException {
|
public String[] getUserObjects() throws BuildException {
|
||||||
if (value == null)
|
if (value == null) {
|
||||||
return option.getDefinedSymbols();
|
return option.getDefinedSymbols();
|
||||||
else if (getValueType() == OBJECTS) {
|
} else if (getValueType() == OBJECTS) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<String> list = (ArrayList<String>)value;
|
ArrayList<String> list = (ArrayList<String>)value;
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
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
|
@Override
|
||||||
public int getValueType() {
|
public int getValueType() {
|
||||||
int optValType;
|
int optValType;
|
||||||
|
@ -731,9 +649,6 @@ public class OptionReference implements IOption {
|
||||||
return optValType;
|
return optValType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* Returns the raw value.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object getValue() {
|
public Object getValue() {
|
||||||
return value;
|
return value;
|
||||||
|
@ -763,11 +678,13 @@ public class OptionReference implements IOption {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setValue(boolean value) throws BuildException {
|
public void setValue(boolean value) throws BuildException {
|
||||||
if (getValueType() == BOOLEAN)
|
if (getValueType() == BOOLEAN) {
|
||||||
this.value = new Boolean(value);
|
this.value = new Boolean(value);
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setValue(String value) throws BuildException {
|
public void setValue(String value) throws BuildException {
|
||||||
|
@ -805,13 +722,11 @@ public class OptionReference implements IOption {
|
||||||
// Just replace what the option reference is holding onto
|
// Just replace what the option reference is holding onto
|
||||||
this.value = new ArrayList<String>(Arrays.asList(value));
|
this.value = new ArrayList<String>(Arrays.asList(value));
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see java.lang.Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String answer = new String();
|
String answer = new String();
|
||||||
|
@ -831,132 +746,82 @@ public class OptionReference implements IOption {
|
||||||
* They should never be called.
|
* They should never be called.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#isExtensionElement()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isExtensionElement() {
|
public boolean isExtensionElement() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* Sets the raw value.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setValue(Object v) {
|
public void setValue(Object v) {
|
||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setValueType()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setValueType(int type) {
|
public void setValueType(int type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* Returns the raw default value.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object getDefaultValue() {
|
public Object getDefaultValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setValue(Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setDefaultValue(Object v) {
|
public void setDefaultValue(Object v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getSuperClass()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IOption getSuperClass() {
|
public IOption getSuperClass() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getResourceFilter()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getResourceFilter() {
|
public int getResourceFilter() {
|
||||||
return FILTER_ALL;
|
return FILTER_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getApplicabilityCalculator()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IOptionApplicability getApplicabilityCalculator() {
|
public IOptionApplicability getApplicabilityCalculator() {
|
||||||
return option.getApplicabilityCalculator();
|
return option.getApplicabilityCalculator();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setResourceFilter(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setResourceFilter(int filter) {
|
public void setResourceFilter(int filter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setBrowseType(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setBrowseType(int type) {
|
public void setBrowseType(int type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setBrowseFilterPath(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setBrowseFilterPath(String path) {
|
public void setBrowseFilterPath(String path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setBrowseFilterExtensions(java.lang.String[])
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setBrowseFilterExtensions(String[] extensions) {
|
public void setBrowseFilterExtensions(String[] extensions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setCategory(org.eclipse.cdt.core.build.managed.IOptionCategory)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setCategory(IOptionCategory category) {
|
public void setCategory(IOptionCategory category) {
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setCommand(String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setCommand(String cmd) {
|
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)) {
|
if (cmd == null || command == null || !cmd.equals(command)) {
|
||||||
command = cmd;
|
command = cmd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setCommandFalse(String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setCommandFalse(String cmd) {
|
public void setCommandFalse(String cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setToolTip(String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setToolTip(String tooltip) {
|
public void setToolTip(String tooltip) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setContextId(String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setContextId(String contextId) {
|
public void setContextId(String contextId) {
|
||||||
}
|
}
|
||||||
|
@ -976,68 +841,41 @@ public class OptionReference implements IOption {
|
||||||
return option.getManagedBuildRevision();
|
return option.getManagedBuildRevision();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueHandlerElement()
|
|
||||||
*/
|
|
||||||
public IConfigurationElement getValueHandlerElement() {
|
public IConfigurationElement getValueHandlerElement() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#setValueHandlerElement(IConfigurationElement)
|
|
||||||
*/
|
|
||||||
public void setValueHandlerElement(IConfigurationElement element) {
|
public void setValueHandlerElement(IConfigurationElement element) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueHandler()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IManagedOptionValueHandler getValueHandler() {
|
public IManagedOptionValueHandler getValueHandler() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.build.managed.IOption#getValueHandlerExtraArgument())
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getValueHandlerExtraArgument() {
|
public String getValueHandlerExtraArgument() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setValueHandlerExtraArgument(String))
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setValueHandlerExtraArgument(String extraArgument) {
|
public void setValueHandlerExtraArgument(String extraArgument) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getFieldEditorId()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getFieldEditorId() {
|
public String getFieldEditorId() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#getFieldEditorExtraArgument()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getFieldEditorExtraArgument() {
|
public String getFieldEditorExtraArgument() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#setFieldEditorExtraArgument(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setFieldEditorExtraArgument(String extraArgument) {
|
public void setFieldEditorExtraArgument(String extraArgument) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOption#isValid()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
return option.isValid();
|
return option.isValid();
|
||||||
|
@ -1083,6 +921,7 @@ public class OptionReference implements IOption {
|
||||||
}
|
}
|
||||||
return ve;
|
return ve;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public ITreeRoot getTreeRoot() {
|
public ITreeRoot getTreeRoot() {
|
||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
resolveReferences();
|
resolveReferences();
|
||||||
|
|
Loading…
Add table
Reference in a new issue