Fixed Bug [1501422] PMD Plugin: example box is not updated when new items hover filed in jEdit Plugins Bug tracker. Also updated pmd.props to reflect new version

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4445 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Jiger Patel
2006-07-03 12:49:28 +00:00
parent cf54821f1d
commit 441bcb635e
4 changed files with 21 additions and 15 deletions

View File

@@ -1,7 +1,8 @@
???? - 2.7
- Updated to PMD 3.5
- Updated to PMD 3.7
- Fixed Bug [1501422] PMD Plugin: example box is not updated when new items hover filed in jEdit Plugins Bug tracker.
10th January 2006 - 2.6
10th January 2006 - 2.6O
- Updated to PMD 3.4
- Updated to jEdit 4.3pre3 version.
- Added "Ignore Literals & identifiers" option for CPD.

View File

@@ -48,7 +48,8 @@ Take a look at the <a href="#releasenotes">Release Notes and Changelog</a> for m
<h2>Release Notes &amp; Changelog</h2>
<h3>2.7</h3>
<ol>
<li>Updated to PMD 3.5</li>
<li>Updated to PMD 3.7</li>
<li>Fixed Bug [1501422] PMD Plugin: example box is not updated when new items hover filed in jEdit Plugins Bug tracker.</li>
</ol>
<h3>2.6</h3>
<ol>

View File

@@ -3,7 +3,7 @@
#
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.name=PMD
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.author=Jiger Patel, Tom Copeland
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.version=2.6
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.version=2.7
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.docs=jedit.html
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.0=jdk 1.4
plugin.net.sourceforge.pmd.jedit.PMDJEditPlugin.depend.1=jedit 04.03.03.00

View File

@@ -36,16 +36,6 @@ public class PMDOptionPane extends AbstractOptionPane implements OptionPane {
public class CheckboxList extends JList {
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).getExample();
exampleTextArea.setText(example);
exampleTextArea.setCaretPosition(0);
}
}
public void mousePressed(MouseEvent e) {
int index = locationToIndex(e.getPoint());
if (index != -1) {
@@ -55,6 +45,19 @@ public class PMDOptionPane extends AbstractOptionPane implements OptionPane {
}
}
}
private class MyMouseMotionAdapter extends java.awt.event.MouseMotionAdapter {
public void mouseMoved(MouseEvent e) {
int index = locationToIndex(e.getPoint());
if (index != -1) {
JCheckBox box = (JCheckBox)getModel().getElementAt(index);
String example = rules.getRule(box).getExample();
exampleTextArea.setText(example);
exampleTextArea.setCaretPosition(0);
}
}
}
public class CheckboxListCellRenderer implements ListCellRenderer {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@@ -71,7 +74,8 @@ public class PMDOptionPane extends AbstractOptionPane implements OptionPane {
public CheckboxList(Object[] args) {
super(args);
setCellRenderer(new CheckboxListCellRenderer());
addMouseListener(new MyMouseAdapter());
addMouseListener(new MyMouseAdapter());
addMouseMotionListener(new MyMouseMotionAdapter());
}
}