Skip to content

Commit 81b1f35

Browse files
committed
remove interface that was only used a single time
1 parent 9380b1f commit 81b1f35

File tree

5 files changed

+9
-44
lines changed

5 files changed

+9
-44
lines changed

java/src/processing/mode/java/DebugTray.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public class DebugTray extends JFrame {
8080
/// processing / "advanced" mode flag (currently not used)
8181
protected boolean p5mode = true;
8282

83+
// The tray will be placed at this amount from the top of the editor window,
84+
// and extend to this amount from the bottom of the editor window.
8385
final int VERTICAL_OFFSET = 64;
8486

8587

java/src/processing/mode/java/debug/LineHighlight.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @author Martin Leopold <m@martinleopold.com>
3535
*/
36-
public class LineHighlight implements LineListener {
36+
public class LineHighlight {
3737

3838
protected JavaEditor editor; // the view, used for highlighting lines by setting a background color
3939
protected Color bgColor; // the background color for highlighting lines
@@ -154,7 +154,6 @@ public boolean isOnLine(LineID testLine) {
154154
* @param oldLineIdx the old line index (0-based)
155155
* @param newLineIdx the new line index (0-based)
156156
*/
157-
@Override
158157
public void lineChanged(LineID line, int oldLineIdx, int newLineIdx) {
159158
// clear old line
160159
if (editor.isInCurrentTab(new LineID(line.fileName(), oldLineIdx))) {

java/src/processing/mode/java/debug/LineID.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class LineID implements DocumentListener {
4545
protected int lineIdx; // the line number, 0-based
4646
protected Document doc; // the Document to use for line number tracking
4747
protected Position pos; // the Position acquired during line number tracking
48-
protected Set<LineListener> listeners = new HashSet<LineListener>(); // listeners for line number changes
48+
protected Set<LineHighlight> listeners = new HashSet<LineHighlight>(); // listeners for line number changes
4949

5050
public LineID(String fileName, int lineIdx) {
5151
this.fileName = fileName;
@@ -181,7 +181,7 @@ protected synchronized void updatePosition() {
181181
int oldLineIdx = lineIdx;
182182
lineIdx = doc.getDefaultRootElement().getElementIndex(offset); // offset to lineNo
183183
if (lineIdx != oldLineIdx) {
184-
for (LineListener l : listeners) {
184+
for (LineHighlight l : listeners) {
185185
if (l != null) {
186186
l.lineChanged(this, oldLineIdx, lineIdx);
187187
} else {
@@ -197,7 +197,7 @@ protected synchronized void updatePosition() {
197197
*
198198
* @param l the listener to add
199199
*/
200-
public void addListener(LineListener l) {
200+
public void addListener(LineHighlight l) {
201201
listeners.add(l);
202202
}
203203

@@ -206,7 +206,7 @@ public void addListener(LineListener l) {
206206
*
207207
* @param l the listener to remove
208208
*/
209-
public void removeListener(LineListener l) {
209+
public void removeListener(LineHighlight l) {
210210
listeners.remove(l);
211211
}
212212

java/src/processing/mode/java/debug/LineListener.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ X removed, seems to be duplicate/used the same way
100100
_ crashed on startup w/ JavaScript mode as default b/c PdeKeyListener not found
101101
_ because it's in the other ClassLoader, can no longer rely on it
102102

103+
_ do the right thing on passing around List vs ArrayList and others
104+
103105
gui
104106
_ need 'actively pressed' version of 'play' and 'stop'
105107
_ could do rollover as well, but do other apps use them?

0 commit comments

Comments
 (0)