1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Roll back changes with isOptionVisible()

This commit is contained in:
Oleg Krasilnikov 2008-02-06 11:55:23 +00:00
parent ba4b0ab3ed
commit 8a3ee52100

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2008 IBM Corporation and others. * Copyright (c) 2003, 2007 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
@ -121,9 +121,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
IOptionApplicability applicabilityCalculator = opt.getApplicabilityCalculator(); IOptionApplicability applicabilityCalculator = opt.getApplicabilityCalculator();
IBuildObject config = fInfo; IBuildObject config = fInfo;
// Check for (un)visibility is now performed in setFieldEditorEnablement() if (applicabilityCalculator == null || applicabilityCalculator.isOptionVisible(config, holder, opt)) {
// if (applicabilityCalculator == null || applicabilityCalculator.isOptionVisible(config, holder, opt))
// {
try { try {
// Figure out which type the option is and add a proper field // Figure out which type the option is and add a proper field
@ -228,7 +226,9 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
fieldsMap.put(optId, fieldEditor); fieldsMap.put(optId, fieldEditor);
fieldEditorsToParentMap.put(fieldEditor, fieldEditorParent); fieldEditorsToParentMap.put(fieldEditor, fieldEditorParent);
} catch (BuildException e) {} } catch (BuildException e) {
}
}
} }
} }
@ -415,14 +415,8 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
if (optionApplicability == null) if (optionApplicability == null)
return; return;
IBuildObject config = fInfo;
if (!optionApplicability.isOptionVisible(config, holder, option )) {
fieldEditor.setEnabled(false, parent); // temporary: instead of setVisible
return;
}
// if the option is not enabled then disable it // if the option is not enabled then disable it
IBuildObject config = fInfo;
if (!optionApplicability.isOptionEnabled(config, holder, option )) { if (!optionApplicability.isOptionEnabled(config, holder, option )) {
fieldEditor.setEnabled(false, parent); fieldEditor.setEnabled(false, parent);
} else { } else {