From 7bc7811f3b471f42774b52c8a38b7729479b6f79 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Fri, 18 Apr 2003 00:43:45 +0000 Subject: [PATCH] rls preps git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1819 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd-gel/etc/build.xml | 5 +-- pmd-gel/etc/changelog.txt | 2 +- .../etc/doing_the_next_pmd_gel_release.txt | 3 ++ pmd-gel/pmd-gel.jde | 25 ++++++++++--- .../net/sourceforge/pmd/gel/PMDPlugin.java | 35 +++++++++++++------ 5 files changed, 51 insertions(+), 19 deletions(-) diff --git a/pmd-gel/etc/build.xml b/pmd-gel/etc/build.xml index 9af1f98723..6a80ce8927 100644 --- a/pmd-gel/etc/build.xml +++ b/pmd-gel/etc/build.xml @@ -34,13 +34,14 @@ + - + - + diff --git a/pmd-gel/etc/changelog.txt b/pmd-gel/etc/changelog.txt index 270d1c6b0f..67682be809 100644 --- a/pmd-gel/etc/changelog.txt +++ b/pmd-gel/etc/changelog.txt @@ -1,2 +1,2 @@ -???? - 0.1: +April 17 - 0.1: Initial release diff --git a/pmd-gel/etc/doing_the_next_pmd_gel_release.txt b/pmd-gel/etc/doing_the_next_pmd_gel_release.txt index 71e30cd441..1285735c1f 100644 --- a/pmd-gel/etc/doing_the_next_pmd_gel_release.txt +++ b/pmd-gel/etc/doing_the_next_pmd_gel_release.txt @@ -1 +1,4 @@ +Change version in build.xml to 0.1 +cvs tag r0_1 pmd-gel +ant release Submit some news saying "hey, new release!" diff --git a/pmd-gel/pmd-gel.jde b/pmd-gel/pmd-gel.jde index 1f4c72ad11..84e5364c42 100644 --- a/pmd-gel/pmd-gel.jde +++ b/pmd-gel/pmd-gel.jde @@ -8,13 +8,28 @@ 0 - 0 + 3 + C:\pmd\pmd-gel\src\net\sourceforge\pmd\gel\PMDPlugin.java - 68 - 43 + 1 + 457 + C:\Documents and Settings\CLOUDY PIG\Local Settings\Temporary Internet Files\Content.IE5\ZE1TCD1O\DialogDemo[1].java + 1 + 192 + + + 1 + 115 + C:\Documents and Settings\CLOUDY PIG\Local Settings\Temporary Internet Files\Content.IE5\91KU4EO7\CustomDialog[1].java + 1 + 106 + + + 23 + 27 $(PROJECT)\src\net\sourceforge\pmd\gel\PMDPlugin.java 1 - 25 + 1 {C34B000D-B5C9-415F-933A-552FB0590E44} @@ -22,7 +37,7 @@ 40 $(PROJECT)\etc\build.xml 1 - 4 + 1 {C34B000D-B5C9-415F-933A-552FB0590E44} diff --git a/pmd-gel/src/net/sourceforge/pmd/gel/PMDPlugin.java b/pmd-gel/src/net/sourceforge/pmd/gel/PMDPlugin.java index 21689bc3cb..14efafa0dd 100644 --- a/pmd-gel/src/net/sourceforge/pmd/gel/PMDPlugin.java +++ b/pmd-gel/src/net/sourceforge/pmd/gel/PMDPlugin.java @@ -1,6 +1,10 @@ package net.sourceforge.pmd.gel; -import java.util.*; +import java.awt.Color; +import java.awt.BorderLayout; +import java.util.List; +import java.util.Iterator; +import java.util.Vector; import java.io.*; import javax.swing.*; import com.gexperts.gel.*; @@ -17,6 +21,10 @@ public class PMDPlugin implements GelAction { public void perform(Gel p0) { try { int x =2; + int y =2; + int z =2; + int ssdsa =2; + int xasdsa =2; PMD pmd = new PMD(); RuleContext ctx = new RuleContext(); RuleSetFactory rsf = new RuleSetFactory(); @@ -37,8 +45,7 @@ public class PMDPlugin implements GelAction { if (ctx.getReport().isEmpty()) { JOptionPane.showMessageDialog(null, "No problems found", "PMD", JOptionPane.INFORMATION_MESSAGE); } else { - JFrame newFrame = createProblemFrame(ctx.getReport()); - newFrame.show(); + createProblemFrame(ctx.getReport()); } } catch (Exception rsne) { JOptionPane.showMessageDialog(null, "ERROR" + rsne.getMessage()); @@ -52,8 +59,8 @@ public class PMDPlugin implements GelAction { // GelAction private JFrame createProblemFrame(Report report) { - JFrame newFrame = new JFrame("Problems found"); - JDialog dialog = new JDialog(newFrame, "Modal dialog", true); + JFrame newFrame = new JFrame(); + JDialog dialog = new JDialog(newFrame, report.size() + " problems found"); dialog.setContentPane(createProblemListPanel(report)); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.pack(); @@ -63,14 +70,20 @@ public class PMDPlugin implements GelAction { } private JPanel createProblemListPanel(Report report) { - JPanel container = new JPanel(); - container.add(new JLabel(report.size() + " problems")); - /* - for (Iterator i = ctx.getReport().iterator(); i.hasNext();) { + Vector v = new Vector(); + for (Iterator i = report.iterator(); i.hasNext();) { RuleViolation rv = (RuleViolation)i.next(); - p0.showMessage("File: " + rv.getFilename() + "\r\nLine: " + (rv.getLine()-1) + "\r\nProblem: " + rv.getDescription()); + String msg = rv.getFilename() + " - line " + (rv.getLine()-1) + " - " + rv.getDescription(); + v.add(msg); + } - */ + JList list = new JList(v); + list.setForeground(Color.RED); + list.setBackground(Color.WHITE); + list.setVisibleRowCount(20); + + JPanel container = new JPanel(new BorderLayout()); + container.add(list, BorderLayout.CENTER); return container; } } \ No newline at end of file