From 61fb88968a68fb824b686969ca1f264615f386ee Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Fri, 9 May 2003 14:07:47 +0000 Subject: [PATCH] Cleaned up imports; deleted some commented out code git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1900 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/jedit/CPDDuplicateCodeViewer.java | 6 ++-- .../sourceforge/pmd/jedit/PMDJEditPlugin.java | 32 +++++-------------- .../sourceforge/pmd/jedit/PMDOptionPane.java | 17 ++++++++-- .../sourceforge/pmd/jedit/SelectedRules.java | 15 ++++----- 4 files changed, 34 insertions(+), 36 deletions(-) diff --git a/pmd-jedit/src/net/sourceforge/pmd/jedit/CPDDuplicateCodeViewer.java b/pmd-jedit/src/net/sourceforge/pmd/jedit/CPDDuplicateCodeViewer.java index 1a0e66c77c..1edb8cd5e0 100644 --- a/pmd-jedit/src/net/sourceforge/pmd/jedit/CPDDuplicateCodeViewer.java +++ b/pmd-jedit/src/net/sourceforge/pmd/jedit/CPDDuplicateCodeViewer.java @@ -7,13 +7,15 @@ import org.gjt.sp.jedit.io.VFSManager; import org.gjt.sp.jedit.jEdit; import org.gjt.sp.jedit.textarea.Selection; -import javax.swing.*; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTree; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeSelectionModel; -import java.awt.*; +import java.awt.BorderLayout; import java.util.Vector; //End of Imports diff --git a/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java b/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java index 5ccf6ea43f..d62917a3e4 100644 --- a/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java +++ b/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDJEditPlugin.java @@ -18,7 +18,6 @@ import net.sourceforge.pmd.cpd.FileFinder; import net.sourceforge.pmd.cpd.JavaLanguage; import net.sourceforge.pmd.cpd.Mark; import net.sourceforge.pmd.cpd.Match; -import net.sourceforge.pmd.cpd.SimpleRenderer; import org.gjt.sp.jedit.Buffer; import org.gjt.sp.jedit.EditPlugin; import org.gjt.sp.jedit.GUIUtilities; @@ -27,41 +26,26 @@ import org.gjt.sp.jedit.browser.VFSBrowser; import org.gjt.sp.jedit.gui.OptionsDialog; import org.gjt.sp.jedit.jEdit; -import javax.swing.*; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextField; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.StringReader; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; import java.util.ArrayList; import java.util.HashSet; +import java.util.Iterator; +import java.util.List; import java.util.Set; +import java.util.Vector; public class PMDJEditPlugin extends EditPlugin { -/* - This is unused... do we need it? --Tom - - public static class MatchInfo - { - public int lineno; - public String filename; - - MatchInfo(int lineno, String filename) { - this.lineno = lineno; - this.filename = filename; - } - - public String toString() { - return (filename+":"+lineno); - } - } -*/ - public static final String NAME = "PMD"; public static final String OPTION_RULES_PREFIX = "options.pmd.rules."; public static final String OPTION_UI_DIRECTORY_POPUP = "options.pmd.ui.directorypopup"; diff --git a/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDOptionPane.java b/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDOptionPane.java index 62ea6a882a..00fb3209b7 100644 --- a/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDOptionPane.java +++ b/pmd-jedit/src/net/sourceforge/pmd/jedit/PMDOptionPane.java @@ -10,9 +10,22 @@ import org.gjt.sp.jedit.AbstractOptionPane; import org.gjt.sp.jedit.OptionPane; import org.gjt.sp.jedit.jEdit; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JCheckBox; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import javax.swing.ListCellRenderer; +import javax.swing.ListSelectionModel; +import javax.swing.UIManager; import javax.swing.border.EmptyBorder; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.FlowLayout; +import java.awt.GridLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; diff --git a/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java b/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java index d473164d3d..cec7683c1a 100644 --- a/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java +++ b/pmd-jedit/src/net/sourceforge/pmd/jedit/SelectedRules.java @@ -5,19 +5,18 @@ */ package net.sourceforge.pmd.jedit; -import java.util.Comparator; -import java.util.Iterator; -import java.util.Map; -import java.util.TreeMap; - -import javax.swing.*; -import org.gjt.sp.jedit.jEdit; - import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleSet; import net.sourceforge.pmd.RuleSetFactory; import net.sourceforge.pmd.RuleSetNotFoundException; +import org.gjt.sp.jedit.jEdit; + +import javax.swing.JCheckBox; +import java.util.Comparator; +import java.util.Iterator; +import java.util.Map; import java.util.StringTokenizer; +import java.util.TreeMap; /**