diff --git a/java/src/processing/mode/java/DebugTray.java b/java/src/processing/mode/java/DebugTray.java index e322efd50..a48348444 100644 --- a/java/src/processing/mode/java/DebugTray.java +++ b/java/src/processing/mode/java/DebugTray.java @@ -80,6 +80,8 @@ public class DebugTray extends JFrame { /// processing / "advanced" mode flag (currently not used) protected boolean p5mode = true; + // The tray will be placed at this amount from the top of the editor window, + // and extend to this amount from the bottom of the editor window. final int VERTICAL_OFFSET = 64; diff --git a/java/src/processing/mode/java/debug/LineHighlight.java b/java/src/processing/mode/java/debug/LineHighlight.java index 5320f1822..13ad3bfbc 100644 --- a/java/src/processing/mode/java/debug/LineHighlight.java +++ b/java/src/processing/mode/java/debug/LineHighlight.java @@ -33,7 +33,7 @@ import processing.mode.java.JavaEditor; * * @author Martin Leopold */ -public class LineHighlight implements LineListener { +public class LineHighlight { protected JavaEditor editor; // the view, used for highlighting lines by setting a background color protected Color bgColor; // the background color for highlighting lines @@ -154,7 +154,6 @@ public class LineHighlight implements LineListener { * @param oldLineIdx the old line index (0-based) * @param newLineIdx the new line index (0-based) */ - @Override public void lineChanged(LineID line, int oldLineIdx, int newLineIdx) { // clear old line if (editor.isInCurrentTab(new LineID(line.fileName(), oldLineIdx))) { diff --git a/java/src/processing/mode/java/debug/LineID.java b/java/src/processing/mode/java/debug/LineID.java index c66f716a2..96a0ff1f7 100644 --- a/java/src/processing/mode/java/debug/LineID.java +++ b/java/src/processing/mode/java/debug/LineID.java @@ -45,7 +45,7 @@ public class LineID implements DocumentListener { protected int lineIdx; // the line number, 0-based protected Document doc; // the Document to use for line number tracking protected Position pos; // the Position acquired during line number tracking - protected Set listeners = new HashSet(); // listeners for line number changes + protected Set listeners = new HashSet(); // listeners for line number changes public LineID(String fileName, int lineIdx) { this.fileName = fileName; @@ -181,7 +181,7 @@ public class LineID implements DocumentListener { int oldLineIdx = lineIdx; lineIdx = doc.getDefaultRootElement().getElementIndex(offset); // offset to lineNo if (lineIdx != oldLineIdx) { - for (LineListener l : listeners) { + for (LineHighlight l : listeners) { if (l != null) { l.lineChanged(this, oldLineIdx, lineIdx); } else { @@ -197,7 +197,7 @@ public class LineID implements DocumentListener { * * @param l the listener to add */ - public void addListener(LineListener l) { + public void addListener(LineHighlight l) { listeners.add(l); } @@ -206,7 +206,7 @@ public class LineID implements DocumentListener { * * @param l the listener to remove */ - public void removeListener(LineListener l) { + public void removeListener(LineHighlight l) { listeners.remove(l); } diff --git a/java/src/processing/mode/java/debug/LineListener.java b/java/src/processing/mode/java/debug/LineListener.java deleted file mode 100644 index 210965899..000000000 --- a/java/src/processing/mode/java/debug/LineListener.java +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ - -/* -Part of the Processing project - http://processing.org -Copyright (c) 2012-15 The Processing Foundation - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -package processing.mode.java.debug; - -/** - * A Listener for line number changes. - * - * @author Martin Leopold - */ -public interface LineListener { - - /** - * Event handler for line number changes (due to editing). - * - * @param line the line that has changed - * @param oldLineIdx the old line index (0-based) - * @param newLineIdx the new line index (0-based) - */ - void lineChanged(LineID line, int oldLineIdx, int newLineIdx); -} diff --git a/todo.txt b/todo.txt index 566531afd..5997f8ef8 100644 --- a/todo.txt +++ b/todo.txt @@ -100,6 +100,8 @@ X removed, seems to be duplicate/used the same way _ crashed on startup w/ JavaScript mode as default b/c PdeKeyListener not found _ because it's in the other ClassLoader, can no longer rely on it +_ do the right thing on passing around List vs ArrayList and others + gui _ need 'actively pressed' version of 'play' and 'stop' _ could do rollover as well, but do other apps use them?