From f3c220365a2ecdadaf148a96393b0871082d72fb Mon Sep 17 00:00:00 2001 From: David Craine Date: Tue, 16 Jul 2002 20:47:53 +0000 Subject: [PATCH] Integrated with PMD-0.5 git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@387 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/jbuilder/RuleSetPropertyPage.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/RuleSetPropertyPage.java b/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/RuleSetPropertyPage.java index 6a5ffacbb6..4328afc0b5 100644 --- a/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/RuleSetPropertyPage.java +++ b/pmd-jbuilder/src/net/sourceforge/pmd/jbuilder/RuleSetPropertyPage.java @@ -24,11 +24,15 @@ import java.awt.event.*; import com.borland.primetime.ide.Browser; import com.borland.primetime.ide.MessageCategory; import java.util.Enumeration; +import net.sourceforge.pmd.RuleSetFactory; +import java.util.Iterator; +import net.sourceforge.pmd.RuleSet; +import com.borland.primetime.properties.GlobalProperty; public class RuleSetPropertyPage extends PropertyPage { - //static MessageCategory cat = new MessageCategory("test"); + static MessageCategory msgCat = new MessageCategory("test"); private BorderLayout borderLayout1 = new BorderLayout(); private JSplitPane jSplitPane1 = new JSplitPane(); private Border border1; @@ -77,6 +81,30 @@ public class RuleSetPropertyPage extends PropertyPage { dlmAvailableRuleSets.addElement(le); } } + /*try { + RuleSetFactory rsf = new RuleSetFactory(); + Browser.getActiveBrowser().getMessageView().addMessage(msgCat, "rsf: " + rsf.toString()); + Iterator iter = rsf.getRegisteredRuleSets(); + Browser.getActiveBrowser().getMessageView().addMessage(msgCat, "Iter: " + iter.toString()); + + while (iter.hasNext()) { + RuleSet rs = (RuleSet)iter.next(); + Browser.getActiveBrowser().getMessageView().addMessage(msgCat, rs.getName()); + GlobalProperty gp = new GlobalProperty("RuleSets", rs.getName(), "true"); + ListEntry le = new ListEntry(rs.getName(), gp); + if (Boolean.valueOf(gp.getValue()).booleanValue()) { + dlmSelectedRuleSets.addElement(le); + } + else { + dlmAvailableRuleSets.addElement(le); + } + + } + } + catch (Exception e){ + Browser.getActiveBrowser().getMessageView().addMessage(msgCat, e.toString()); + + }*/ } /**