Author: scabanovich
Date: 2007-08-13 10:22:09 -0400 (Mon, 13 Aug 2007)
New Revision: 3088
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/preferences/RulesConfigurationPage.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/ConfigRulesProvider.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/VRulesConfigurationWizardView.java
Log:
EXIN-256
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/preferences/RulesConfigurationPage.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/preferences/RulesConfigurationPage.java 2007-08-13
14:19:47 UTC (rev 3087)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/preferences/RulesConfigurationPage.java 2007-08-13
14:22:09 UTC (rev 3088)
@@ -47,16 +47,17 @@
Control sc = significance.createControl(composite);
sc.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- treeViewer = new TreeViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ treeViewer = new TreeViewer(composite, SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL |
SWT.BORDER);
treeViewer.setContentProvider(provider);
treeViewer.setLabelProvider(provider);
treeViewer.setInput(this);
Control tc = treeViewer.getControl();
tc.setLayoutData(new GridData(GridData.FILL_BOTH));
- new TreeItemSelectionManager(treeViewer, new Flipper());
+ TreeItemSelectionManager m = new TreeItemSelectionManager(treeViewer, new Flipper());
significance.update();
tip.install(treeViewer.getTree());
treeViewer.expandToLevel(2);
+ m.update();
return composite;
}
@@ -100,6 +101,10 @@
w.flip();
treeViewer.refresh(w);
}
+ public boolean isSelected(Object data) {
+ ConfigItemWrapper w = (ConfigItemWrapper)data;
+ return w != null && w.isSelected();
+ }
}
public boolean performCancel() {
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/ConfigRulesProvider.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/ConfigRulesProvider.java 2007-08-13
14:19:47 UTC (rev 3087)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/ConfigRulesProvider.java 2007-08-13
14:22:09 UTC (rev 3088)
@@ -49,11 +49,14 @@
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
+ /**
+ * Tree style SWT.CHECK is used instead.
public Image getImage(Object element) {
if(!(element instanceof ConfigItemWrapper)) return null;
ConfigItemWrapper w = (ConfigItemWrapper)element;
return (w.isSelected() && w.isEnabled()) ? IMAGE_ENABLED : IMAGE_DISABLED;
}
+ */
public Color getForeground(Object element) {
if(!(element instanceof ConfigItemWrapper)) return null;
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/VRulesConfigurationWizardView.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/VRulesConfigurationWizardView.java 2007-08-13
14:19:47 UTC (rev 3087)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/VRulesConfigurationWizardView.java 2007-08-13
14:22:09 UTC (rev 3088)
@@ -55,16 +55,17 @@
Control sc = significance.createControl(composite);
sc.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- treeViewer = new TreeViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ treeViewer = new TreeViewer(composite, SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL |
SWT.BORDER);
treeViewer.setContentProvider(provider);
treeViewer.setLabelProvider(provider);
treeViewer.setInput(this);
Control tc = treeViewer.getControl();
tc.setLayoutData(new GridData(GridData.FILL_BOTH));
- new TreeItemSelectionManager(treeViewer, new Flipper());
+ TreeItemSelectionManager m = new TreeItemSelectionManager(treeViewer, new Flipper());
significance.update();
tip.install(treeViewer.getTree());
treeViewer.expandToLevel(2);
+ m.update();
return composite;
}
@@ -134,5 +135,9 @@
w.flip();
treeViewer.refresh(w);
}
+ public boolean isSelected(Object data) {
+ ConfigItemWrapper w = (ConfigItemWrapper)data;
+ return w.isSelected();
+ }
}
}
Show replies by date