rls preps

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1819 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-04-18 00:43:45 +00:00
parent d8b1004713
commit 7bc7811f3b
5 changed files with 51 additions and 19 deletions

View File

@ -34,13 +34,14 @@
<target name="jar" depends="compile">
<jar jarfile="${lib}\pmd-gel-${version}.jar" basedir="${build}" manifest="etc/MANIFEST.MF"/>
</target>
<target name="clean" depends="delete,compile"/>
<target name="dist" depends="clean,jar">
<target name="dist">
<copy file="${lib}/pmd-gel-${version}.jar" toDir="c:\gel\plugin"/>
</target>
<target name="release" depends="dist">
<target name="release" depends="clean, jar, dist">
<mkdir dir="tmp"/>
<copy file="${lib}/pmd-gel-${version}.jar" toDir="tmp/"/>
<copy file="${lib}/jaxen-core-1.0-fcs.jar" toDir="tmp/"/>

View File

@ -1,2 +1,2 @@
???? - 0.1:
April 17 - 0.1:
Initial release

View File

@ -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!"

View File

@ -8,13 +8,28 @@
<PROPERTY Name="SmartFolder">0</PROPERTY>
<PROPERTY Name="OpenFiles">
<CLASS Type="TFiles">
<PROPERTY Name="CurrentIndex">0</PROPERTY>
<PROPERTY Name="CurrentIndex">3</PROPERTY>
<PROPERTY Name="LastFileName">C:\pmd\pmd-gel\src\net\sourceforge\pmd\gel\PMDPlugin.java</PROPERTY>
<CLASS Type="TFile">
<PROPERTY Name="CaretLeft">68</PROPERTY>
<PROPERTY Name="CaretTop">43</PROPERTY>
<PROPERTY Name="CaretLeft">1</PROPERTY>
<PROPERTY Name="CaretTop">457</PROPERTY>
<PROPERTY Name="FileName">C:\Documents and Settings\CLOUDY PIG\Local Settings\Temporary Internet Files\Content.IE5\ZE1TCD1O\DialogDemo[1].java</PROPERTY>
<PROPERTY Name="WindowLeft">1</PROPERTY>
<PROPERTY Name="WindowTop">192</PROPERTY>
</CLASS>
<CLASS Type="TFile">
<PROPERTY Name="CaretLeft">1</PROPERTY>
<PROPERTY Name="CaretTop">115</PROPERTY>
<PROPERTY Name="FileName">C:\Documents and Settings\CLOUDY PIG\Local Settings\Temporary Internet Files\Content.IE5\91KU4EO7\CustomDialog[1].java</PROPERTY>
<PROPERTY Name="WindowLeft">1</PROPERTY>
<PROPERTY Name="WindowTop">106</PROPERTY>
</CLASS>
<CLASS Type="TFile">
<PROPERTY Name="CaretLeft">23</PROPERTY>
<PROPERTY Name="CaretTop">27</PROPERTY>
<PROPERTY Name="FileName">$(PROJECT)\src\net\sourceforge\pmd\gel\PMDPlugin.java</PROPERTY>
<PROPERTY Name="WindowLeft">1</PROPERTY>
<PROPERTY Name="WindowTop">25</PROPERTY>
<PROPERTY Name="WindowTop">1</PROPERTY>
</CLASS>
<CLASS Type="TFile">
<PROPERTY Name="ProjectID">{C34B000D-B5C9-415F-933A-552FB0590E44}</PROPERTY>
@ -22,7 +37,7 @@
<PROPERTY Name="CaretTop">40</PROPERTY>
<PROPERTY Name="FileName">$(PROJECT)\etc\build.xml</PROPERTY>
<PROPERTY Name="WindowLeft">1</PROPERTY>
<PROPERTY Name="WindowTop">4</PROPERTY>
<PROPERTY Name="WindowTop">1</PROPERTY>
</CLASS>
<CLASS Type="TFile">
<PROPERTY Name="ProjectID">{C34B000D-B5C9-415F-933A-552FB0590E44}</PROPERTY>

View File

@ -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;
}
}