Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2013-02-13 16:31:50 +0000
committerMike Rennie2013-02-13 16:32:02 +0000
commit504d958744ff794bdc541092acfee3a50299e9f9 (patch)
tree575da7576b5c0b2fd9a2a12384191bd9de4869ee /org.eclipse.ui.externaltools
parenta1e521e89a67e26d1d5de5ca65975776337d754b (diff)
downloadeclipse.platform.debug-504d958744ff794bdc541092acfee3a50299e9f9.tar.gz
eclipse.platform.debug-504d958744ff794bdc541092acfee3a50299e9f9.tar.xz
eclipse.platform.debug-504d958744ff794bdc541092acfee3a50299e9f9.zip
Bug 399618 - org.eclipse.ui.externaltools 1.5 Compilation problemv20130213-163202I20130220-0922I20130219-1600I20130219-0800I20130214-2011
Diffstat (limited to 'org.eclipse.ui.externaltools')
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java44
1 files changed, 25 insertions, 19 deletions
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
index 0d837d653..43375bc6f 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -480,11 +480,11 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
}
private void enableCommand(ICommand command, boolean enable) {
- Map args= command.getArguments();
+ Map/*<String, String>*/ args= command.getArguments();
if (args == null) {
args= new HashMap(1);
}
- args.put(COMMAND_ENABLED, Boolean.valueOf(enable));
+ args.put(COMMAND_ENABLED, Boolean.toString(enable));
command.setArguments(args);
userHasMadeChanges= true;
}
@@ -861,8 +861,11 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
*/
private boolean isEnabled(Object element) {
if (element instanceof ICommand) {
- Boolean enabled= (Boolean)((ICommand) element).getArguments().get(COMMAND_ENABLED);
- if (enabled != null) {
+ ICommand command = (ICommand) element;
+ String val = (String)command.getArguments().get(COMMAND_ENABLED);
+ if(val != null) {
+ //null means enabled, see #doPerformOk
+ Boolean enabled = new Boolean(val);
return enabled.booleanValue();
}
} else if (element instanceof ILaunchConfiguration) {
@@ -978,16 +981,19 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
data= null;
}
ICommand command= (ICommand)data;
- Map args= command.getArguments();
- Boolean enabled= (Boolean)args.get(COMMAND_ENABLED);
- if (enabled != null && enabled.equals(Boolean.FALSE)) {
- ILaunchConfiguration config= disableCommand(command);
- if (config != null) {
- data= BuilderUtils.commandFromLaunchConfig(project,config);
- }
- } else {
- args.remove(COMMAND_ENABLED);
- command.setArguments(args);
+ Map/*<String, String>*/ args = command.getArguments();
+ String val = (String)args.get(COMMAND_ENABLED);
+ if(val != null) {
+ Boolean enabled = new Boolean(val);
+ if (!enabled.booleanValue()) {
+ ILaunchConfiguration config= disableCommand(command);
+ if (config != null) {
+ data= BuilderUtils.commandFromLaunchConfig(project,config);
+ }
+ } else {
+ args.remove(COMMAND_ENABLED);
+ command.setArguments(args);
+ }
}
} else if (data instanceof ILaunchConfiguration) {
ILaunchConfiguration config= (ILaunchConfiguration) data;
@@ -1088,7 +1094,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
* The details of the command is persisted in the launch configuration.
*/
private ILaunchConfiguration disableCommand(ICommand command) {
- Map arguments= command.getArguments();
+ Map/*<String, String>*/ arguments= command.getArguments();
if (arguments != null) {
arguments.remove(COMMAND_ENABLED);
}
@@ -1173,8 +1179,8 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
if(oldName != null && !oldName.equals(newName)) {
return true;
}
- Map oldArgs= oldCommand.getArguments();
- Map newArgs= newCommand.getArguments();
+ Map/*<String, String>*/ oldArgs= oldCommand.getArguments();
+ Map/*<String, String>*/ newArgs= newCommand.getArguments();
if (oldArgs == null) {
if(newArgs != null) {
return true;
@@ -1233,7 +1239,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
Object data = builderTable.getItem(i).getData();
if (data instanceof ICommand) {
ICommand command= (ICommand)data;
- Map args= command.getArguments();
+ Map/*<String, String>*/ args= command.getArguments();
args.remove(COMMAND_ENABLED);
command.setArguments(args);
}

Back to the top