forked from phoedos/pmd
renamed poorly-named interface
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4713 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
5
pmd/src/net/sourceforge/pmd/util/LineGetter.java
Normal file
5
pmd/src/net/sourceforge/pmd/util/LineGetter.java
Normal file
@ -0,0 +1,5 @@
|
||||
package net.sourceforge.pmd.util;
|
||||
|
||||
public interface LineGetter {
|
||||
String getLine(int number);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package net.sourceforge.pmd.util.designer;
|
||||
|
||||
import net.sourceforge.pmd.util.HasLines;
|
||||
import net.sourceforge.pmd.util.LineGetter;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.Dimension;
|
||||
@ -13,7 +13,7 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class CodeEditorTextPane extends JTextPane implements HasLines, ActionListener {
|
||||
public class CodeEditorTextPane extends JTextPane implements LineGetter, ActionListener {
|
||||
|
||||
private static final String SETTINGS_FILE_NAME = System.getProperty("user.home") + System.getProperty("file.separator") + ".pmd_designer";
|
||||
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
|
||||
|
@ -4,7 +4,7 @@ import net.sourceforge.pmd.ast.ASTMethodDeclaration;
|
||||
import net.sourceforge.pmd.ast.SimpleNode;
|
||||
import net.sourceforge.pmd.dfa.IDataFlowNode;
|
||||
import net.sourceforge.pmd.dfa.variableaccess.VariableAccess;
|
||||
import net.sourceforge.pmd.util.HasLines;
|
||||
import net.sourceforge.pmd.util.LineGetter;
|
||||
import net.sourceforge.pmd.util.StringUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
@ -29,7 +29,7 @@ public class DFAPanel extends JComponent implements ListSelectionListener {
|
||||
|
||||
private int x = 150;
|
||||
private int y = 50;
|
||||
private HasLines lines;
|
||||
private LineGetter lines;
|
||||
|
||||
private void addAccessLabel(StringBuffer sb, VariableAccess va) {
|
||||
|
||||
@ -141,7 +141,7 @@ public class DFAPanel extends JComponent implements ListSelectionListener {
|
||||
}
|
||||
}
|
||||
|
||||
public void setCode(HasLines h) {
|
||||
public void setCode(LineGetter h) {
|
||||
this.lines = h;
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ public class DFAPanel extends JComponent implements ListSelectionListener {
|
||||
dfaCanvas.repaint();
|
||||
}
|
||||
|
||||
public void resetTo(List newNodes, HasLines lines) {
|
||||
public void resetTo(List newNodes, LineGetter lines) {
|
||||
dfaCanvas.setCode(lines);
|
||||
nodes.clear();
|
||||
for (Iterator i = newNodes.iterator(); i.hasNext();) {
|
||||
|
Reference in New Issue
Block a user