summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Ostroukhov2011-09-26 10:47:05 (EDT)
committerAndrew Gvozdev2011-09-26 10:47:05 (EDT)
commitb30bb21b5357c96c378c742d8dad0934d1942275 (patch)
tree2e57423fd4bfb4acfaef2ee9e94b072ef86d9b33
parente28830a10b16122fa7825405b7fae52d50c22fad (diff)
downloadorg.eclipse.cdt-b30bb21b5357c96c378c742d8dad0934d1942275.zip
org.eclipse.cdt-b30bb21b5357c96c378c742d8dad0934d1942275.tar.gz
org.eclipse.cdt-b30bb21b5357c96c378c742d8dad0934d1942275.tar.bz2
bug 358835: Tools Settings page forgets selected node
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java
index d4867f9..e7db85b 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java
@@ -70,6 +70,8 @@ import org.eclipse.swt.widgets.ScrollBar;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPreferencePageContainer {
+ private static ToolListElement selectedElement;
+
/*
* Dialog widgets
*/
@@ -87,7 +89,6 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
private Map<String, List<AbstractToolSettingUI>> configToPageListMap;
private IPreferenceStore settingsStore;
private AbstractToolSettingUI currentSettingsPage;
- private ToolListElement selectedElement;
private ToolListContentProvider listprovider;
private Object propertyObject;
@@ -377,7 +378,6 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
@Override
public void setVisible(boolean visible){
if(visible){
- selectedElement = null;
updateData(page.getResDesc());
}
super.setVisible(visible);
@@ -414,7 +414,7 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
// with an object in the new element list.
// Otherwise, select the first tool in the tree
Object primaryObject = null;
- if (selectedElement != null) {
+ if (selectedElement != null && newElements != null) {
selectedElement = matchSelectionElement(selectedElement, newElements);
}