mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bug 491825 - Remove uses of new Boolean and friends
Change-Id: Ie358c8385c278472f3b86851f6fc219007bb9b5c
This commit is contained in:
parent
3dc5c0a138
commit
b91b69775f
37 changed files with 228 additions and 249 deletions
|
@ -1371,13 +1371,13 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
}
|
||||
|
||||
elem = targetElem.createChild(TARGET_STOP_ON_ERROR);
|
||||
elem.setValue(Boolean.valueOf(target.isStopOnError()).toString());
|
||||
elem.setValue(String.valueOf(target.isStopOnError()));
|
||||
|
||||
elem = targetElem.createChild(TARGET_USE_DEFAULT_CMD);
|
||||
elem.setValue(Boolean.valueOf(target.isDefaultBuildCmd()).toString());
|
||||
elem.setValue(String.valueOf(target.isDefaultBuildCmd()));
|
||||
|
||||
elem = targetElem.createChild(TARGET_RUN_ALL_BUILDERS);
|
||||
elem.setValue(Boolean.valueOf(target.runAllBuilders()).toString());
|
||||
elem.setValue(String.valueOf(target.runAllBuilders()));
|
||||
|
||||
return targetElem;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setUseDefaultBuildCmd(boolean on) throws CoreException {
|
||||
putString(USE_DEFAULT_BUILD_CMD, new Boolean(on).toString());
|
||||
putString(USE_DEFAULT_BUILD_CMD, String.valueOf(on));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -212,7 +212,7 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setStopOnError(boolean enabled) throws CoreException {
|
||||
putString(STOP_ON_ERROR, new Boolean(enabled).toString());
|
||||
putString(STOP_ON_ERROR, String.valueOf(enabled));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -286,7 +286,7 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setAutoBuildEnable(boolean enabled) throws CoreException {
|
||||
putString(BUILD_AUTO_ENABLED, new Boolean(enabled).toString());
|
||||
putString(BUILD_AUTO_ENABLED, String.valueOf(enabled));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -296,7 +296,7 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setIncrementalBuildEnable(boolean enabled) throws CoreException {
|
||||
putString(BUILD_INCREMENTAL_ENABLED, new Boolean(enabled).toString());
|
||||
putString(BUILD_INCREMENTAL_ENABLED, String.valueOf(enabled));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -306,7 +306,7 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setFullBuildEnable(boolean enabled) throws CoreException {
|
||||
putString(BUILD_FULL_ENABLED, new Boolean(enabled).toString());
|
||||
putString(BUILD_FULL_ENABLED, String.valueOf(enabled));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -316,7 +316,7 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setCleanBuildEnable(boolean enabled) throws CoreException {
|
||||
putString(BUILD_CLEAN_ENABLED, new Boolean(enabled).toString());
|
||||
putString(BUILD_CLEAN_ENABLED, String.valueOf(enabled));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -327,9 +327,9 @@ public class BuildInfoFactory {
|
|||
@Override
|
||||
public String[] getErrorParsers() {
|
||||
String parsers = getString(ErrorParserManager.PREF_ERROR_PARSER);
|
||||
if (parsers != null && parsers.length() > 0) {
|
||||
if (parsers != null && !parsers.isEmpty()) {
|
||||
StringTokenizer tok = new StringTokenizer(parsers, ";"); //$NON-NLS-1$
|
||||
List<String> list = new ArrayList<String>(tok.countTokens());
|
||||
List<String> list = new ArrayList<>(tok.countTokens());
|
||||
while (tok.hasMoreElements()) {
|
||||
list.add(tok.nextToken());
|
||||
}
|
||||
|
@ -367,15 +367,15 @@ public class BuildInfoFactory {
|
|||
|
||||
@Override
|
||||
public void setAppendEnvironment(boolean append) throws CoreException {
|
||||
putString(BUILD_APPEND_ENVIRONMENT, new Boolean(append).toString());
|
||||
putString(BUILD_APPEND_ENVIRONMENT, String.valueOf(append));
|
||||
}
|
||||
|
||||
public boolean getBoolean(String property) {
|
||||
return Boolean.valueOf(getString(property)).booleanValue();
|
||||
return Boolean.parseBoolean(getString(property));
|
||||
}
|
||||
|
||||
protected Map<String, String> decodeMap(String value) {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (value != null) {
|
||||
StringBuffer envStr = new StringBuffer(value);
|
||||
String escapeChars = "|\\"; //$NON-NLS-1$
|
||||
|
|
|
@ -195,13 +195,13 @@ public class ProjectTargets {
|
|||
}
|
||||
|
||||
elem = targetElem.createChild(TARGET_STOP_ON_ERROR);
|
||||
elem.setValue(new Boolean(target.isStopOnError()).toString());
|
||||
elem.setValue(String.valueOf(target.isStopOnError()));
|
||||
|
||||
elem = targetElem.createChild(TARGET_USE_DEFAULT_CMD);
|
||||
elem.setValue(new Boolean(target.isDefaultBuildCmd()).toString());
|
||||
elem.setValue(String.valueOf(target.isDefaultBuildCmd()));
|
||||
|
||||
elem = targetElem.createChild(TARGET_RUN_ALL_BUILDERS);
|
||||
elem.setValue(new Boolean(target.runAllBuilders()).toString());
|
||||
elem.setValue(String.valueOf(target.runAllBuilders()));
|
||||
|
||||
return targetElem;
|
||||
}
|
||||
|
|
|
@ -251,10 +251,8 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
this.parent = parent;
|
||||
|
||||
superClass = builder.superClass;
|
||||
if (superClass != null) {
|
||||
if (builder.superClassId != null) {
|
||||
superClassId = new String(builder.superClassId);
|
||||
}
|
||||
if (superClass != null && builder.superClassId != null) {
|
||||
superClassId = builder.superClassId;
|
||||
}
|
||||
|
||||
setId(Id);
|
||||
|
@ -268,25 +266,25 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
|
||||
// Copy the remaining attributes
|
||||
if(builder.versionsSupported != null) {
|
||||
versionsSupported = new String(builder.versionsSupported);
|
||||
versionsSupported = builder.versionsSupported;
|
||||
}
|
||||
if(builder.convertToId != null) {
|
||||
convertToId = new String(builder.convertToId);
|
||||
convertToId = builder.convertToId;
|
||||
}
|
||||
if (builder.unusedChildren != null) {
|
||||
unusedChildren = new String(builder.unusedChildren);
|
||||
unusedChildren = builder.unusedChildren;
|
||||
}
|
||||
if (builder.errorParserIds != null) {
|
||||
errorParserIds = new String(builder.errorParserIds);
|
||||
errorParserIds = builder.errorParserIds;
|
||||
}
|
||||
if (builder.isAbstract != null) {
|
||||
isAbstract = new Boolean(builder.isAbstract.booleanValue());
|
||||
isAbstract = builder.isAbstract.booleanValue();
|
||||
}
|
||||
if (builder.command != null) {
|
||||
command = new String(builder.command);
|
||||
command = builder.command;
|
||||
}
|
||||
if (builder.args != null) {
|
||||
args = new String(builder.args);
|
||||
args = builder.args;
|
||||
}
|
||||
autoBuildTarget = builder.autoBuildTarget;
|
||||
autoBuildEnabled = builder.autoBuildEnabled;
|
||||
|
@ -306,8 +304,6 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
if (builder.customBuildProperties != null)
|
||||
customBuildProperties = cloneMap(builder.customBuildProperties);
|
||||
|
||||
|
||||
|
||||
buildFileGeneratorElement = builder.buildFileGeneratorElement;
|
||||
|
||||
if (builder.fileContextBuildMacroValues != null){
|
||||
|
@ -318,7 +314,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
builderVariablePattern = builder.builderVariablePattern;
|
||||
|
||||
if (builder.isVariableCaseSensitive != null)
|
||||
isVariableCaseSensitive = new Boolean(builder.isVariableCaseSensitive.booleanValue());
|
||||
isVariableCaseSensitive = Boolean.valueOf(builder.isVariableCaseSensitive.booleanValue());
|
||||
|
||||
if (builder.reservedMacroNames != null)
|
||||
reservedMacroNames = builder.reservedMacroNames.clone();
|
||||
|
@ -480,7 +476,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
// get the 'isVariableCaseSensitive' attribute
|
||||
String isCS = element.getAttribute(IS_VARIABLE_CASE_SENSITIVE);
|
||||
if(isCS != null)
|
||||
isVariableCaseSensitive = new Boolean("true".equals(isCS)); //$NON-NLS-1$
|
||||
isVariableCaseSensitive = Boolean.valueOf("true".equals(isCS)); //$NON-NLS-1$
|
||||
|
||||
// get the reserved macro names
|
||||
String reservedNames = element.getAttribute(RESERVED_MACRO_NAMES);
|
||||
|
@ -499,7 +495,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
// isAbstract
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// command
|
||||
|
@ -708,7 +704,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
if (element.getAttribute(IProjectType.IS_ABSTRACT) != null) {
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -986,21 +982,21 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
|
||||
if(getAutoBuildTargetAttribute() != null)
|
||||
element.setAttribute(ATTRIBUTE_TARGET_AUTO, getAutoBuildTargetAttribute());
|
||||
element.setAttribute(ATTRIBUTE_AUTO_ENABLED, Boolean.valueOf(isAutoBuildEnable()).toString());
|
||||
element.setAttribute(ATTRIBUTE_AUTO_ENABLED, String.valueOf(isAutoBuildEnable()));
|
||||
if(getIncrementalBuildTargetAttribute() != null)
|
||||
element.setAttribute(ATTRIBUTE_TARGET_INCREMENTAL, getIncrementalBuildTargetAttribute());
|
||||
element.setAttribute(ATTRIBUTE_INCREMENTAL_ENABLED, Boolean.valueOf(isIncrementalBuildEnabled()).toString());
|
||||
element.setAttribute(ATTRIBUTE_INCREMENTAL_ENABLED, String.valueOf(isIncrementalBuildEnabled()));
|
||||
if(getCleanBuildTargetAttribute() != null)
|
||||
element.setAttribute(ATTRIBUTE_TARGET_CLEAN, getCleanBuildTargetAttribute());
|
||||
element.setAttribute(ATTRIBUTE_CLEAN_ENABLED, Boolean.valueOf(isCleanBuildEnabled()).toString());
|
||||
element.setAttribute(ATTRIBUTE_MANAGED_BUILD_ON, Boolean.valueOf(isManagedBuildOn()).toString());
|
||||
element.setAttribute(ATTRIBUTE_KEEP_ENV, Boolean.valueOf(keepEnvironmentVariablesInBuildfile()).toString());
|
||||
element.setAttribute(ATTRIBUTE_SUPORTS_MANAGED_BUILD, Boolean.valueOf(supportsBuild(true)).toString());
|
||||
element.setAttribute(ATTRIBUTE_CLEAN_ENABLED, String.valueOf(isCleanBuildEnabled()));
|
||||
element.setAttribute(ATTRIBUTE_MANAGED_BUILD_ON, String.valueOf(isManagedBuildOn()));
|
||||
element.setAttribute(ATTRIBUTE_KEEP_ENV, String.valueOf(keepEnvironmentVariablesInBuildfile()));
|
||||
element.setAttribute(ATTRIBUTE_SUPORTS_MANAGED_BUILD, String.valueOf(supportsBuild(true)));
|
||||
if(customizedErrorParserIds != null)
|
||||
element.setAttribute(ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS, CDataUtil.arrayToString(customizedErrorParserIds, ";")); //$NON-NLS-1$
|
||||
if(customizedEnvironment != null)
|
||||
element.setAttribute(ATTRIBUTE_ENVIRONMENT, MapStorageElement.encodeMap(customizedEnvironment));
|
||||
element.setAttribute(ATTRIBUTE_APPEND_ENVIRONMENT, Boolean.valueOf(appendEnvironment()).toString());
|
||||
element.setAttribute(ATTRIBUTE_APPEND_ENVIRONMENT, String.valueOf(appendEnvironment()));
|
||||
if(getBuildPathAttribute() != null)
|
||||
element.setAttribute(ATTRIBUTE_BUILD_PATH, getBuildPathAttribute());
|
||||
if(customBuildProperties != null)
|
||||
|
@ -1008,7 +1004,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
|
||||
if (getIgnoreErrCmdAttribute() != null)
|
||||
element.setAttribute(ATTRIBUTE_IGNORE_ERR_CMD, getIgnoreErrCmdAttribute());
|
||||
element.setAttribute(ATTRIBUTE_STOP_ON_ERR, Boolean.valueOf(isStopOnError()).toString());
|
||||
element.setAttribute(ATTRIBUTE_STOP_ON_ERR, String.valueOf(isStopOnError()));
|
||||
|
||||
if (parallelBuildCmd != null)
|
||||
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD, parallelBuildCmd);
|
||||
|
@ -1332,7 +1328,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
|
||||
@Override
|
||||
public void setIsAbstract(boolean b) {
|
||||
isAbstract = new Boolean(b);
|
||||
isAbstract = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
}
|
||||
|
||||
|
@ -2152,9 +2148,9 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
} else if(BuilderFactory.BUILD_LOCATION.equals(name)){
|
||||
result = getBuildPathAttribute();
|
||||
} else if(BuilderFactory.STOP_ON_ERROR.equals(name)){
|
||||
result = Boolean.valueOf(isStopOnError()).toString();
|
||||
result = String.valueOf(isStopOnError());
|
||||
} else if(BuilderFactory.USE_DEFAULT_BUILD_CMD.equals(name)){
|
||||
result = Boolean.valueOf(isDefaultBuildCmd()).toString();
|
||||
result = String.valueOf(isDefaultBuildCmd());
|
||||
} else if(BuilderFactory.BUILD_TARGET_AUTO.equals(name)){
|
||||
result = getAutoBuildTargetAttribute();
|
||||
} else if(BuilderFactory.BUILD_TARGET_INCREMENTAL.equals(name)){
|
||||
|
@ -2164,20 +2160,20 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
} else if(BuilderFactory.BUILD_TARGET_CLEAN.equals(name)){
|
||||
result = getCleanBuildTargetAttribute();
|
||||
} else if(BuilderFactory.BUILD_FULL_ENABLED.equals(name)){
|
||||
result = Boolean.valueOf(isFullBuildEnabled()).toString();
|
||||
result = String.valueOf(isFullBuildEnabled());
|
||||
} else if(BuilderFactory.BUILD_CLEAN_ENABLED.equals(name)){
|
||||
result = Boolean.valueOf(isCleanBuildEnabled()).toString();
|
||||
result = String.valueOf(isCleanBuildEnabled());
|
||||
} else if(BuilderFactory.BUILD_INCREMENTAL_ENABLED.equals(name)){
|
||||
result = Boolean.valueOf(isIncrementalBuildEnabled()).toString();
|
||||
result = String.valueOf(isIncrementalBuildEnabled());
|
||||
} else if(BuilderFactory.BUILD_AUTO_ENABLED.equals(name)){
|
||||
result = Boolean.valueOf(isAutoBuildEnable()).toString();
|
||||
result = String.valueOf(isAutoBuildEnable());
|
||||
} else if(BuilderFactory.BUILD_ARGUMENTS.equals(name)){
|
||||
result = getArguments();
|
||||
} else if(BuilderFactory.ENVIRONMENT.equals(name)){
|
||||
result = customizedEnvironment != null ?
|
||||
MapStorageElement.encodeMap(customizedEnvironment) : null;
|
||||
} else if(BuilderFactory.BUILD_APPEND_ENVIRONMENT.equals(name)){
|
||||
result = Boolean.valueOf(appendEnvironment()).toString();
|
||||
result = String.valueOf(appendEnvironment());
|
||||
} else if(customBuildProperties != null){
|
||||
result = customBuildProperties.get(name);
|
||||
}
|
||||
|
|
|
@ -95,15 +95,15 @@ public class InputOrder implements IInputOrder {
|
|||
|
||||
// Copy the remaining attributes
|
||||
if (inputOrder.fPath != null) {
|
||||
fPath = new String(inputOrder.fPath);
|
||||
fPath = inputOrder.fPath;
|
||||
}
|
||||
|
||||
if (inputOrder.fOrder != null) {
|
||||
fOrder = new String(inputOrder.fOrder);
|
||||
fOrder = inputOrder.fOrder;
|
||||
}
|
||||
|
||||
if (inputOrder.fExcluded != null) {
|
||||
fExcluded = new Boolean(inputOrder.fExcluded.booleanValue());
|
||||
fExcluded = inputOrder.fExcluded.booleanValue();
|
||||
}
|
||||
|
||||
setDirty(true);
|
||||
|
@ -131,7 +131,7 @@ public class InputOrder implements IInputOrder {
|
|||
// excluded
|
||||
String isEx = element.getAttribute(IInputOrder.EXCLUDED);
|
||||
if (isEx != null){
|
||||
fExcluded = new Boolean("true".equals(isEx)); //$NON-NLS-1$
|
||||
fExcluded = Boolean.parseBoolean(isEx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,6 @@ public class InputOrder implements IInputOrder {
|
|||
* @param element An XML element containing the InputOrder information
|
||||
*/
|
||||
protected void loadFromProject(ICStorageElement element) {
|
||||
|
||||
// path
|
||||
if (element.getAttribute(IInputOrder.PATH) != null) {
|
||||
fPath = SafeStringInterner.safeIntern(element.getAttribute(IInputOrder.PATH));
|
||||
|
@ -157,7 +156,7 @@ public class InputOrder implements IInputOrder {
|
|||
if (element.getAttribute(IInputOrder.EXCLUDED) != null) {
|
||||
String isEx = element.getAttribute(IInputOrder.EXCLUDED);
|
||||
if (isEx != null){
|
||||
fExcluded = new Boolean("true".equals(isEx)); //$NON-NLS-1$
|
||||
fExcluded = Boolean.parseBoolean(isEx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +165,6 @@ public class InputOrder implements IInputOrder {
|
|||
* Persist the InputOrder to the project file.
|
||||
*/
|
||||
public void serialize(ICStorageElement element) {
|
||||
|
||||
if (fPath != null) {
|
||||
element.setAttribute(IInputOrder.PATH, fPath);
|
||||
}
|
||||
|
@ -255,7 +253,7 @@ public class InputOrder implements IInputOrder {
|
|||
@Override
|
||||
public void setExcluded(boolean b) {
|
||||
if (fExcluded == null || !(b == fExcluded.booleanValue())) {
|
||||
fExcluded = new Boolean(b);
|
||||
fExcluded = b;
|
||||
setDirty(true);
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
|
|
@ -215,10 +215,8 @@ public class InputType extends BuildObject implements IInputType {
|
|||
public InputType(ITool parent, String Id, String name, InputType inputType) {
|
||||
this.parent = parent;
|
||||
superClass = inputType.superClass;
|
||||
if (superClass != null) {
|
||||
if (inputType.superClassId != null) {
|
||||
superClassId = new String(inputType.superClassId);
|
||||
}
|
||||
if (superClass != null && inputType.superClassId != null) {
|
||||
superClassId = inputType.superClassId;
|
||||
}
|
||||
setId(Id);
|
||||
setName(name);
|
||||
|
@ -248,26 +246,26 @@ public class InputType extends BuildObject implements IInputType {
|
|||
}
|
||||
|
||||
if (inputType.dependencyContentTypeId != null) {
|
||||
dependencyContentTypeId = new String(inputType.dependencyContentTypeId);
|
||||
dependencyContentTypeId = inputType.dependencyContentTypeId;
|
||||
}
|
||||
dependencyContentType = inputType.dependencyContentType;
|
||||
if (inputType.dependencyExtensions != null) {
|
||||
dependencyExtensions = new ArrayList<String>(inputType.dependencyExtensions);
|
||||
dependencyExtensions = new ArrayList<>(inputType.dependencyExtensions);
|
||||
}
|
||||
if (inputType.optionId != null) {
|
||||
optionId = new String(inputType.optionId);
|
||||
optionId = inputType.optionId;
|
||||
}
|
||||
if (inputType.assignToOptionId != null) {
|
||||
assignToOptionId = new String(inputType.assignToOptionId);
|
||||
assignToOptionId = inputType.assignToOptionId;
|
||||
}
|
||||
if (inputType.buildVariable != null) {
|
||||
buildVariable = new String(inputType.buildVariable);
|
||||
buildVariable = inputType.buildVariable;
|
||||
}
|
||||
if (inputType.multipleOfType != null) {
|
||||
multipleOfType = new Boolean(inputType.multipleOfType.booleanValue());
|
||||
multipleOfType = inputType.multipleOfType.booleanValue();
|
||||
}
|
||||
if (inputType.primaryInput != null) {
|
||||
primaryInput = new Boolean(inputType.primaryInput.booleanValue());
|
||||
primaryInput = inputType.primaryInput.booleanValue();
|
||||
}
|
||||
dependencyGeneratorElement = inputType.dependencyGeneratorElement;
|
||||
dependencyGenerator = inputType.dependencyGenerator;
|
||||
|
@ -399,13 +397,13 @@ public class InputType extends BuildObject implements IInputType {
|
|||
// multipleOfType
|
||||
String isMOT = element.getAttribute(IInputType.MULTIPLE_OF_TYPE);
|
||||
if (isMOT != null){
|
||||
multipleOfType = new Boolean("true".equals(isMOT)); //$NON-NLS-1$
|
||||
multipleOfType = Boolean.valueOf("true".equals(isMOT)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// primaryInput
|
||||
String isPI = element.getAttribute(IInputType.PRIMARY_INPUT);
|
||||
if (isPI != null){
|
||||
primaryInput = new Boolean("true".equals(isPI)); //$NON-NLS-1$
|
||||
primaryInput = Boolean.valueOf("true".equals(isPI)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// buildVariable
|
||||
|
@ -435,7 +433,6 @@ public class InputType extends BuildObject implements IInputType {
|
|||
* @param element An XML element containing the InputType information
|
||||
*/
|
||||
protected boolean loadFromProject(ICStorageElement element) {
|
||||
|
||||
// id
|
||||
// note: IDs are unique so no benefit to intern them
|
||||
setId(element.getAttribute(IBuildObject.ID));
|
||||
|
@ -516,7 +513,7 @@ public class InputType extends BuildObject implements IInputType {
|
|||
}
|
||||
|
||||
if (headerContentTypeIds != null){
|
||||
List<IContentType> types = new ArrayList<IContentType>();
|
||||
List<IContentType> types = new ArrayList<>();
|
||||
for (String headerContentTypeId : headerContentTypeIds) {
|
||||
IContentType type = manager.getContentType(headerContentTypeId);
|
||||
if(type != null)
|
||||
|
@ -580,7 +577,7 @@ public class InputType extends BuildObject implements IInputType {
|
|||
if (element.getAttribute(IInputType.MULTIPLE_OF_TYPE) != null) {
|
||||
String isMOT = element.getAttribute(IInputType.MULTIPLE_OF_TYPE);
|
||||
if (isMOT != null){
|
||||
multipleOfType = new Boolean("true".equals(isMOT)); //$NON-NLS-1$
|
||||
multipleOfType = Boolean.valueOf("true".equals(isMOT)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -588,7 +585,7 @@ public class InputType extends BuildObject implements IInputType {
|
|||
if (element.getAttribute(IInputType.PRIMARY_INPUT) != null) {
|
||||
String isPI = element.getAttribute(IInputType.PRIMARY_INPUT);
|
||||
if (isPI != null){
|
||||
primaryInput = new Boolean("true".equals(isPI)); //$NON-NLS-1$
|
||||
primaryInput = Boolean.valueOf("true".equals(isPI)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -779,7 +776,8 @@ public class InputType extends BuildObject implements IInputType {
|
|||
@Override
|
||||
public void removeInputOrder(String path) {
|
||||
IInputOrder order = getInputOrder(path);
|
||||
if (order != null) removeInputOrder(order);
|
||||
if (order != null)
|
||||
removeInputOrder(order);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -838,7 +836,8 @@ public class InputType extends BuildObject implements IInputType {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (match) return ai;
|
||||
if (match)
|
||||
return ai;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -1159,7 +1158,7 @@ public class InputType extends BuildObject implements IInputType {
|
|||
@Override
|
||||
public void setMultipleOfType(boolean b) {
|
||||
if (multipleOfType == null || !(b == multipleOfType.booleanValue())) {
|
||||
multipleOfType = new Boolean(b);
|
||||
multipleOfType = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
@ -1186,7 +1185,7 @@ public class InputType extends BuildObject implements IInputType {
|
|||
@Override
|
||||
public void setPrimaryInput(boolean b) {
|
||||
if (primaryInput == null || !(b == primaryInput.booleanValue())) {
|
||||
primaryInput = new Boolean(b);
|
||||
primaryInput = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ public abstract class MultiResourceInfo extends MultiItemsHolder implements
|
|||
@Override
|
||||
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
||||
throws BuildException {
|
||||
return setOption(parent, option, new Boolean(value), MODE_BOOL);
|
||||
return setOption(parent, option, Boolean.valueOf(value), MODE_BOOL);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -202,7 +202,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
unusedChildren = new String(option.unusedChildren);
|
||||
}
|
||||
if (option.isAbstract != null) {
|
||||
isAbstract = new Boolean(option.isAbstract.booleanValue());
|
||||
isAbstract = Boolean.valueOf(option.isAbstract.booleanValue());
|
||||
}
|
||||
if (option.command != null) {
|
||||
command = new String(option.command);
|
||||
|
@ -211,7 +211,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
commandFalse = new String(option.commandFalse);
|
||||
}
|
||||
if (option.isForScannerDiscovery != null) {
|
||||
isForScannerDiscovery = new Boolean(option.isForScannerDiscovery.booleanValue());
|
||||
isForScannerDiscovery = Boolean.valueOf(option.isForScannerDiscovery.booleanValue());
|
||||
}
|
||||
if (option.tip != null) {
|
||||
tip = new String(option.tip);
|
||||
|
@ -255,10 +255,10 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
switch (vType.intValue()) {
|
||||
case BOOLEAN:
|
||||
if (option.value != null) {
|
||||
value = new Boolean(((Boolean)option.value).booleanValue());
|
||||
value = Boolean.valueOf(((Boolean)option.value).booleanValue());
|
||||
}
|
||||
if (option.defaultValue != null) {
|
||||
defaultValue = new Boolean(((Boolean)option.defaultValue).booleanValue());
|
||||
defaultValue = Boolean.valueOf(((Boolean)option.defaultValue).booleanValue());
|
||||
}
|
||||
break;
|
||||
case STRING:
|
||||
|
@ -364,7 +364,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
// isAbstract
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get the command defined for the option
|
||||
|
@ -382,7 +382,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
// isForScannerDiscovery
|
||||
String isForSD = element.getAttribute(USE_BY_SCANNER_DISCOVERY);
|
||||
if (isForSD != null){
|
||||
isForScannerDiscovery = new Boolean("true".equals(isForSD)); //$NON-NLS-1$
|
||||
isForScannerDiscovery = Boolean.valueOf("true".equals(isForSD)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get the tooltip for the option
|
||||
|
@ -506,7 +506,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
if (element.getAttribute(IProjectType.IS_ABSTRACT) != null) {
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -524,7 +524,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
if (element.getAttribute(USE_BY_SCANNER_DISCOVERY) != null) {
|
||||
String isForSD = element.getAttribute(USE_BY_SCANNER_DISCOVERY);
|
||||
if (isForSD != null){
|
||||
isForScannerDiscovery = new Boolean("true".equals(isForSD)); //$NON-NLS-1$
|
||||
isForScannerDiscovery = Boolean.valueOf("true".equals(isForSD)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -551,10 +551,10 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
case BOOLEAN:
|
||||
// Convert the string to a boolean
|
||||
if (element.getAttribute(VALUE) != null) {
|
||||
value = new Boolean(element.getAttribute(VALUE));
|
||||
value = Boolean.valueOf(element.getAttribute(VALUE));
|
||||
}
|
||||
if (element.getAttribute(DEFAULT_VALUE) != null) {
|
||||
defaultValue = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
defaultValue = Boolean.valueOf(element.getAttribute(DEFAULT_VALUE));
|
||||
}
|
||||
break;
|
||||
case STRING:
|
||||
|
@ -596,7 +596,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
}
|
||||
getNameMap().put(optId, SafeStringInterner.safeIntern(configElement.getAttribute(NAME)));
|
||||
if (configElement.getAttribute(IS_DEFAULT) != null) {
|
||||
Boolean isDefault = new Boolean(configElement.getAttribute(IS_DEFAULT));
|
||||
Boolean isDefault = Boolean.valueOf(configElement.getAttribute(IS_DEFAULT));
|
||||
if (isDefault.booleanValue()) {
|
||||
defaultValue = optId;
|
||||
}
|
||||
|
@ -1277,7 +1277,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
@Override
|
||||
public boolean isForScannerDiscovery() {
|
||||
if (isForScannerDiscovery == null) {
|
||||
isForScannerDiscovery = new Boolean(superClass != null && superClass.isForScannerDiscovery());
|
||||
isForScannerDiscovery = Boolean.valueOf(superClass != null && superClass.isForScannerDiscovery());
|
||||
}
|
||||
return isForScannerDiscovery;
|
||||
}
|
||||
|
@ -1601,7 +1601,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
}
|
||||
switch (valType) {
|
||||
case BOOLEAN:
|
||||
val = new Boolean(false);
|
||||
val = Boolean.valueOf(false);
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
|
@ -1662,7 +1662,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
}
|
||||
switch (valType) {
|
||||
case BOOLEAN:
|
||||
val = new Boolean(false);
|
||||
val = Boolean.valueOf(false);
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
|
@ -1906,7 +1906,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
@Override
|
||||
public void setValue(boolean value) throws BuildException {
|
||||
if (/*!isExtensionElement() && */getValueType() == BOOLEAN){
|
||||
this.value = new Boolean(value);
|
||||
this.value = Boolean.valueOf(value);
|
||||
} else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -2196,11 +2196,11 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
// Convert the string to a boolean
|
||||
String val = element.getAttribute(VALUE);
|
||||
if (val != null) {
|
||||
value = new Boolean(val);
|
||||
value = Boolean.valueOf(val);
|
||||
}
|
||||
val = element.getAttribute(DEFAULT_VALUE);
|
||||
if (val != null) {
|
||||
defaultValue = new Boolean(val);
|
||||
defaultValue = Boolean.valueOf(val);
|
||||
}
|
||||
break;
|
||||
case STRING:
|
||||
|
@ -2226,7 +2226,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
applicableValuesList.add(optId);
|
||||
getCommandMap().put(optId, SafeStringInterner.safeIntern(enumElements[i].getAttribute(COMMAND)));
|
||||
getNameMap().put(optId, SafeStringInterner.safeIntern(enumElements[i].getAttribute(NAME)));
|
||||
Boolean isDefault = new Boolean(enumElements[i].getAttribute(IS_DEFAULT));
|
||||
Boolean isDefault = Boolean.valueOf(enumElements[i].getAttribute(IS_DEFAULT));
|
||||
if (isDefault.booleanValue()) {
|
||||
defaultValue = optId;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class OptionReference implements IOption {
|
|||
// value
|
||||
switch (optValType) {
|
||||
case BOOLEAN:
|
||||
value = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
value = Boolean.valueOf(element.getAttribute(DEFAULT_VALUE));
|
||||
break;
|
||||
case STRING:
|
||||
case TREE:
|
||||
|
@ -143,7 +143,7 @@ public class OptionReference implements IOption {
|
|||
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));
|
||||
Boolean isBuiltIn = Boolean.valueOf(((Element)node).getAttribute(LIST_ITEM_BUILTIN));
|
||||
if (isBuiltIn.booleanValue()) {
|
||||
getBuiltInList().add(((Element)node).getAttribute(LIST_ITEM_VALUE));
|
||||
} else {
|
||||
|
@ -185,7 +185,7 @@ public class OptionReference implements IOption {
|
|||
// value
|
||||
switch (optValType) {
|
||||
case BOOLEAN:
|
||||
value = new Boolean(element.getAttribute(DEFAULT_VALUE));
|
||||
value = Boolean.valueOf(element.getAttribute(DEFAULT_VALUE));
|
||||
break;
|
||||
case STRING:
|
||||
value = element.getAttribute(DEFAULT_VALUE);
|
||||
|
@ -215,7 +215,7 @@ public class OptionReference implements IOption {
|
|||
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));
|
||||
Boolean isBuiltIn = Boolean.valueOf(valueElement.getAttribute(LIST_ITEM_BUILTIN));
|
||||
if (isBuiltIn.booleanValue()) {
|
||||
getBuiltInList().add(SafeStringInterner.safeIntern(valueElement.getAttribute(LIST_ITEM_VALUE)));
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ public class OptionReference implements IOption {
|
|||
@Override
|
||||
public void setValue(boolean value) throws BuildException {
|
||||
if (getValueType() == BOOLEAN) {
|
||||
this.value = new Boolean(value);
|
||||
this.value = Boolean.valueOf(value);
|
||||
}
|
||||
else {
|
||||
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||
|
|
|
@ -172,14 +172,14 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
buildVariable = new String(outputType.buildVariable);
|
||||
}
|
||||
if (outputType.multipleOfType != null) {
|
||||
multipleOfType = new Boolean(outputType.multipleOfType.booleanValue());
|
||||
multipleOfType = Boolean.valueOf(outputType.multipleOfType.booleanValue());
|
||||
}
|
||||
if (outputType.primaryInputTypeId != null) {
|
||||
primaryInputTypeId = new String(outputType.primaryInputTypeId);
|
||||
}
|
||||
primaryInputType = outputType.primaryInputType;
|
||||
if (outputType.primaryOutput != null) {
|
||||
primaryOutput = new Boolean(outputType.primaryOutput.booleanValue());
|
||||
primaryOutput = Boolean.valueOf(outputType.primaryOutput.booleanValue());
|
||||
}
|
||||
if (outputType.outputPrefix != null) {
|
||||
outputPrefix = new String(outputType.outputPrefix);
|
||||
|
@ -237,7 +237,7 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
// multipleOfType
|
||||
String isMOT = element.getAttribute(IOutputType.MULTIPLE_OF_TYPE);
|
||||
if (isMOT != null){
|
||||
multipleOfType = new Boolean("true".equals(isMOT)); //$NON-NLS-1$
|
||||
multipleOfType = Boolean.valueOf("true".equals(isMOT)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// primaryInputType
|
||||
|
@ -246,7 +246,7 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
// primaryOutput
|
||||
String isPO = element.getAttribute(IOutputType.PRIMARY_OUTPUT);
|
||||
if (isPO != null){
|
||||
primaryOutput = new Boolean("true".equals(isPO)); //$NON-NLS-1$
|
||||
primaryOutput = Boolean.valueOf("true".equals(isPO)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// outputPrefix
|
||||
|
@ -312,7 +312,7 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
if (element.getAttribute(IOutputType.MULTIPLE_OF_TYPE) != null) {
|
||||
String isMOT = element.getAttribute(IOutputType.MULTIPLE_OF_TYPE);
|
||||
if (isMOT != null){
|
||||
multipleOfType = new Boolean("true".equals(isMOT)); //$NON-NLS-1$
|
||||
multipleOfType = Boolean.valueOf("true".equals(isMOT)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
if (element.getAttribute(IOutputType.PRIMARY_OUTPUT) != null) {
|
||||
String isPO = element.getAttribute(IOutputType.PRIMARY_OUTPUT);
|
||||
if (isPO != null){
|
||||
primaryOutput = new Boolean("true".equals(isPO)); //$NON-NLS-1$
|
||||
primaryOutput = Boolean.valueOf("true".equals(isPO)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
@Override
|
||||
public void setMultipleOfType(boolean b) {
|
||||
if (multipleOfType == null || !(b == multipleOfType.booleanValue())) {
|
||||
multipleOfType = new Boolean(b);
|
||||
multipleOfType = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
@ -820,7 +820,7 @@ public class OutputType extends BuildObject implements IOutputType {
|
|||
@Override
|
||||
public void setPrimaryOutput(boolean b) {
|
||||
if (primaryOutput == null || !(b == primaryOutput.booleanValue())) {
|
||||
primaryOutput = new Boolean(b);
|
||||
primaryOutput = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
setRebuildState(true);
|
||||
}
|
||||
|
|
|
@ -187,13 +187,13 @@ public class ProjectType extends BuildObject implements IProjectType, IBuildProp
|
|||
// isAbstract
|
||||
String isAbs = element.getAttribute(IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Is this a test project type
|
||||
String isTestStr = element.getAttribute(IS_TEST);
|
||||
if (isTestStr != null){
|
||||
isTest = new Boolean("true".equals(isTestStr)); //$NON-NLS-1$
|
||||
isTest = Boolean.valueOf("true".equals(isTestStr)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Store the configuration element IFF there is a configuration name provider defined
|
||||
|
@ -382,14 +382,14 @@ public class ProjectType extends BuildObject implements IProjectType, IBuildProp
|
|||
*/
|
||||
@Override
|
||||
public void setIsAbstract(boolean b) {
|
||||
isAbstract = new Boolean(b);
|
||||
isAbstract = Boolean.valueOf(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the isTest attribute
|
||||
*/
|
||||
public void setIsTest(boolean b) {
|
||||
isTest = new Boolean(b);
|
||||
isTest = Boolean.valueOf(b);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -336,7 +336,7 @@ public abstract class ResourceInfo extends BuildObject implements IResourceInfo
|
|||
propagate(parent, option,
|
||||
(oldVal ? Boolean.TRUE : Boolean.FALSE),
|
||||
(value ? Boolean.TRUE : Boolean.FALSE));
|
||||
NotificationManager.getInstance().optionChanged(this, parent, option, new Boolean(oldVal));
|
||||
NotificationManager.getInstance().optionChanged(this, parent, option, Boolean.valueOf(oldVal));
|
||||
}
|
||||
return retOpt;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
errorParserIds = new String(targetPlatform.errorParserIds);
|
||||
}
|
||||
if (targetPlatform.isAbstract != null) {
|
||||
isAbstract = new Boolean(targetPlatform.isAbstract.booleanValue());
|
||||
isAbstract = Boolean.valueOf(targetPlatform.isAbstract.booleanValue());
|
||||
}
|
||||
if (targetPlatform.osList != null) {
|
||||
osList = new ArrayList<String>(targetPlatform.osList);
|
||||
|
@ -199,7 +199,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
// isAbstract
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get the comma-separated list of valid OS
|
||||
|
@ -267,7 +267,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
if (element.getAttribute(IProjectType.IS_ABSTRACT) != null) {
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
*/
|
||||
@Override
|
||||
public void setIsAbstract(boolean b) {
|
||||
isAbstract = new Boolean(b);
|
||||
isAbstract = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
errorParserIds = new String(tool.errorParserIds);
|
||||
}
|
||||
if (tool.isAbstract != null) {
|
||||
isAbstract = new Boolean(tool.isAbstract.booleanValue());
|
||||
isAbstract = Boolean.valueOf(tool.isAbstract.booleanValue());
|
||||
}
|
||||
if (tool.command != null) {
|
||||
command = new String(tool.command);
|
||||
|
@ -435,10 +435,10 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
outputPrefix = new String(tool.outputPrefix);
|
||||
}
|
||||
if (tool.advancedInputCategory != null) {
|
||||
advancedInputCategory = new Boolean(tool.advancedInputCategory.booleanValue());
|
||||
advancedInputCategory = Boolean.valueOf(tool.advancedInputCategory.booleanValue());
|
||||
}
|
||||
if (tool.customBuildStep != null) {
|
||||
customBuildStep = new Boolean(tool.customBuildStep.booleanValue());
|
||||
customBuildStep = Boolean.valueOf(tool.customBuildStep.booleanValue());
|
||||
}
|
||||
if (tool.announcement != null) {
|
||||
announcement = new String(tool.announcement);
|
||||
|
@ -701,7 +701,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
// isAbstract
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get the semicolon separated list of IDs of the error parsers
|
||||
|
@ -757,13 +757,13 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
// Get advancedInputCategory
|
||||
String advInput = element.getAttribute(ITool.ADVANCED_INPUT_CATEGORY);
|
||||
if (advInput != null){
|
||||
advancedInputCategory = new Boolean("true".equals(advInput)); //$NON-NLS-1$
|
||||
advancedInputCategory = Boolean.valueOf("true".equals(advInput)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get customBuildStep
|
||||
String cbs = element.getAttribute(ITool.CUSTOM_BUILD_STEP);
|
||||
if (cbs != null){
|
||||
customBuildStep = new Boolean("true".equals(cbs)); //$NON-NLS-1$
|
||||
customBuildStep = Boolean.valueOf("true".equals(cbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get the announcement text
|
||||
|
@ -842,7 +842,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
if (element.getAttribute(IProjectType.IS_ABSTRACT) != null) {
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -928,7 +928,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
if (element.getAttribute(ITool.ADVANCED_INPUT_CATEGORY) != null) {
|
||||
String advInput = element.getAttribute(ITool.ADVANCED_INPUT_CATEGORY);
|
||||
if (advInput != null){
|
||||
advancedInputCategory = new Boolean("true".equals(advInput)); //$NON-NLS-1$
|
||||
advancedInputCategory = Boolean.valueOf("true".equals(advInput)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -936,7 +936,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
if (element.getAttribute(ITool.CUSTOM_BUILD_STEP) != null) {
|
||||
String cbs = element.getAttribute(ITool.CUSTOM_BUILD_STEP);
|
||||
if (cbs != null){
|
||||
customBuildStep = new Boolean("true".equals(cbs)); //$NON-NLS-1$
|
||||
customBuildStep = Boolean.valueOf("true".equals(cbs)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1673,7 +1673,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
*/
|
||||
@Override
|
||||
public void setIsAbstract(boolean b) {
|
||||
isAbstract = new Boolean(b);
|
||||
isAbstract = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
}
|
||||
|
||||
|
@ -2530,7 +2530,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
@Override
|
||||
public void setAdvancedInputCategory(boolean b) {
|
||||
if (advancedInputCategory == null || !(b == advancedInputCategory.booleanValue())) {
|
||||
advancedInputCategory = new Boolean(b);
|
||||
advancedInputCategory = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
}
|
||||
}
|
||||
|
@ -2541,7 +2541,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
@Override
|
||||
public void setCustomBuildStep(boolean b) {
|
||||
if (customBuildStep == null || !(b == customBuildStep.booleanValue())) {
|
||||
customBuildStep = new Boolean(b);
|
||||
customBuildStep = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
secondaryOutputIds = new String(toolChain.secondaryOutputIds);
|
||||
}
|
||||
if (toolChain.isAbstract != null) {
|
||||
isAbstract = new Boolean(toolChain.isAbstract.booleanValue());
|
||||
isAbstract = Boolean.valueOf(toolChain.isAbstract.booleanValue());
|
||||
}
|
||||
if (toolChain.scannerConfigDiscoveryProfileId != null) {
|
||||
scannerConfigDiscoveryProfileId = new String(toolChain.scannerConfigDiscoveryProfileId);
|
||||
|
@ -545,7 +545,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
// isAbstract
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Get the semicolon separated list of IDs of the error parsers
|
||||
|
@ -665,7 +665,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
if (element.getAttribute(IProjectType.IS_ABSTRACT) != null) {
|
||||
String isAbs = element.getAttribute(IProjectType.IS_ABSTRACT);
|
||||
if (isAbs != null){
|
||||
isAbstract = new Boolean("true".equals(isAbs)); //$NON-NLS-1$
|
||||
isAbstract = Boolean.valueOf("true".equals(isAbs)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1390,7 +1390,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
|
||||
@Override
|
||||
public void setIsAbstract(boolean b) {
|
||||
isAbstract = new Boolean(b);
|
||||
isAbstract = Boolean.valueOf(b);
|
||||
setDirty(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ public class DefaultGCCDependencyCalculator2Commands implements
|
|||
new FileContextData(sourceLocation, outputLocation,
|
||||
null, tool)).length > 0;
|
||||
|
||||
if (needExplicitRuleForFile) genericCommands = new Boolean(false);
|
||||
if (needExplicitRuleForFile) genericCommands = Boolean.valueOf(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -156,7 +156,7 @@ public class DefaultGCCDependencyCalculator2Commands implements
|
|||
*/
|
||||
@Override
|
||||
public boolean areCommandsGeneric() {
|
||||
if (genericCommands == null) genericCommands = new Boolean(true);
|
||||
if (genericCommands == null) genericCommands = Boolean.valueOf(true);
|
||||
return genericCommands.booleanValue();
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ public class DefaultGCCDependencyCalculatorPreBuildCommands implements IManagedD
|
|||
new FileContextData(sourceLocation, outputLocation,
|
||||
null, tool)).length > 0;
|
||||
|
||||
if (needExplicitRuleForFile) genericCommands = new Boolean(false);
|
||||
if (needExplicitRuleForFile) genericCommands = Boolean.valueOf(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -158,14 +158,14 @@ public class DefaultGCCDependencyCalculatorPreBuildCommands implements IManagedD
|
|||
if (genericCommands != null) return genericCommands.booleanValue();
|
||||
// If the context is a Configuration, yes
|
||||
if (buildContext instanceof IConfiguration || buildContext instanceof IFolderInfo) {
|
||||
genericCommands = new Boolean(true);
|
||||
genericCommands = Boolean.valueOf(true);
|
||||
return true;
|
||||
}
|
||||
// If the context is a Resource Configuration, determine if it overrides any
|
||||
// of its parent configuration's options that would affect dependency file
|
||||
// generation.
|
||||
// TODO
|
||||
genericCommands = new Boolean(false);
|
||||
genericCommands = Boolean.valueOf(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@ class UpdateManagedProject12 {
|
|||
try {
|
||||
switch (newOpt.getValueType()) {
|
||||
case IOption.BOOLEAN:
|
||||
Boolean bool = new Boolean(optRef.getAttribute(IOption.DEFAULT_VALUE));
|
||||
Boolean bool = Boolean.valueOf(optRef.getAttribute(IOption.DEFAULT_VALUE));
|
||||
configuration.setOption(tool, newOpt, bool.booleanValue());
|
||||
break;
|
||||
case IOption.STRING:
|
||||
|
@ -416,7 +416,7 @@ class UpdateManagedProject12 {
|
|||
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(IOption.LIST_ITEM_BUILTIN));
|
||||
Boolean isBuiltIn = Boolean.valueOf(((Element)node).getAttribute(IOption.LIST_ITEM_BUILTIN));
|
||||
if (!isBuiltIn.booleanValue()) {
|
||||
values.add(((Element)node).getAttribute(IOption.LIST_ITEM_VALUE));
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ class UpdateManagedProject20 {
|
|||
switch(type){
|
||||
case IOption.BOOLEAN:{
|
||||
if(optRef.hasAttribute(IOption.DEFAULT_VALUE)){
|
||||
Boolean bool = new Boolean(optRef.getAttribute(IOption.DEFAULT_VALUE));
|
||||
Boolean bool = Boolean.valueOf(optRef.getAttribute(IOption.DEFAULT_VALUE));
|
||||
configuration.setOption(tool,option,bool.booleanValue());
|
||||
}
|
||||
break;
|
||||
|
@ -439,7 +439,7 @@ class UpdateManagedProject20 {
|
|||
for (int j = 0; j < nodes.getLength(); ++j) {
|
||||
Node node = nodes.item(j);
|
||||
if (node.getNodeType() == Node.ELEMENT_NODE) {
|
||||
Boolean isBuiltIn = new Boolean(((Element)node).getAttribute(IOption.LIST_ITEM_BUILTIN));
|
||||
Boolean isBuiltIn = Boolean.valueOf(((Element)node).getAttribute(IOption.LIST_ITEM_BUILTIN));
|
||||
if (!isBuiltIn.booleanValue()) {
|
||||
values.add(((Element)node).getAttribute(IOption.LIST_ITEM_VALUE));
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
|
|||
private IResourceInfo rcInfo = null;
|
||||
private IOptionCategory optCategory;
|
||||
private ToolListElement selectedElement;
|
||||
private ListenerList listenerList;
|
||||
private ListenerList<IPropertyChangeListener> listenerList;
|
||||
private boolean dirtyFlag;
|
||||
|
||||
public static ToolSettingsPrefStore getDefault() {
|
||||
|
@ -181,10 +181,12 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
|
|||
}
|
||||
} else {
|
||||
Object val = getOptionValue(name);
|
||||
if(val instanceof String)
|
||||
if (val instanceof String) {
|
||||
return (String) val;
|
||||
else if(val instanceof Collection)
|
||||
return listToString((String[])((Collection)val).toArray(new String[0]));
|
||||
} else if (val instanceof Collection) {
|
||||
Collection<?> collection = (Collection<String>) val;
|
||||
return listToString(collection.toArray(new String[collection.size()]));
|
||||
}
|
||||
}
|
||||
|
||||
return getDefaultString(name);
|
||||
|
@ -290,7 +292,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
|
|||
|
||||
@Override
|
||||
public void setValue(String name, boolean value) {
|
||||
setOptionValue(name,new Boolean(value));
|
||||
setOptionValue(name, Boolean.valueOf(value));
|
||||
}
|
||||
|
||||
protected void setOptionValue(String name, Object value){
|
||||
|
@ -362,7 +364,7 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
|
|||
}
|
||||
|
||||
public static String listToString(String items[], String separator){
|
||||
StringBuffer path = new StringBuffer(""); //$NON-NLS-1$
|
||||
StringBuilder path = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
path.append(items[i]);
|
||||
|
|
|
@ -375,7 +375,7 @@ public class CDataSerializer {
|
|||
setAttribute(el, PATH, path.toString());
|
||||
}
|
||||
|
||||
// setAttribute(el, EXCLUDED, Boolean.valueOf(data.isExcluded()).toString());
|
||||
// setAttribute(el, EXCLUDED, String.valueOf(data.isExcluded()));
|
||||
|
||||
CLanguageData lDatas[] = data.getLanguageDatas();
|
||||
ICStorageElement child;
|
||||
|
@ -394,7 +394,7 @@ public class CDataSerializer {
|
|||
setAttribute(el, PATH, path.toString());
|
||||
}
|
||||
|
||||
// setAttribute(el, EXCLUDED, Boolean.valueOf(data.isExcluded()).toString());
|
||||
// setAttribute(el, EXCLUDED, String.valueOf(data.isExcluded()));
|
||||
|
||||
CLanguageData lData = data.getLanguageData();
|
||||
if(lData != null){
|
||||
|
|
|
@ -1114,7 +1114,7 @@ public class CDataUtil {
|
|||
}
|
||||
|
||||
public static void setBoolean(ICStorageElement el, String attr, boolean value) {
|
||||
el.setAttribute(attr, Boolean.valueOf(value).toString());
|
||||
el.setAttribute(attr, String.valueOf(value));
|
||||
}
|
||||
|
||||
public static int getInteger(ICStorageElement el, String attr, int defaultValue) {
|
||||
|
|
|
@ -110,7 +110,7 @@ public class Binary extends Openable implements IBinary {
|
|||
if (hasDebug == null || hasChanged()) {
|
||||
IBinaryObject obj = getBinaryObject();
|
||||
if (obj != null) {
|
||||
hasDebug = new Boolean(obj.hasDebug()).toString();
|
||||
hasDebug = String.valueOf(obj.hasDebug());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public class Binary extends Openable implements IBinary {
|
|||
if (endian == null || hasChanged()) {
|
||||
IBinaryObject obj = getBinaryObject();
|
||||
if (obj != null) {
|
||||
endian = new Boolean(obj.isLittleEndian()).toString();
|
||||
endian = String.valueOf(obj.isLittleEndian());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ public final class IndexProviderManager implements IElementChangedListener {
|
|||
if (!provisionMap.containsKey(key)) {
|
||||
try {
|
||||
ICProject cproject= CoreModel.getDefault().create(project);
|
||||
provisionMap.put(key, new Boolean(provider.providesFor(cproject)));
|
||||
provisionMap.put(key, Boolean.valueOf(provider.providesFor(cproject)));
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
provisionMap.put(key, Boolean.FALSE);
|
||||
|
|
|
@ -383,8 +383,8 @@ public class PrefsStorableEnvironment extends StorableEnvironment {
|
|||
checkBackingSerializeInfo();
|
||||
Map<String, IEnvironmentVariable> map = getAllVariablesMap();
|
||||
|
||||
element.setAttribute(ATTRIBUTE_APPEND, Boolean.valueOf(fAppend).toString());
|
||||
element.setAttribute(ATTRIBUTE_APPEND_CONTRIBUTED, Boolean.valueOf(fAppendContributedEnv).toString());
|
||||
element.setAttribute(ATTRIBUTE_APPEND, String.valueOf(fAppend));
|
||||
element.setAttribute(ATTRIBUTE_APPEND_CONTRIBUTED, String.valueOf(fAppendContributedEnv));
|
||||
if(!map.isEmpty()){
|
||||
Iterator<IEnvironmentVariable> iter = map.values().iterator();
|
||||
while(iter.hasNext()){
|
||||
|
|
|
@ -130,8 +130,8 @@ public class StorableEnvironment {
|
|||
* @param element
|
||||
*/
|
||||
public void serialize(ICStorageElement element){
|
||||
element.setAttribute(ATTRIBUTE_APPEND, Boolean.valueOf(fAppend).toString());
|
||||
element.setAttribute(ATTRIBUTE_APPEND_CONTRIBUTED, Boolean.valueOf(fAppendContributedEnv).toString());
|
||||
element.setAttribute(ATTRIBUTE_APPEND, String.valueOf(fAppend));
|
||||
element.setAttribute(ATTRIBUTE_APPEND_CONTRIBUTED, String.valueOf(fAppendContributedEnv));
|
||||
if(fVariables != null){
|
||||
Iterator<IEnvironmentVariable> iter = fVariables.values().iterator();
|
||||
while(iter.hasNext()){
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.editor;
|
||||
|
||||
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
|
@ -26,9 +25,9 @@ import org.eclipse.cdt.ui.PreferenceConstants;
|
|||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
|
||||
|
||||
/**
|
||||
* A toolbar action which toggles the {@linkplain org.eclipse.cdt.ui.PreferenceConstants#EDITOR_MARK_OCCURRENCES mark occurrences preference}.
|
||||
* A toolbar action which toggles the
|
||||
* {@linkplain org.eclipse.cdt.ui.PreferenceConstants#EDITOR_MARK_OCCURRENCES mark occurrences preference}.
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
|
@ -46,17 +45,11 @@ public class ToggleMarkOccurrencesAction extends TextEditorAction implements IPr
|
|||
update();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see IAction#actionPerformed
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
fStore.setValue(PreferenceConstants.EDITOR_MARK_OCCURRENCES, isChecked());
|
||||
}
|
||||
|
||||
/*
|
||||
* @see TextEditorAction#update
|
||||
*/
|
||||
@Override
|
||||
public void update() {
|
||||
ITextEditor editor= getTextEditor();
|
||||
|
@ -69,21 +62,15 @@ public class ToggleMarkOccurrencesAction extends TextEditorAction implements IPr
|
|||
setEnabled(editor != null);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see TextEditorAction#setEditor(ITextEditor)
|
||||
*/
|
||||
@Override
|
||||
public void setEditor(ITextEditor editor) {
|
||||
|
||||
super.setEditor(editor);
|
||||
|
||||
if (editor != null) {
|
||||
|
||||
if (fStore == null) {
|
||||
fStore= CUIPlugin.getDefault().getPreferenceStore();
|
||||
fStore.addPropertyChangeListener(this);
|
||||
}
|
||||
|
||||
} else if (fStore != null) {
|
||||
fStore.removePropertyChangeListener(this);
|
||||
fStore= null;
|
||||
|
@ -92,12 +79,9 @@ public class ToggleMarkOccurrencesAction extends TextEditorAction implements IPr
|
|||
update();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
|
||||
*/
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent event) {
|
||||
if (event.getProperty().equals(PreferenceConstants.EDITOR_MARK_OCCURRENCES))
|
||||
setChecked(Boolean.valueOf(event.getNewValue().toString()).booleanValue());
|
||||
setChecked(Boolean.parseBoolean(event.getNewValue().toString()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -257,9 +257,9 @@ public class LineWrappingTabPage extends FormatterTabPage {
|
|||
try {
|
||||
wrappingStyle= new Integer(DefaultCodeFormatterConstants.getWrappingStyle(value));
|
||||
indentStyle= new Integer(DefaultCodeFormatterConstants.getIndentStyle(value));
|
||||
forceWrapping= new Boolean(DefaultCodeFormatterConstants.getForceWrapping(value));
|
||||
forceWrapping= Boolean.valueOf(DefaultCodeFormatterConstants.getForceWrapping(value));
|
||||
} catch (IllegalArgumentException e) {
|
||||
forceWrapping= new Boolean(false);
|
||||
forceWrapping= Boolean.valueOf(false);
|
||||
indentStyle= new Integer(DefaultCodeFormatterConstants.INDENT_DEFAULT);
|
||||
wrappingStyle= new Integer(DefaultCodeFormatterConstants.WRAP_NO_SPLIT);
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
|
|||
fLRUFilterIdsStack.remove(filterId);
|
||||
fLRUFilterIdsStack.add(0, filterId);
|
||||
|
||||
fEnabledFilterIds.put(filterId, new Boolean(state));
|
||||
fEnabledFilterIds.put(filterId, Boolean.valueOf(state));
|
||||
storeViewDefaults();
|
||||
|
||||
updateViewerFilters(true);
|
||||
|
@ -423,7 +423,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
|
|||
fEnabledFilterIds= new HashMap<String, Boolean>(filterDescs.length);
|
||||
for (FilterDescriptor filterDesc : filterDescs) {
|
||||
String id= filterDesc.getId();
|
||||
Boolean isEnabled= new Boolean(filterDesc.isEnabled());
|
||||
Boolean isEnabled= Boolean.valueOf(filterDesc.isEnabled());
|
||||
//if (fEnabledFilterIds.containsKey(id))
|
||||
// CUIPlugin.log(new Status("WARNING: Duplicate id for extension-point \"org.eclipse.jdt.ui.CElementFilters\"")); //$NON-NLS-1$
|
||||
fEnabledFilterIds.put(id, isEnabled);
|
||||
|
@ -523,7 +523,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
|
|||
Iterator<String> iter= fEnabledFilterIds.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
String id= iter.next();
|
||||
Boolean isEnabled= new Boolean(store.getBoolean(id));
|
||||
Boolean isEnabled= Boolean.valueOf(store.getBoolean(id));
|
||||
fEnabledFilterIds.put(id, isEnabled);
|
||||
}
|
||||
|
||||
|
@ -577,7 +577,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
|
|||
*/
|
||||
public void saveState(IMemento memento) {
|
||||
IMemento customFilters= memento.createChild(TAG_CUSTOM_FILTERS);
|
||||
customFilters.putString(TAG_USER_DEFINED_PATTERNS_ENABLED, new Boolean(fUserDefinedPatternsEnabled).toString());
|
||||
customFilters.putString(TAG_USER_DEFINED_PATTERNS_ENABLED, String.valueOf(fUserDefinedPatternsEnabled));
|
||||
saveUserDefinedPatterns(customFilters);
|
||||
saveXmlDefinedFilters(customFilters);
|
||||
saveLRUFilters(customFilters);
|
||||
|
@ -671,7 +671,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
|
|||
IMemento[] children= xmlDefinedFilters.getChildren(TAG_CHILD);
|
||||
for (IMemento element : children) {
|
||||
String id= element.getString(TAG_FILTER_ID);
|
||||
Boolean isEnabled= new Boolean(element.getString(TAG_IS_ENABLED));
|
||||
Boolean isEnabled= Boolean.valueOf(element.getString(TAG_IS_ENABLED));
|
||||
fEnabledFilterIds.put(id, isEnabled);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ public class UIElementTreeBuilderHelper implements IUIElementTreeBuilderHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (new Boolean(uiAttributes.get(InputUIElement.HIDDEN)).booleanValue()) {
|
||||
if (Boolean.parseBoolean(uiAttributes.get(InputUIElement.HIDDEN))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ public class UIElementTreeBuilderHelper implements IUIElementTreeBuilderHelper {
|
|||
} else if (type.equalsIgnoreCase(InputUIElement.SELECTTYPE)) {
|
||||
String defaultValue= element.getAttribute(InputUIElement.DEFAULT);
|
||||
|
||||
Map<String,String> value2name= new LinkedHashMap<String,String>();
|
||||
Map<String, String> value2name= new LinkedHashMap<>();
|
||||
for (Element item : TemplateEngine.getChildrenOfElement(element)) {
|
||||
String label= item.getAttribute(InputUIElement.COMBOITEM_LABEL); // item displayed in Combo
|
||||
String value= item.getAttribute(InputUIElement.COMBOITEM_NAME); // value stored when its selected
|
||||
|
|
|
@ -74,7 +74,7 @@ public class UIBooleanWidget extends InputUIElement {
|
|||
*/
|
||||
@Override
|
||||
public void setValues(Map<String, String> valueMap) {
|
||||
booleanValue = new Boolean(valueMap.get(uiAttributes.get(UIElement.ID))).booleanValue();
|
||||
booleanValue = Boolean.valueOf(valueMap.get(uiAttributes.get(UIElement.ID))).booleanValue();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -102,7 +102,7 @@ public class UIBooleanWidget extends InputUIElement {
|
|||
booleanContainer.setLayoutData(gridcData);
|
||||
button = new Button(booleanContainer, SWT.CHECK);
|
||||
button.setData(".uid", uiAttributes.get(UIElement.ID)); //$NON-NLS-1$
|
||||
button.setSelection(new Boolean(booleanValue).booleanValue());
|
||||
button.setSelection(Boolean.valueOf(booleanValue).booleanValue());
|
||||
button.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
|
|
@ -242,7 +242,7 @@ public class RegisterGroupsPersistance {
|
|||
Document document = DebugPlugin.newDocument();
|
||||
Element element = document.createElement(ELEMENT_REGISTER_GROUP);
|
||||
element.setAttribute(ATTR_REGISTER_GROUP_NAME, group.getName());
|
||||
element.setAttribute(ATTR_REGISTER_GROUP_ENABLED, Boolean.valueOf(group.isEnabled()).toString());
|
||||
element.setAttribute(ATTR_REGISTER_GROUP_ENABLED, String.valueOf(group.isEnabled()));
|
||||
IRegisterDescriptor[] registerDescriptors = group.getChildren();
|
||||
for (int i = 0; i < registerDescriptors.length; ++i) {
|
||||
Element child = document.createElement(ELEMENT_REGISTER);
|
||||
|
|
|
@ -284,7 +284,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
|
|||
node.setAttribute(ATTR_DIRECTORY, getDirectory().toOSString());
|
||||
if (getAssociation() != null)
|
||||
node.setAttribute(ATTR_ASSOCIATION, getAssociation().toOSString());
|
||||
node.setAttribute(ATTR_SEARCH_SUBFOLDERS, Boolean.valueOf(searchSubfolders()).toString());
|
||||
node.setAttribute(ATTR_SEARCH_SUBFOLDERS, String.valueOf(searchSubfolders()));
|
||||
return CDebugUtils.serializeDocument(document);
|
||||
} catch (ParserConfigurationException e) {
|
||||
ex = e;
|
||||
|
|
|
@ -211,7 +211,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
|
|||
Element node = document.createElement(ELEMENT_NAME);
|
||||
document.appendChild(node);
|
||||
node.setAttribute(ATTR_PROJECT, getProject().getName());
|
||||
node.setAttribute(ATTR_GENERIC, Boolean.valueOf(isGeneric()).toString());
|
||||
node.setAttribute(ATTR_GENERIC, String.valueOf(isGeneric()));
|
||||
return CDebugUtils.serializeDocument(document);
|
||||
} catch (ParserConfigurationException e) {
|
||||
ex = e;
|
||||
|
|
|
@ -276,7 +276,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
|
|||
ICSourceLocation[] locations = getSourceLocations();
|
||||
saveDisabledGenericSourceLocations(locations, document, node);
|
||||
saveAdditionalSourceLocations(locations, document, node);
|
||||
node.setAttribute(ATTR_DUPLICATE_FILES, Boolean.valueOf(searchForDuplicateFiles()).toString());
|
||||
node.setAttribute(ATTR_DUPLICATE_FILES, String.valueOf(searchForDuplicateFiles()));
|
||||
return CDebugUtils.serializeDocument(document);
|
||||
} catch (ParserConfigurationException e) {
|
||||
ex = e;
|
||||
|
|
|
@ -351,9 +351,9 @@ public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
|
|||
public void setValue(String name, boolean value) {
|
||||
boolean oldValue = getBoolean(name);
|
||||
if (oldValue != value) {
|
||||
fProperties.put( name, new Boolean(value) );
|
||||
fProperties.put( name, Boolean.valueOf(value) );
|
||||
setDirty(true);
|
||||
firePropertyChangeEvent(name, new Boolean(oldValue), new Boolean(value) );
|
||||
firePropertyChangeEvent(name, Boolean.valueOf(oldValue), Boolean.valueOf(value) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
|||
fProperties.put(MIBreakpoints.ADDRESS, dsfMIBreakpoint.getAddress());
|
||||
fProperties.put(MIBreakpoints.CONDITION, dsfMIBreakpoint.getCondition());
|
||||
fProperties.put(MIBreakpoints.IGNORE_COUNT, dsfMIBreakpoint.getIgnoreCount());
|
||||
fProperties.put(MIBreakpoints.IS_ENABLED, new Boolean(dsfMIBreakpoint.isEnabled()));
|
||||
fProperties.put(MIBreakpoints.IS_ENABLED, Boolean.valueOf(dsfMIBreakpoint.isEnabled()));
|
||||
fProperties.put(MIBreakpoints.COMMANDS, dsfMIBreakpoint.getCommands());
|
||||
|
||||
// MI-specific breakpoint attributes
|
||||
|
@ -108,8 +108,8 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
|||
fProperties.put(THREAD_ID, dsfMIBreakpoint.getThreadId());
|
||||
fProperties.put(FULL_NAME, dsfMIBreakpoint.getFullName());
|
||||
fProperties.put(HITS, dsfMIBreakpoint.getTimes());
|
||||
fProperties.put(IS_TEMPORARY, new Boolean(dsfMIBreakpoint.isTemporary()));
|
||||
fProperties.put(IS_HARDWARE, new Boolean(dsfMIBreakpoint.isHardware()));
|
||||
fProperties.put(IS_TEMPORARY, Boolean.valueOf(dsfMIBreakpoint.isTemporary()));
|
||||
fProperties.put(IS_HARDWARE, Boolean.valueOf(dsfMIBreakpoint.isHardware()));
|
||||
fProperties.put(LOCATION, formatLocation());
|
||||
break;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
|||
fProperties.put(MIBreakpoints.ADDRESS, dsfMIBreakpoint.getAddress());
|
||||
fProperties.put(MIBreakpoints.CONDITION, dsfMIBreakpoint.getCondition());
|
||||
fProperties.put(MIBreakpoints.PASS_COUNT, dsfMIBreakpoint.getPassCount());
|
||||
fProperties.put(MIBreakpoints.IS_ENABLED, new Boolean(dsfMIBreakpoint.isEnabled()));
|
||||
fProperties.put(MIBreakpoints.IS_ENABLED, Boolean.valueOf(dsfMIBreakpoint.isEnabled()));
|
||||
fProperties.put(MIBreakpoints.COMMANDS, dsfMIBreakpoint.getCommands());
|
||||
|
||||
// MI-specific breakpoint attributes
|
||||
|
@ -146,8 +146,8 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
|||
fProperties.put(THREAD_ID, dsfMIBreakpoint.getThreadId());
|
||||
fProperties.put(FULL_NAME, dsfMIBreakpoint.getFullName());
|
||||
fProperties.put(HITS, dsfMIBreakpoint.getTimes());
|
||||
fProperties.put(IS_TEMPORARY, new Boolean(dsfMIBreakpoint.isTemporary()));
|
||||
fProperties.put(IS_HARDWARE, new Boolean(dsfMIBreakpoint.isHardware()));
|
||||
fProperties.put(IS_TEMPORARY, Boolean.valueOf(dsfMIBreakpoint.isTemporary()));
|
||||
fProperties.put(IS_HARDWARE, Boolean.valueOf(dsfMIBreakpoint.isHardware()));
|
||||
fProperties.put(LOCATION, formatLocation());
|
||||
break;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
|||
fProperties.put(MIBreakpoints.ADDRESS, dsfMIBreakpoint.getAddress());
|
||||
fProperties.put(MIBreakpoints.CONDITION, dsfMIBreakpoint.getCondition());
|
||||
fProperties.put(MIBreakpoints.PRINTF_STRING, dsfMIBreakpoint.getPrintfString());
|
||||
fProperties.put(MIBreakpoints.IS_ENABLED, new Boolean(dsfMIBreakpoint.isEnabled()));
|
||||
fProperties.put(MIBreakpoints.IS_ENABLED, Boolean.valueOf(dsfMIBreakpoint.isEnabled()));
|
||||
fProperties.put(MIBreakpoints.COMMANDS, dsfMIBreakpoint.getCommands());
|
||||
|
||||
// MI-specific breakpoint attributes
|
||||
|
@ -171,8 +171,8 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
|||
fProperties.put(THREAD_ID, dsfMIBreakpoint.getThreadId());
|
||||
fProperties.put(FULL_NAME, dsfMIBreakpoint.getFullName());
|
||||
fProperties.put(HITS, dsfMIBreakpoint.getTimes());
|
||||
fProperties.put(IS_TEMPORARY, new Boolean(dsfMIBreakpoint.isTemporary()));
|
||||
fProperties.put(IS_HARDWARE, new Boolean(dsfMIBreakpoint.isHardware()));
|
||||
fProperties.put(IS_TEMPORARY, Boolean.valueOf(dsfMIBreakpoint.isTemporary()));
|
||||
fProperties.put(IS_HARDWARE, Boolean.valueOf(dsfMIBreakpoint.isHardware()));
|
||||
fProperties.put(LOCATION, formatLocation());
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue