various updates, moving towards the next release

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@423 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-07-18 00:26:19 +00:00
parent 0b8a196839
commit c7509e73df
6 changed files with 20 additions and 14 deletions

View File

@ -3,11 +3,11 @@
#
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.name=PMD
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.author=Tom Copeland
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.version=0.3
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.version=0.4
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.docs=jedit.html
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.0=jdk 1.3
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.1=jedit 04.00.99.00
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.jars=pmd-0.4.jar
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.jars=pmd-0.5.jar
#
# Menu properties

View File

@ -1,14 +1,16 @@
<project name="PMDJEditPlugin" default="clean" basedir="../">
<project name="PMDJEditPlugin" default="compile" basedir="../">
<property name="config" value="config/"/>
<property name="src" value="src/"/>
<property name="lib" value="lib/"/>
<property name="build" value="build/"/>
<property name="pmdjar" value="pmd-0.5.jar"/>
<property name="pluginversion" value="0.4"/>
<property name="jedit.install.dir" value="c:\jedit\jars"/>
<path id="project.class.path">
<pathelement location="${lib}/pmd.jar"/>
<pathelement location="${lib}/${pmdjar}"/>
<pathelement location="${lib}/jedit.jar"/>
<pathelement location="${build}"/>
</path>
@ -53,9 +55,9 @@
<antcall target="jar"/>
<mkdir dir="tmp/jars"/>
<copy file="${lib}/${ant.project.name}.jar" todir="tmp/jars"/>
<move file="tmp/jars/${ant.project.name}.jar" tofile="tmp/jars/${ant.project.name}-0.3.jar"/>
<copy file="${lib}/pmd-0.4.jar" todir="tmp/jars"/>
<zip zipfile="pmd-jedit-bin-0.3.zip" basedir="tmp"/>
<move file="tmp/jars/${ant.project.name}.jar" tofile="tmp/jars/${ant.project.name}-${pluginversion}.jar"/>
<copy file="${lib}/${pmdjar}" todir="tmp/jars"/>
<zip zipfile="pmd-jedit-bin-${pluginversion}.zip" basedir="tmp"/>
<delete dir="tmp"/>
</target>

View File

@ -1,4 +1,4 @@
@echo off
set CLASSPATH=build/
set CLASSPATH=%CLASSPATH%;lib\pmd-0.4.jar
set CLASSPATH=%CLASSPATH%;lib\jedit.jar
set CLASSPATH=..\build
set CLASSPATH=%CLASSPATH%;..\lib\pmd-0.5.jar
set CLASSPATH=%CLASSPATH%;..\lib\jedit.jar

View File

@ -54,13 +54,13 @@ public class PMDJEditPlugin extends EBPlugin {
ctx.setSourceCodeFilename("this");
try {
pmd.processFile(new StringReader(view.getTextArea().getText()), rules, ctx);
PMDRuleViolationDialog dialog = new PMDRuleViolationDialog(ctx.getReport());
new PMDRuleViolationDialog(ctx.getReport());
} catch (FileNotFoundException fnfe) {
fnfe.printStackTrace();
}
}
public void instanceDisplayPreferencesDialog(View view) {
PMDOptionPane options = new PMDOptionPane();
new PMDOptionPane();
}
}

View File

@ -55,6 +55,10 @@ public class PMDRuleViolationDialog {
private RuleViolationListModel rvListModel;
public PMDRuleViolationDialog(Report report) {
if (report.isEmpty()) {
JOptionPane.showMessageDialog(jEdit.getFirstView(), "No errors found");
return;
}
dialog = new JDialog(jEdit.getFirstView(), PMDJEditPlugin.NAME, true);
rvListModel = new RuleViolationListModel(report);

View File

@ -9,8 +9,7 @@ import org.gjt.sp.jedit.jEdit;
import javax.swing.*;
import java.util.*;
import java.util.List;
import java.awt.*;
import java.awt.Color;
public class SelectedRuleSetsMap {
private Map selections = new HashMap();
@ -20,6 +19,7 @@ public class SelectedRuleSetsMap {
selections.put("unusedcode", createCheckBox("unusedcode"));
selections.put("design", createCheckBox("design"));
selections.put("naming", createCheckBox("naming"));
selections.put("imports", createCheckBox("imports"));
}
public Iterator keys() {