move MarkerColumn into processing.app.ui

This commit is contained in:
Ben Fry
2016-08-06 12:36:09 -04:00
parent 9f57d2a063
commit 3e4f79bbdc
3 changed files with 15 additions and 12 deletions

View File

@@ -39,10 +39,6 @@ import processing.app.Util;
import processing.app.contrib.ContributionManager;
import processing.app.syntax.*;
import processing.core.*;
import processing.mode.java.JavaMode;
import processing.mode.java.MarkerColumn;
import processing.mode.java.pdex.JavaProblem;
import processing.mode.java.pdex.JavaTextArea;
import java.awt.BorderLayout;
import java.awt.Color;
@@ -86,7 +82,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
static public final int RIGHT_GUTTER = 12;
static public final int GUTTER_MARGIN = 3;
private MarkerColumn errorColumn;
protected MarkerColumn errorColumn;
// Otherwise, if the window is resized with the message label
// set to blank, its preferredSize() will be fuckered
@@ -2934,6 +2930,15 @@ public abstract class Editor extends JFrame implements RunnerListener {
}
public void statusMessage(String message, int type) {
if (EventQueue.isDispatchThread()) {
status.message(message, type);
} else {
EventQueue.invokeLater(() -> statusMessage(message, type));
}
}
public void startIndeterminate() {
status.startIndeterminate();
}

View File

@@ -2,7 +2,7 @@
/*
Part of the Processing project - http://processing.org
Copyright (c) 2012-15 The Processing Foundation
Copyright (c) 2012-16 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
@@ -18,7 +18,7 @@ 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;
package processing.app.ui;
import java.awt.Color;
import java.awt.Cursor;
@@ -39,7 +39,6 @@ import processing.app.Sketch;
import processing.app.SketchCode;
import processing.app.ui.Editor;
import processing.core.PApplet;
import processing.mode.java.pdex.JavaProblem;
/**
@@ -63,7 +62,7 @@ public class MarkerColumn extends JPanel {
private List<LineMarker> errorPoints = new ArrayList<LineMarker>();
public MarkerColumn(JavaEditor editor, int height) {
public MarkerColumn(Editor editor, int height) {
this.editor = editor;
Mode mode = editor.getMode();
@@ -111,7 +110,7 @@ public class MarkerColumn extends JPanel {
}
public void updateErrorPoints(final List<JavaProblem> problems) {
public void updateErrorPoints(final List<Problem> problems) {
errorPoints = problems.stream()
.map(LineMarker::new)
.collect(Collectors.toList());
@@ -197,6 +196,7 @@ public class MarkerColumn extends JPanel {
return new Dimension(Editor.RIGHT_GUTTER, super.getMinimumSize().height);
}
/**
* Line markers displayed on the Error Column.
*/

View File

@@ -63,8 +63,6 @@ public class JavaEditor extends Editor {
protected VariableInspector inspector;
protected JMenuItem inspectorItem;
private MarkerColumn errorColumn;
static final int ERROR_TAB_INDEX = 0;
private boolean hasJavaTabs;