Skip to content

Commit d55eb34

Browse files
committed
remove ErrorMarker hack, make it standard in Editor
1 parent 6aea318 commit d55eb34

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/src/processing/app/ui/Editor.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,17 @@ public void caretUpdate(CaretEvent e) {
286286

287287
footer = createFooter();
288288

289-
upper.add(textarea);
289+
// build the central panel with the text area & error marker column
290+
JPanel editorPanel = new JPanel(new BorderLayout());
291+
errorColumn = new MarkerColumn(this, textarea.getMinimumSize().height);
292+
editorPanel.add(errorColumn, BorderLayout.EAST);
293+
textarea.setBounds(0, 0, errorColumn.getX() - 1, textarea.getHeight());
294+
editorPanel.add(textarea);
295+
upper.add(editorPanel);
290296

291297
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, upper, footer);
292298

293-
// disable this because it hides the message area, which is essential (issue #745)
299+
// disable this because it hides the message area (Google Code issue #745)
294300
splitPane.setOneTouchExpandable(false);
295301
// repaint child panes while resizing
296302
splitPane.setContinuousLayout(true);

java/src/processing/mode/java/JavaEditor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ protected JavaEditor(Base base, String path, EditorState state,
9090

9191
hasJavaTabs = checkForJavaTabs();
9292

93+
/*
9394
// hack to add a JPanel to the right-hand side of the text area
9495
JPanel textAndError = new JPanel();
9596
// parent is a vertical box with the toolbar, the header, and the text area
@@ -103,6 +104,7 @@ protected JavaEditor(Base base, String path, EditorState state,
103104
textAndError.add(textarea);
104105
// add our hacked version back to the editor
105106
box.add(textAndError);
107+
*/
106108

107109
getPdeTextArea().setMode(jmode);
108110

0 commit comments

Comments
 (0)