Added files for pmd-1.04 and, updated with some changes from dnoyeb
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1607 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
<classpath>
|
||||
<!-- Copy this from the netbeans installation directory -->
|
||||
<pathelement path="lib/openide.jar"/>
|
||||
<pathelement path="lib/pmd-1.03.jar"/>
|
||||
<pathelement path="lib/pmd-1.04.jar"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
<copy todir="build/classes">
|
||||
@ -29,7 +29,9 @@
|
||||
<taskdef classname="org.netbeans.nbbuild.MakeNBM" classpath="lib\nbantext.jar" name="makenbm"/>
|
||||
<mkdir dir="build/temp_distribution/netbeans/modules/ext"/>
|
||||
<copy file="build/pmd.jar" tofile="build/temp_distribution/netbeans/modules/pmd.jar"/>
|
||||
<copy file="lib/pmd-1.03.jar" tofile="build/temp_distribution/netbeans/modules/ext/pmd-1.03.jar"/>
|
||||
<copy file="lib/pmd-1.04.jar" tofile="build/temp_distribution/netbeans/modules/ext/pmd-1.04.jar"/>
|
||||
<copy file="lib/saxpath-1.0-fcs.jar" tofile="build/temp_distribution/netbeans/modules/ext/saxpath-1.0-fcs.jar"/>
|
||||
<copy file="lib/jaxen-core-1.0-fcs.jar" tofile="build/temp_distribution/netbeans/modules/ext/jaxen-core-1.0-fcs.jar"/>
|
||||
<makenbm file="build/pmd.nbm" homepage="http://pmd.sourceforge.net/" module="build/pmd.jar" topdir="build/temp_distribution" needsrestart="false">
|
||||
<license file="LICENSE.txt"/>
|
||||
<!-- todo: better to include online help (JavaHelp) than put this here: -->
|
||||
@ -48,6 +50,8 @@
|
||||
<include name="src/**/*"/>
|
||||
<include name="lib/pmd*.jar"/>
|
||||
<include name="lib/nbantext.jar"/>
|
||||
<include name="lib/saxpath-1.0-fcs.jar"/>
|
||||
<include name="lib/jaxen-core-1.0-fcs.jar"/>
|
||||
<exclude name="**/.nbattrs"/>
|
||||
</zipfileset>
|
||||
<zipfileset dir="." fullpath="pmd.nbm" includes="build\pmd.nbm"/>
|
||||
|
BIN
pmd-netbeans/lib/jaxen-core-1.0-fcs.jar
Normal file
BIN
pmd-netbeans/lib/jaxen-core-1.0-fcs.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
pmd-netbeans/lib/pmd-1.04.jar
Normal file
BIN
pmd-netbeans/lib/pmd-1.04.jar
Normal file
Binary file not shown.
BIN
pmd-netbeans/lib/saxpath-1.0-fcs.jar
Normal file
BIN
pmd-netbeans/lib/saxpath-1.0-fcs.jar
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
Manifest-Version: 1.0
|
||||
OpenIDE-Module-Specification-Version: 0.70.2
|
||||
OpenIDE-Module-Specification-Version: 0.71
|
||||
Created-By: Ole-Martin Mřrk
|
||||
Class-Path: ext/pmd-1.03.jar
|
||||
Class-Path: ext/pmd-1.04.jar ext/jaxen-core-1.0-fcs.jar ext/saxpath-1.0-fcs.jar
|
||||
OpenIDE-Module: pmd
|
||||
OpenIDE-Module-Layer: pmd/mf-layer.xml
|
||||
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
|
||||
|
@ -83,7 +83,7 @@ public class RunPMDAction extends CookieAction {
|
||||
* @return the name of the icon
|
||||
*/
|
||||
protected String iconResource() {
|
||||
return "/pmd/resources/PMDOptionsSettingsIcon.gif";
|
||||
return "pmd/resources/PMDOptionsSettingsIcon.gif";
|
||||
}
|
||||
|
||||
|
||||
@ -137,18 +137,14 @@ public class RunPMDAction extends CookieAction {
|
||||
TopManager.getDefault().setStatusText(
|
||||
"PMD checking for rule violations, " + ( i + 1 ) + "/" + ( dataobjects.size() ) );
|
||||
DataObject dataobject = ( DataObject )dataobjects.get( i );
|
||||
SourceCookie cookie = ( SourceCookie )dataobject.getCookie( SourceCookie.class );
|
||||
|
||||
String name = dataobject.getPrimaryFile().getPackageName( '.' );
|
||||
|
||||
//The file is not a java file
|
||||
if( cookie == null || dataobject.getCookie( LineCookie.class ) == null ) {
|
||||
if( !dataobject.getPrimaryFile().hasExt( "java" ) || dataobject.getCookie( LineCookie.class ) == null ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reader reader = getSourceReader( dataobject );
|
||||
if(cookie.getSource().getClasses().length == 0){
|
||||
continue;
|
||||
}
|
||||
String name = cookie.getSource().getClasses()[0].getName().getFullName();
|
||||
|
||||
RuleContext ctx = new RuleContext();
|
||||
Report report = new Report();
|
||||
ctx.setReport( report );
|
||||
@ -190,7 +186,6 @@ public class RunPMDAction extends CookieAction {
|
||||
listener.detach();
|
||||
FaultRegistry.getInstance().clearRegistry();
|
||||
try {
|
||||
|
||||
TopManager.getDefault().setStatusText( "PMD checking for rule violations" );
|
||||
List list = getDataObjects( node );
|
||||
List violations = checkCookies( list );
|
||||
|
@ -215,8 +215,10 @@ public class RuleSetChooser extends JPanel {
|
||||
|
||||
private void removejarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removejarActionPerformed
|
||||
int index = jarList.getSelectedIndex();
|
||||
getJarListModel().removeElementAt( index );
|
||||
editor.firePropertyChange();
|
||||
if( index >= 0 ) {
|
||||
getJarListModel().removeElementAt( index );
|
||||
editor.firePropertyChange();
|
||||
}
|
||||
}//GEN-LAST:event_removejarActionPerformed
|
||||
|
||||
private void addjarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addjarActionPerformed
|
||||
@ -237,8 +239,10 @@ public class RuleSetChooser extends JPanel {
|
||||
|
||||
private void removeRuleSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeRuleSetActionPerformed
|
||||
int index = rulesetList.getSelectedIndex();
|
||||
getRuleSetListModel().removeElementAt( index );
|
||||
editor.firePropertyChange();
|
||||
if( index >= 0 ) {
|
||||
getRuleSetListModel().removeElementAt( index );
|
||||
editor.firePropertyChange();
|
||||
}
|
||||
}//GEN-LAST:event_removeRuleSetActionPerformed
|
||||
|
||||
private void addRuleSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addRuleSetActionPerformed
|
||||
|
Reference in New Issue
Block a user