From 149fda3d37cfa0b50747c586513a921cbff4d152 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sat, 6 Aug 2016 15:03:06 -0400 Subject: [PATCH] remove ErrorMarker hack, make it standard in Editor --- app/src/processing/app/ui/Editor.java | 10 ++++++++-- java/src/processing/mode/java/JavaEditor.java | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/ui/Editor.java b/app/src/processing/app/ui/Editor.java index 2db1e9ebb..64060dd02 100644 --- a/app/src/processing/app/ui/Editor.java +++ b/app/src/processing/app/ui/Editor.java @@ -286,11 +286,17 @@ public abstract class Editor extends JFrame implements RunnerListener { footer = createFooter(); - upper.add(textarea); + // build the central panel with the text area & error marker column + JPanel editorPanel = new JPanel(new BorderLayout()); + errorColumn = new MarkerColumn(this, textarea.getMinimumSize().height); + editorPanel.add(errorColumn, BorderLayout.EAST); + textarea.setBounds(0, 0, errorColumn.getX() - 1, textarea.getHeight()); + editorPanel.add(textarea); + upper.add(editorPanel); splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, upper, footer); - // disable this because it hides the message area, which is essential (issue #745) + // disable this because it hides the message area (Google Code issue #745) splitPane.setOneTouchExpandable(false); // repaint child panes while resizing splitPane.setContinuousLayout(true); diff --git a/java/src/processing/mode/java/JavaEditor.java b/java/src/processing/mode/java/JavaEditor.java index 14bf6d560..cf185af78 100644 --- a/java/src/processing/mode/java/JavaEditor.java +++ b/java/src/processing/mode/java/JavaEditor.java @@ -90,6 +90,7 @@ public class JavaEditor extends Editor { hasJavaTabs = checkForJavaTabs(); + /* // hack to add a JPanel to the right-hand side of the text area JPanel textAndError = new JPanel(); // parent is a vertical box with the toolbar, the header, and the text area @@ -103,6 +104,7 @@ public class JavaEditor extends Editor { textAndError.add(textarea); // add our hacked version back to the editor box.add(textAndError); + */ getPdeTextArea().setMode(jmode);