Author: scabanovich
Date: 2009-03-05 11:10:02 -0500 (Thu, 05 Mar 2009)
New Revision: 14025
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/RuleSetWrapper.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleWrapper.java
Log:
JBIDE-3926
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 2009-03-05
16:08:09 UTC (rev 14024)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/preferences/RulesConfigurationPage.java 2009-03-05
16:10:02 UTC (rev 14025)
@@ -120,7 +120,12 @@
}
private void setChecked(TreeItem item){
- item.setChecked(true);
+ Object data = item.getData();
+ boolean checked = true;
+ if(data instanceof ConfigItemWrapper) {
+ checked = ((ConfigItemWrapper)data).isSelected();
+ }
+ item.setChecked(checked);
for(int i=0;i<item.getItemCount();i++){
TreeItem child = item.getItem(i);
setChecked(child);
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleSetWrapper.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleSetWrapper.java 2009-03-05
16:08:09 UTC (rev 14024)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleSetWrapper.java 2009-03-05
16:10:02 UTC (rev 14025)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.verification.ui.vrules.wizard.config;
import org.jboss.tools.common.verification.vrules.VRuleSet;
+import org.jboss.tools.common.verification.vrules.impl.VRuleSetImpl;
import org.jboss.tools.common.verification.ui.vrules.wizard.VRuleTipFactory;
public class RuleSetWrapper extends ConfigItemWrapper {
@@ -34,7 +35,11 @@
o.setEnabled(!o.isEnabled());
}
public void setDefaults() {
- o.setEnabled(true);
+ boolean defaultEnabled = true;
+ if(o instanceof VRuleSetImpl) {
+ defaultEnabled = ((VRuleSetImpl)o).isDefaultEnabled();
+ }
+ o.setEnabled(defaultEnabled);
for (int j = 0; j < children.length; j++) children[j].setDefaults();
}
public String getTip() {
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleWrapper.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleWrapper.java 2009-03-05
16:08:09 UTC (rev 14024)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/config/RuleWrapper.java 2009-03-05
16:10:02 UTC (rev 14025)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.verification.ui.vrules.wizard.config;
import org.jboss.tools.common.verification.vrules.VRule;
+import org.jboss.tools.common.verification.vrules.impl.VRuleImpl;
import org.jboss.tools.common.verification.ui.vrules.wizard.VRuleTipFactory;
public class RuleWrapper extends ConfigItemWrapper {
@@ -35,7 +36,11 @@
o.setEnabled(!o.isEnabled());
}
public void setDefaults() {
- o.setEnabled(true);
+ boolean defaultEnabled = true;
+ if(o instanceof VRuleImpl) {
+ defaultEnabled = ((VRuleImpl)o).isDefaultEnabled();
+ }
+ o.setEnabled(defaultEnabled);
}
public String getTip() {
return VRuleTipFactory.getRuleTip(o, significance.getSignificance());
Show replies by date