Updates for 10G final release

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2625 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2004-04-15 15:47:24 +00:00
parent b21e99e44b
commit 1330be5105
8 changed files with 30 additions and 22 deletions

View File

@ -4,8 +4,8 @@
<property name="src" value="src/"/>
<property name="etc" value="etc/"/>
<property name="pmdjar" value="pmd-1.6.jar"/>
<property name="pluginversion" value="0.9"/>
<property name="jdeveloper.install.dir" value="/home/tom/jdev905/jdev/lib/ext/${ant.project.name}-${pluginversion}"/>
<property name="pluginversion" value="1.0"/>
<property name="jdeveloper.install.dir" value="/home/tom/jdev9051/jdev/lib/ext/${ant.project.name}-${pluginversion}"/>
<path id="project.class.path">
<pathelement location="lib/${pmdjar}"/>

View File

@ -1,5 +1,8 @@
April 15, 2004 - 1.0:
Updated to work with JDeveloper 10g final.
March 17, 2004 - 0.9:
Updated to work with JDeveloper 9.0.5 - i.e., 10g.
Updated to work with JDeveloper 9.0.5 preview.
March 16, 2004 - 0.8:
Updated PMD version to 1.6.

View File

@ -1,5 +1,5 @@
update the release date in the changelog
change the build.xml to reflect pmd-jdeveloper release 0.9
change the build.xml to reflect pmd-jdeveloper release 1.0
Create the binary release:
ant release
@ -16,16 +16,16 @@ mkdir -p ~/tmp/pmd-jdeveloper
cvs -q export -d tmp -r pmd_jdeveloper_release_0_9 pmd-jdeveloper
mv tmp/* ~/tmp/pmd-jdeveloper
rmdir tmp/
cp pmd-jdeveloper/lib/pmd-jdeveloper-0.9.jar ~/tmp/pmd-jdeveloper/lib
cp pmd-jdeveloper/lib/pmd-jdeveloper-1.0.jar ~/tmp/pmd-jdeveloper/lib
cd ~/tmp
zip -q -r pmd-jdeveloper-src-0.9.zip pmd-jdeveloper
ncftpput upload.sourceforge.net incoming/ pmd-jdeveloper-bin-0.9.zip pmd-jdeveloper-src-0.9.zip
zip -q -r pmd-jdeveloper-src-1.0.zip pmd-jdeveloper
ncftpput upload.sourceforge.net incoming/ pmd-jdeveloper-bin-1.0.zip pmd-jdeveloper-src-1.0.zip
rm -rf pmd-jdeveloper/
Go to Admin, Edit/Release Files, click on Add new release
Paste stuff into the changelog/readme boxes
Add the pmd-jdeveloper-src-0.9.zip file
Add the pmd-jdeveloper-bin-0.9.zip file
Add the pmd-jdeveloper-src-1.0.zip file
Add the pmd-jdeveloper-bin-1.0.zip file
Classify the file
Submit some news saying "hey, new release of the jdeveloper plugin!"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,6 +2,7 @@ package net.sourceforge.pmd.jdeveloper;
import net.sourceforge.pmd.RuleViolation;
import oracle.ide.Ide;
import oracle.ide.editor.EditorManager;
import oracle.ide.net.URLFactory;
import oracle.jdeveloper.ceditor.CodeEditor;
@ -30,8 +31,8 @@ public class JumpingSelectionModel extends DefaultListSelectionModel {
int newIndex = getMinSelectionIndex();
if (oldIndex != newIndex) {
RuleViolation rv = ((RuleViolationWrapper)model.getElementAt(newIndex)).getRuleViolation();
Ide.getEditorManager().openDefaultEditorInFrame(URLFactory.newFileURL(rv.getFilename()));
((CodeEditor)Ide.getEditorManager().getCurrentEditor()).gotoLine(rv.getLine(), 0, false);
EditorManager.getEditorManager().openDefaultEditorInFrame(URLFactory.newFileURL(rv.getFilename()));
((CodeEditor)EditorManager.getEditorManager().getCurrentEditor()).gotoLine(rv.getLine(), 0, false);
}
}
}

View File

@ -8,6 +8,10 @@ import net.sourceforge.pmd.RuleViolation;
import oracle.ide.ContextMenu;
import oracle.ide.Ide;
import oracle.ide.IdeAction;
import oracle.ide.AddinManager;
import oracle.ide.editor.EditorManager;
import oracle.ide.navigator.NavigatorManager;
import oracle.ide.log.LogManager;
import oracle.ide.addin.Addin;
import oracle.ide.addin.Context;
import oracle.ide.addin.ContextMenuListener;
@ -30,7 +34,7 @@ import java.util.Iterator;
public class Plugin implements Addin, Controller, ContextMenuListener {
public static final String CHECK_CMD = "net.sourceforge.pmd.jdeveloper.Check";
public static final int CHECK_CMD_ID = Ide.newCmd("PMDJDeveloperPlugin.CHECK_CMD_ID");
public static final int CHECK_CMD_ID = Ide.createCmdID("PMDJDeveloperPlugin.CHECK_CMD_ID");
public static final String TITLE = "PMD";
private static final int UNUSED = -1;
@ -46,21 +50,21 @@ public class Plugin implements Addin, Controller, ContextMenuListener {
// Addin
public void initialize() {
IdeAction action = IdeAction.get(CHECK_CMD_ID, Ide.getAddinManager().getCommand(CHECK_CMD_ID, CHECK_CMD), TITLE, TITLE, null, null, null, true);
action.setController(this);
IdeAction action = IdeAction.get(CHECK_CMD_ID, AddinManager.getAddinManager().getCommand(CHECK_CMD_ID, CHECK_CMD), TITLE, TITLE, null, null, null, true);
action.addController(this);
checkItem = Ide.getMenubar().createMenuItem(action);
checkItem.setText(TITLE);
checkItem.setMnemonic('P');
Ide.getNavigatorManager().addContextMenuListener(this, null);
Ide.getEditorManager().getContextMenu().addContextMenuListener(this, null);
NavigatorManager.getWorkspaceNavigatorManager().addContextMenuListener(this, null);
EditorManager.getEditorManager().getContextMenu().addContextMenuListener(this, null);
IdeSettings.registerUI(new Navigable(TITLE, SettingsPanel.class, new Navigable[] {}));
Ide.getVersionInfo().addComponent(TITLE, " JDeveloper Extension " + getVersion());
rvPage = new RuleViolationPage();
}
public void shutdown() {
Ide.getNavigatorManager().removeContextMenuListener(this);
Ide.getEditorManager().getContextMenu().removeContextMenuListener(this);
NavigatorManager.getWorkspaceNavigatorManager().removeContextMenuListener(this);
EditorManager.getEditorManager().getContextMenu().removeContextMenuListener(this);
}
public float version() {
@ -85,8 +89,8 @@ public class Plugin implements Addin, Controller, ContextMenuListener {
public boolean handleEvent(IdeAction ideAction, Context context) {
if (!added) {
Ide.getLogManager().addPage(rvPage);
Ide.getLogManager().showLog();
LogManager.getLogManager().addPage(rvPage);
LogManager.getLogManager().showLog();
added = true;
}
if (ideAction.getCommandId() == CHECK_CMD_ID) {
@ -108,7 +112,7 @@ public class Plugin implements Addin, Controller, ContextMenuListener {
continue;
}
Document candidate = (Document)obj;
if (candidate.getLongLabel().endsWith(".java")) {
if (candidate.getLongLabel().endsWith(".java") && new File(candidate.getLongLabel()).exists()) {
ctx.setSourceCodeFilename(candidate.getLongLabel());
FileInputStream fis = new FileInputStream(new File(candidate.getLongLabel()));
pmd.processFile(fis, rs.getSelectedRules(), ctx);
@ -142,7 +146,7 @@ public class Plugin implements Addin, Controller, ContextMenuListener {
rvPage.clearAll();
if (ctx.getReport().isEmpty()) {
JOptionPane.showMessageDialog(null, "No problems found", TITLE, JOptionPane.INFORMATION_MESSAGE);
Ide.getLogManager().getMsgPage().show();
LogManager.getLogManager().getMsgPage().show();
} else {
for (Iterator i = ctx.getReport().iterator(); i.hasNext();) {
rvPage.add((RuleViolation)i.next());