*** empty log message ***

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@695 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
David Craine
2002-08-14 20:59:42 +00:00
parent 7005eb2eed
commit 672186f04a
4 changed files with 34 additions and 12 deletions

View File

@ -14,6 +14,6 @@
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.xerces_4.0.3/xmlParserAPIs.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.xerces_4.0.3/xercesImpl.jar"/>
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="C:/eclipse/workspace/pmd-eclipse/lib/pmd-0.8.jar"/>
<classpathentry kind="lib" path="C:/eclipse/workspace/pmd-eclipse/lib/pmd-dev.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -10,7 +10,7 @@
<library name="pmd-eclipse.jar">
<export name="*"/>
</library>
<library name="lib/pmd-0.8.jar"/>
<library name="lib/pmd-dev.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.core.resources"/>
@ -65,6 +65,12 @@
class="net.sourceforge.pmd.eclipse.preferences.PMDPreferencePage"
id="net.sourceforge.pmd.eclipse.preferences.PMDPreferencePage">
</page>
<page
name="CPD Preferences"
category="net.sourceforge.pmd.eclipse.preferences.GeneralPreferencesPage"
class="net.sourceforge.pmd.eclipse.preferences.CPDPreferencePage"
id="net.sourceforge.pmd.eclipse.CPDPreferencePage">
</page>
</extension>
<extension
point="org.eclipse.ui.popupMenus">
@ -89,6 +95,27 @@
id="net.sourceforge.pmd.eclipse.PMDCheckFileActionItem">
</action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.core.resources.IProject"
nameFilter="*"
id="net.sourceforge.pmd.eclipse.CPDCheckProject">
<menu
label="&amp;CPD"
path="cpdadditions"
id="net.sourceforge.pmd.eclipse.CPDCheckProjectMenu">
<separator
name="group1">
</separator>
</menu>
<action
label="Check Project"
state="false"
class="net.sourceforge.pmd.eclipse.actions.CPDCheckProjectAction"
menubarPath="net.sourceforge.pmd.eclipse.CPDCheckProjectMenu/group1"
enablesFor="1"
id="net.sourceforge.pmd.eclipse.CPDCheckProjectActionItem">
</action>
</objectContribution>
</extension>
</plugin>

View File

@ -99,8 +99,9 @@ public class PMDVisitor implements IResourceVisitor {
(((IFile) resource).getFileExtension() != null) &&
((IFile) resource).getFileExtension().equals("java")) {
runPMD( (IFile) resource );
return false;
} else {
return false;
}
else {
return true;
}
}

View File

@ -35,9 +35,6 @@ public class PMDCheckFileAction implements IObjectActionDelegate {
*/
public void run(IAction action) {
String[] rulesetFiles = PMDPlugin.getDefault().getRuleSetsPreference();
Shell shell = new Shell();
PMDVisitor visitor = null;
try {
visitor = new PMDVisitor(rulesetFiles);
@ -49,13 +46,10 @@ public class PMDCheckFileAction implements IObjectActionDelegate {
if (obj instanceof IFile) {
((IFile)obj).accept(visitor);
}
}
}
//PMDPlugin.getWorkspace().getRoot().accept( visitor );
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}