1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-15 20:25:46 +02:00

Commit for Leo Treggiari -- Fix for bugzilla 71254

This commit is contained in:
Sean Evoy 2004-08-06 18:58:16 +00:00
parent f8f5b6ab82
commit d52cfb4834

View file

@ -307,11 +307,19 @@ public class BuildToolSettingsPage extends BuildSettingsPage {
// the option value // the option value
switch (opt.getValueType()) { switch (opt.getValueType()) {
case IOption.BOOLEAN : case IOption.BOOLEAN :
if (opt.getCommand().equals(optionValue)) { String boolCommand;
boolCommand = opt.getCommand();
if (boolCommand != null && boolCommand.equals(optionValue)) {
getPreferenceStore() getPreferenceStore()
.setValue(opt.getId(), true); .setValue(opt.getId(), true);
optionValueExist = true; optionValueExist = true;
} }
boolCommand = opt.getCommandFalse();
if (boolCommand != null && boolCommand.equals(optionValue)) {
getPreferenceStore()
.setValue(opt.getId(), false);
optionValueExist = true;
}
break; break;
case IOption.ENUMERATED : case IOption.ENUMERATED :
String enum = ""; //$NON-NLS-1$ String enum = ""; //$NON-NLS-1$
@ -401,8 +409,13 @@ public class BuildToolSettingsPage extends BuildSettingsPage {
case IOption.BOOLEAN : case IOption.BOOLEAN :
ArrayList optsList = new ArrayList(optionsArr); ArrayList optsList = new ArrayList(optionsArr);
if (opt.getCommand() != null if (opt.getCommand() != null
&& opt.getCommand().length() > 0
&& !optsList.contains(opt.getCommand())) && !optsList.contains(opt.getCommand()))
getPreferenceStore().setValue(opt.getId(), false); getPreferenceStore().setValue(opt.getId(), false);
if (opt.getCommandFalse() != null
&& opt.getCommandFalse().length() > 0
&& !optsList.contains(opt.getCommandFalse()))
getPreferenceStore().setValue(opt.getId(), true);
break; break;
case IOption.STRING : case IOption.STRING :
// TODO create a lst of valid default string options for the tool // TODO create a lst of valid default string options for the tool