Plugin Version 4.1.2.0.0:

Upgraded to PMD 4.1

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5695 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Torsten Kleiber 2007-12-04 22:10:36 +00:00
parent 0adbf89c71
commit 023987b8c0
7 changed files with 62 additions and 37 deletions

View File

@ -3,8 +3,11 @@
<property name="config" value="config/"/>
<property name="src" value="src/"/>
<property name="etc" value="etc/"/>
<property name="pmdjar" value="pmd-4.0.jar"/>
<property name="pluginversion" value="1.9"/>
<property name="pmdjar" value="pmd-4.1.jar"/>
<!-- first and second number for the pmd plugin -->
<!-- third number JDeveloper Version 1:9.0.5-10.1.2, 2:10.1.3, 3:11.1.1 -->
<!-- fourth and fifth number minor version number for the JDeveloper Plugin -->
<property name="pluginversion" value="4.1.2.0.0"/>
<property name="mainclass" value="net.sourceforge.pmd.jdeveloper"/>
<property name="jdeveloper.dir" value="C:/Oracle/10gJD10133"/>
<property name="jdeveloper.ext.subdir" value="jdev/extensions"/>
@ -61,17 +64,17 @@
<copy file="lib/${release.jarname}" todir="${jdeveloper.install.dir}"/>
<copy file="lib/${pmdjar}"
todir="${jdeveloper.install.dir}/${mainclass}.${pluginversion}/lib"/>
<copy file="lib/jaxen-1.1.jar"
<copy file="lib/jaxen-1.1.1.jar"
todir="${jdeveloper.install.dir}/${mainclass}.${pluginversion}/lib"/>
<copy file="lib/asm-3.0.jar"
<copy file="lib/asm-3.1.jar"
todir="${jdeveloper.install.dir}/${mainclass}.${pluginversion}/lib"/>
</target>
<target name="release" depends="clean,jar">
<mkdir dir="tmp/${release.dirname}/lib"/>
<copy file="lib/${release.jarname}" todir="tmp/"/>
<copy file="lib/${pmdjar}" todir="tmp/${release.dirname}/lib"/>
<copy file="lib/jaxen-1.1.jar" todir="tmp/${release.dirname}/lib"/>
<copy file="lib/asm-3.0.jar" todir="tmp/${release.dirname}/lib"/>
<copy file="lib/jaxen-1.1.1.jar" todir="tmp/${release.dirname}/lib"/>
<copy file="lib/asm-3.1.jar" todir="tmp/${release.dirname}/lib"/>
<zip destfile="${release.zipname}" basedir="tmp/"/>
<move file="${release.zipname}" todir="${release.dir}"/>
<delete dir="tmp"/>
@ -95,9 +98,9 @@
<copy file="lib/${release.jarname}" todir="update-center-bundle/"/>
<copy file="lib/${pmdjar}"
todir="update-center-bundle/${mainclass}.${pluginversion}/lib/"/>
<copy file="lib/jaxen-1.1.jar"
<copy file="lib/jaxen-1.1.1.jar"
todir="update-center-bundle/${mainclass}.${pluginversion}/lib/"/>
<copy file="lib/asm-3.0.jar"
<copy file="lib/asm-3.1.jar"
todir="update-center-bundle/${mainclass}.${pluginversion}/lib/"/>
<zip destfile="update-center-bundle/${bundle.filename}"
basedir="update-center-bundle">

View File

@ -4,7 +4,7 @@
xmlns:u="http://xmlns.oracle.com/jdeveloper/update">
<u:update id="net.sourceforge.pmd.jdeveloper">
<u:name>PMD JDeveloper Extension</u:name>
<u:version>1.9</u:version>
<u:version>4.1.2.0.0</u:version>
<u:author>Torsten Kleiber</u:author>
<u:author-url>http://pmd.sourceforge.net/</u:author-url>
<u:description>Provides integrated support for PMD 4.0 in JDeveloper 10.1.3 - 11.1.1.</u:description>

View File

@ -3,10 +3,10 @@
xmlns:u="http://xmlns.oracle.com/jdeveloper/update">
<u:update id="net.sourceforge.pmd.jdeveloper">
<u:name>PMD JDeveloper Extension</u:name>
<u:version>1.9</u:version>
<u:version>4.1.2.0.0</u:version>
<u:author>Torsten Kleiber</u:author>
<u:author-url>http://pmd.sourceforge.net</u:author-url>
<u:description>Provides integrated support for PMD 4.0 in JDeveloper 10.1.3 - 11.1.1.</u:description>
<u:bundle-url>http://pmd.sourceforge.net/pmd-jdeveloper1013-1.9.zip</u:bundle-url>
<u:bundle-url>http://pmd.sourceforge.net/pmd-jdeveloper1013-4.1.2.0.0.zip</u:bundle-url>
</u:update>
</updates>

View File

@ -1,4 +1,4 @@
change the build.xml, bundle.xml, center.xml to reflect pmd-jdeveloper1013 release
change the build.xml, bundle.xml, center.xml to reflect pmd-jdeveloper release
update the release date in the changelog
Update Plugin.version() to reflect release
@ -22,15 +22,15 @@ src release:
// TODO automation by ant, if subversion tasks are available
checkin
// TODO automation by ant, if subversion tasks are available
copy to tags/pmd-jdeveloper/pmd_jdeveloper1013_release_X_X
copy to tags/pmd-jdeveloper/pmd_jdeveloperXXX_release_X_X_X_X_X
ant releasesrc
release on website:
ant upload
Go to Admin, Edit/Release Files, click on Add new release
Paste stuff into the changelog/readme boxes
Add the pmd-jdeveloper1013-src-1.9.zip file
Add the pmd-jdeveloper1013-bin-1.9.zip file
Add the pmd-jdeveloperXXX-src-X.X.X.X.X.zip file
Add the pmd-jdeveloperXXX-bin-X.X.X.X.X.zip file
Classify the file
Submit some news saying "hey, new release of the jdeveloper 1013 plugin!"
Submit some news saying "hey, new release of the jdeveloper plugin!"

View File

@ -2,14 +2,14 @@
<ex:extension xmlns:ex="http://jcp.org/jsr/198/extension-manifest"
xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension"
xmlns:jdev="http://xmlns.oracle.com/jdeveloper/1013/jdev-libraries"
id="net.sourceforge.pmd.jdeveloper" version="1.9"
id="net.sourceforge.pmd.jdeveloper" version="4.1.2.0.0"
esdk-version="1.0">
<ex:name>PMD JDeveloper Extension</ex:name>
<ex:owner>Torsten Kleiber</ex:owner>
<ex:classpaths>
<ex:classpath>${ide.extension.install.home}/lib/pmd-4.0.jar</ex:classpath>
<ex:classpath>${ide.extension.install.home}/lib/jaxen-1.1.jar</ex:classpath>
<ex:classpath>${ide.extension.install.home}/lib/asm-3.0.jar</ex:classpath>
<ex:classpath>${ide.extension.install.home}/lib/pmd-4.1.jar</ex:classpath>
<ex:classpath>${ide.extension.install.home}/lib/jaxen-1.1.1.jar</ex:classpath>
<ex:classpath>${ide.extension.install.home}/lib/asm-3.1.jar</ex:classpath>
</ex:classpaths>
<ex:dependencies>
<ex:import version="10.1.3">oracle.jdeveloper</ex:import>

View File

@ -206,8 +206,8 @@ public class Plugin implements Addin, Controller, ContextMenuListener {
EditorManager.getEditorManager().getContextMenu().removeContextMenuListener(this);
}
public float version() {
return 1.9f;
public String version() {
return "4.1.2.0.0";
}
public float ideVersion() {

View File

@ -18,8 +18,12 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.io.File;
import java.util.List;
public class SettingsPanel extends DefaultTraversablePanel {
private class FindListener implements ActionListener {
@ -39,20 +43,7 @@ public class SettingsPanel extends DefaultTraversablePanel {
private class MyMouseAdapter extends MouseAdapter {
public void mouseEntered(MouseEvent e) {
int index = locationToIndex(e.getPoint());
if (index != -1) {
JCheckBox box = (JCheckBox)getModel().getElementAt(index);
String example =
rules.getRule(box).getExamples().toString();
while (example.charAt(0) == '\r' ||
example.charAt(0) == '\n' ||
example.charAt(0) == '\t' ||
example.charAt(0) == ' ') {
example = example.substring(1);
}
exampleTextArea.setText(example);
exampleTextArea.setCaretPosition(0);
}
// No action needed when mouse is entered
}
public void mousePressed(MouseEvent e) {
@ -65,6 +56,37 @@ public class SettingsPanel extends DefaultTraversablePanel {
}
}
private class MyMouseMotionListener implements MouseMotionListener {
public void mouseDragged(MouseEvent e) {
// No dragging actions needed
}
public void mouseMoved(MouseEvent e) {
int index = locationToIndex(e.getPoint());
if (index != -1) {
JCheckBox box = (JCheckBox)getModel().getElementAt(index);
List examples = rules.getRule(box).getExamples();
StringBuffer examplesBuffer = new StringBuffer();
if (!examples.isEmpty()) {
for (int i = 0; i < examples.size(); i++) {
examplesBuffer.append(examples.get(i));
}
}
String example = examplesBuffer.toString();
while (example.charAt(0) == '\r' ||
example.charAt(0) == '\n' ||
example.charAt(0) == '\t' ||
example.charAt(0) == ' ') {
example = example.substring(1);
}
exampleTextArea.setText(example);
exampleTextArea.setCaretPosition(0);
}
}
}
public class CheckboxListCellRenderer implements ListCellRenderer {
public Component getListCellRendererComponent(JList list,
Object value,
@ -87,8 +109,8 @@ public class SettingsPanel extends DefaultTraversablePanel {
super(args);
setCellRenderer(new CheckboxListCellRenderer());
addMouseListener(new MyMouseAdapter());
addMouseMotionListener(new MyMouseMotionListener());
}
}
public static final String RULE_SELECTIONS_STORED_SEPARATELY =