Minor changes
Added description to rule set configuration dialog git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@926 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -26,8 +26,10 @@ debug.NoTracingClasses.7[0]=17 com.borland.sql.*1 1 -1
|
||||
debug.NoTracingClasses.8[0]=9 com.sun.*1 1 -1
|
||||
debug.NoTracingClasses.9[0]=6 java.*1 1 -1
|
||||
editor.search.file_filter_history.1[0]=*.java
|
||||
history.files.active[0]=src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java
|
||||
history.files.open.1[0]=src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java,F;192,8004
|
||||
history.files.active[0]=src/net/sourceforge/pmd/jbuilder/ConfigureRuleSetPropertyPage.java
|
||||
history.files.open.1[0]=src/net/sourceforge/pmd/jbuilder/AcceleratorPropertyGroup.java,F;0,590
|
||||
history.files.open.2[0]=src/net/sourceforge/pmd/jbuilder/ConfigureRuleSetPropertyPage.java,F;190,8739
|
||||
history.files.open.3[0]=src/net/sourceforge/pmd/jbuilder/PMDOpenTool.java,F;48,2266
|
||||
import.optimize.packageprefixgroupings.1[0]=java
|
||||
import.optimize.packageprefixgroupings.2[0]=<blank line>
|
||||
import.optimize.packageprefixgroupings.3[0]=javax
|
||||
|
Binary file not shown.
BIN
pmd-jbuilder/lib/pmd-1.0rc1.jar
Normal file
BIN
pmd-jbuilder/lib/pmd-1.0rc1.jar
Normal file
Binary file not shown.
11
pmd-jbuilder/src/README.txt
Normal file
11
pmd-jbuilder/src/README.txt
Normal file
@ -0,0 +1,11 @@
|
||||
To install this plugin, simply place the pmd-jbuiler-0.8.jar (or whatever version it is) and the
|
||||
pmd-0.9.jar (again, whatever version) into the JBuilder/lib/ext directory. PLEASE NOTE: if you
|
||||
have been using previous verisons of this opentool, and the version of the pmd.jar file has changed,
|
||||
you need to remove the old pmd.jar file (pmd-0.8.jar for example
|
||||
|
||||
The PMD_Jbuilder OpenTool requres the pmd-x.x.jar file to run (where x.x is the major/minor version id).
|
||||
Althoughthe openTool has no other special requirements, the PMD utility does. PMD also requires that Xerces
|
||||
and Ant be available in the JBuilder classpath as well. This is not an issue for JBuilder 6/7 Enterprise users
|
||||
since those libraries come preinstalled. However, users of the Professional/Personal versions may have to
|
||||
put those libraries into their JBuilder lib directory manually. I have not tested on anything other than
|
||||
JBuilder 7 Enterprise, but the tool should run fine on most of them given the aforementioned changes.
|
@ -42,9 +42,10 @@ public class AcceleratorPropertyPage extends PropertyPage {
|
||||
private JLabel jLabel2 = new JLabel();
|
||||
private JLabel jLabel3 = new JLabel();
|
||||
private int[][]keys = new int[2][2];
|
||||
private JCheckBox jCheckBox1 = new JCheckBox();
|
||||
private JTextField jTextField1 = new JTextField();
|
||||
private JLabel jLabel4 = new JLabel(); //data structure to hold keycode and modifier info for 2 distinct actions
|
||||
private JLabel jLabel4 = new JLabel();
|
||||
private JPanel jPanel4 = new JPanel();
|
||||
private JCheckBox jCheckBox1 = new JCheckBox();//data structure to hold keycode and modifier info for 2 distinct actions
|
||||
|
||||
/**
|
||||
* Constuctor
|
||||
@ -84,10 +85,10 @@ public class AcceleratorPropertyPage extends PropertyPage {
|
||||
jComboBox1_itemStateChanged(e);
|
||||
}
|
||||
});
|
||||
jCheckBox1.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
jCheckBox1.setText("Enabled");
|
||||
jLabel4.setText("enter");
|
||||
jTextField1.setPreferredSize(new Dimension(60, 21));
|
||||
jCheckBox1.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
jCheckBox1.setText("Enabled");
|
||||
this.add(jPanel1, null);
|
||||
jPanel1.add(jLabel1, null);
|
||||
jPanel1.add(jComboBox1, null);
|
||||
@ -99,7 +100,8 @@ public class AcceleratorPropertyPage extends PropertyPage {
|
||||
jPanel2.add(jTextField3, null);
|
||||
jPanel2.add(jTextField2, null);
|
||||
jPanel2.add(jTextField1, null);
|
||||
this.add(jCheckBox1, null);
|
||||
this.add(jPanel4, null);
|
||||
jPanel4.add(jCheckBox1, null);
|
||||
}
|
||||
|
||||
private void initKeys() {
|
||||
|
@ -33,8 +33,14 @@ public class ConfigureRuleSetPropertyPage extends PropertyPage {
|
||||
private DefaultListModel dlmRuleSets = new DefaultListModel();
|
||||
private DefaultListModel dlmRules = new DefaultListModel();
|
||||
static ConfigureRuleSetPropertyPage currentInstance = null;
|
||||
private JScrollPane spExamples = new JScrollPane();
|
||||
private JTabbedPane tpInfo = new JTabbedPane();
|
||||
private JTextArea taExamples = new JTextArea();
|
||||
private JScrollPane spExamples = new JScrollPane();
|
||||
private JScrollPane spDescription = new JScrollPane();
|
||||
private JTextArea taDescription = new JTextArea();
|
||||
private Border border1;
|
||||
private TitledBorder titledBorderDescription;
|
||||
private TitledBorder titledBorderExample;
|
||||
|
||||
public ConfigureRuleSetPropertyPage() {
|
||||
currentInstance = this;
|
||||
@ -102,23 +108,33 @@ public class ConfigureRuleSetPropertyPage extends PropertyPage {
|
||||
* @throws Exception
|
||||
*/
|
||||
private void jbInit() throws Exception {
|
||||
border1 = BorderFactory.createEtchedBorder(Color.white,new Color(165, 163, 151));
|
||||
titledBorderDescription = new TitledBorder(border1,"Description");
|
||||
titledBorderExample = new TitledBorder(border1, "Example Code");
|
||||
this.setLayout(borderLayout1);
|
||||
spRuleSets.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(165, 163, 151)),"Rule Sets"));
|
||||
spRules.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(165, 163, 151)),"Rules"));
|
||||
listRuleSets.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
listRules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
spExamples.setPreferredSize(new Dimension(70,150));
|
||||
taExamples.setEditable(false);
|
||||
//spExamples.setPreferredSize(new Dimension(70,150));
|
||||
spExamples.setAutoscrolls(false);
|
||||
spExamples.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(165, 163, 151)),"Example code"));
|
||||
spExamples.setBorder(titledBorderExample);
|
||||
tpInfo.setTabPlacement(JTabbedPane.BOTTOM);
|
||||
tpInfo.setPreferredSize(new Dimension(543, 180));
|
||||
taDescription.setEditable(false);
|
||||
spDescription.setBorder(titledBorderDescription);
|
||||
tpInfo.add(spDescription, "Description");
|
||||
tpInfo.add(spExamples, "Example Code");
|
||||
spDescription.getViewport().add(taDescription, null);
|
||||
spExamples.getViewport().add(taExamples, null);
|
||||
this.add(splitPaneConfRuleSets, BorderLayout.CENTER);
|
||||
splitPaneConfRuleSets.add(spRuleSets, JSplitPane.TOP);
|
||||
spRuleSets.getViewport().add(listRuleSets, null);
|
||||
splitPaneConfRuleSets.add(spRules, JSplitPane.BOTTOM);
|
||||
this.add(spExamples, BorderLayout.SOUTH);
|
||||
spExamples.getViewport().add(taExamples, null);
|
||||
taExamples.setEditable(false);
|
||||
spRules.getViewport().add(listRules, null);
|
||||
splitPaneConfRuleSets.setDividerLocation(200);
|
||||
this.add(tpInfo, BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -186,6 +202,7 @@ public class ConfigureRuleSetPropertyPage extends PropertyPage {
|
||||
int index = list.getSelectedIndex();
|
||||
if (index < 0) return;
|
||||
RuleData rd = (RuleData)list.getModel().getElementAt(index);
|
||||
//set the example text
|
||||
String example = rd.rsp.getOriginalRuleSet().getRuleByName(rd.ruleName).getExample();
|
||||
if (example != null) {
|
||||
taExamples.setText(example);
|
||||
@ -194,6 +211,20 @@ public class ConfigureRuleSetPropertyPage extends PropertyPage {
|
||||
else {
|
||||
taExamples.setText("");
|
||||
}
|
||||
//set the description text
|
||||
String description = rd.rsp.getOriginalRuleSet().getRuleByName(rd.ruleName).getDescription();
|
||||
if (description != null) {
|
||||
taDescription.setText(description);
|
||||
taDescription.setCaretPosition(0);
|
||||
}
|
||||
else {
|
||||
taDescription.setText("");
|
||||
}
|
||||
//set the border titleds
|
||||
titledBorderDescription.setTitle("Description: " + rd.ruleName);
|
||||
titledBorderExample.setTitle("Example Code: " + rd.ruleName);
|
||||
spDescription.updateUI();
|
||||
spExamples.updateUI();
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user