Author: scabanovich
Date: 2007-09-25 08:53:01 -0400 (Tue, 25 Sep 2007)
New Revision: 3787
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java
Log:
JBIDE-942
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java 2007-09-25
12:24:32 UTC (rev 3786)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java 2007-09-25
12:53:01 UTC (rev 3787)
@@ -142,8 +142,20 @@
protected void enableAll() {
enableHierarchy(object);
+ Tree tree = treeViewer.getTree();
+ enable(tree.getItems());
treeViewer.refresh();
}
+
+ private void enable(TreeItem[] items) {
+ for (int i = 0; i < items.length; i++) {
+ if(!items[i].getChecked()) {
+ items[i].setChecked(true);
+ treeViewer.refresh(items[i]);
+ }
+ enable(items[i].getItems());
+ }
+ }
private void enableHierarchy(CheckObject o) {
CheckObject[] os = o.getChildren();
@@ -158,9 +170,15 @@
for (int i = 0; i < os.length; i++) {
os[i].setEnabled(false);
}
+ Tree tree = treeViewer.getTree();
+ TreeItem[] items = tree.getItems();
+ for (int i = 0; i < items.length; i++) {
+ items[i].setChecked(false);
+ treeViewer.refresh(items[i]);
+ }
treeViewer.refresh();
}
-
+
class Flipper implements TreeItemSelectionManager.Listener {
public void flip(TreeItem item) {
if(item == null) return;