diff --git a/build/shared/lib/theme.txt b/build/shared/lib/theme.txt
index 6e40e2935..5258df487 100644
--- a/build/shared/lib/theme.txt
+++ b/build/shared/lib/theme.txt
@@ -111,12 +111,25 @@ editor.gutter.text.font = processing.mono,plain,11
#editor.gutter.text.color = #587478
editor.gutter.text.color = #bbd6d5
+# marker for breakpointed lines in left hand gutter (2 ascii characters)
+editor.gutter.breakpoint.marker = <>
+editor.gutter.breakpoint.marker.color = #4a545e
+
+# marker for the current line in left hand gutter (2 ascii characters)
+editor.gutter.currentline.marker = ->
+editor.gutter.currentline.marker.color = #e27500
+
# bgcolor for the current (highlighted) line
editor.gutter.linehighlight.color=#587478
# left- and right-hand gutter color
editor.gutter.bgcolor = #122535
+# color of vertical separation line
+#gutter.linecolor = #e9e9e9
+# space (in px) added to left and right of gutter markers
+editor.gutter.padding = 3
+
# squiggly line underneath errors in the editor
editor.error.underline.color = #C40E0E
# squiggly line underneath warnings
@@ -125,23 +138,6 @@ editor.warning.underline.color = #ffc30e
editor.column.error.color = #9F1613
editor.column.warning.color = #ffc30e
-
-# DEBUGGER
-
-# breakpointed line background color
-breakpoint.bgcolor = #f0f0f0
-# marker for breakpointed lines in left hand gutter (2 ascii characters)
-breakpoint.marker = <>
-breakpoint.marker.color = #4a545e
-
-# current line background color
-currentline.bgcolor = #ffff96
-# marker for the current line in left hand gutter (2 ascii characters)
-currentline.marker = ->
-currentline.marker.color = #e27500
-
-# color of vertical separation line
-#gutter.linecolor = #e9e9e9
-# space (in px) added to left and right of gutter markers
-gutter.padding = 3
-
+# not in use?
+#breakpoint.bgcolor = #f0f0f0
+#currentline.bgcolor = #ffff96
diff --git a/java/src/processing/mode/java/ErrorColumn.java b/java/src/processing/mode/java/ErrorColumn.java
index e477869da..24cff032b 100644
--- a/java/src/processing/mode/java/ErrorColumn.java
+++ b/java/src/processing/mode/java/ErrorColumn.java
@@ -24,8 +24,6 @@ import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
@@ -36,110 +34,84 @@ import java.util.List;
import javax.swing.JPanel;
import javax.swing.SwingWorker;
import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import processing.app.Mode;
+import processing.app.Sketch;
import processing.app.SketchCode;
import processing.app.Util;
import processing.mode.java.pdex.ErrorCheckerService;
-import processing.mode.java.pdex.ErrorMarker;
+import processing.mode.java.pdex.LineMarker;
import processing.mode.java.pdex.Problem;
import processing.app.Language;
+
/**
- * The bar on the left of the text area which displays all errors as rectangles.
+ * Implements the column to the right of the editor window that displays ticks
+ * for errors and warnings.
*
* All errors and warnings of a sketch are drawn on the bar, clicking on one,
* scrolls to the tab and location. Error messages displayed on hover. Markers
* are not in sync with the error line. Similar to eclipse's right error bar
* which displays the overall errors in a document
- *
- * @author Manindra Moharana <me@mkmoharana.com>
- *
*/
public class ErrorColumn extends JPanel {
- /**
- * Preferred height of the component
- */
- protected int preferredHeight;
+ protected JavaEditor editor;
+ protected ErrorCheckerService errorCheckerService;
- /**
- * Preferred height of the component
- */
- protected int preferredWidth = 12;
+ static final int WIDE = 12;
+// protected int preferredHeight;
+// protected int preferredWidth = 12;
- /**
- * Height of marker
- */
- public static final int errorMarkerHeight = 4;
+// static final int errorMarkerHeight = 4;
- /**
- * Color of Error Marker
- */
- public Color errorColor; // = new Color(0xED2630);
+ private Color errorColor;
+ private Color warningColor;
+ private Color backgroundColor;
- /**
- * Color of Warning Marker
- */
- public Color warningColor; // = new Color(0xFFC30E);
+ /** Stores error markers displayed PER TAB along the error bar. */
+ private List errorPoints =
+ Collections.synchronizedList(new ArrayList());
- /**
- * Background color of the component
- */
- public Color backgroundColor; // = new Color(0x2C343D);
+ /** Stores previous list of error markers. */
+ private List errorPointsOld = new ArrayList();
- /**
- * JavaEditor instance
- */
- protected JavaEditor editor;
-
- /**
- * ErrorCheckerService instance
- */
- protected ErrorCheckerService errorCheckerService;
-
- /**
- * Stores error markers displayed PER TAB along the error bar.
- */
- protected List errorPoints =
- Collections.synchronizedList(new ArrayList());
-
- /**
- * Stores previous list of error markers.
- */
- protected ArrayList errorPointsOld = new ArrayList();
public void paintComponent(Graphics g) {
- Graphics2D g2d = (Graphics2D) g;
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON);
+// Graphics2D g2d = (Graphics2D) g;
+// g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+// RenderingHints.VALUE_ANTIALIAS_ON);
g.setColor(backgroundColor);
g.fillRect(0, 0, getWidth(), getHeight());
- for (ErrorMarker emarker : errorPoints) {
- if (emarker.getType() == ErrorMarker.Error) {
+ for (LineMarker m : errorPoints) {
+ if (m.getType() == LineMarker.ERROR) {
g.setColor(errorColor);
} else {
g.setColor(warningColor);
}
- g.fillRect(2, emarker.getY(), (getWidth() - 3), errorMarkerHeight);
+ //g.fillRect(2, emarker.getY(), (getWidth() - 3), errorMarkerHeight);
+ g.drawLine(2, m.getY(), getWidth() - 2, m.getY());
}
}
- public Dimension getPreferredSize() {
- return new Dimension(preferredWidth, preferredHeight);
- }
+// public Dimension getPreferredSize() {
+// return new Dimension(preferredWidth, preferredHeight);
+// }
- public Dimension getMinimumSize() {
- return getPreferredSize();
- }
+// public Dimension getMinimumSize() {
+// return getPreferredSize();
+// }
- public ErrorColumn(JavaEditor editor, int height, JavaMode mode) {
+ public ErrorColumn(JavaEditor editor, int height) {
this.editor = editor;
- this.preferredHeight = height;
+// this.preferredHeight = height;
this.errorCheckerService = editor.errorCheckerService;
+ Mode mode = editor.getMode();
errorColor = mode.getColor("editor.column.error.color");
warningColor = mode.getColor("editor.column.warning.color");
backgroundColor = mode.getColor("editor.gutter.bgcolor");
@@ -147,12 +119,12 @@ public class ErrorColumn extends JPanel {
addListeners();
}
- /**
- * Update error markers in the error bar.
- *
- * @param problems
- * - List of problems.
- */
+
+ public List getErrorPoints() {
+ return errorPoints;
+ }
+
+
synchronized public void updateErrorPoints(final List problems) {
// NOTE TO SELF: ErrorMarkers are calculated for the present tab only
// Error Marker index in the arraylist is LOCALIZED for current tab.
@@ -162,43 +134,45 @@ public class ErrorColumn extends JPanel {
SwingWorker