mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
moving more things into Editor
This commit is contained in:
@@ -80,21 +80,6 @@ public class JavaEditor extends Editor {
|
||||
debugger = new Debugger(this);
|
||||
inspector = new VariableInspector(this);
|
||||
|
||||
// set action on frame close
|
||||
// addWindowListener(new WindowAdapter() {
|
||||
// @Override
|
||||
// public void windowClosing(WindowEvent e) {
|
||||
// onWindowClosing(e);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// // load settings from theme.txt
|
||||
// breakpointColor = mode.getColor("breakpoint.bgcolor");
|
||||
// breakpointMarkerColor = mode.getColor("breakpoint.marker.color");
|
||||
// currentLineColor = mode.getColor("currentline.bgcolor");
|
||||
// currentLineMarkerColor = mode.getColor("currentline.marker.color");
|
||||
|
||||
// set breakpoints from marker comments
|
||||
for (LineID lineID : stripBreakpointComments()) {
|
||||
//System.out.println("setting: " + lineID);
|
||||
@@ -119,7 +104,7 @@ public class JavaEditor extends Editor {
|
||||
// add our hacked version back to the editor
|
||||
box.add(textAndError);
|
||||
|
||||
getJavaTextArea().setMode(jmode);
|
||||
getPdeTextArea().setMode(jmode);
|
||||
|
||||
preprocessingService = new PreprocessingService(this);
|
||||
pdex = new PDEX(this, preprocessingService);
|
||||
@@ -134,12 +119,6 @@ public class JavaEditor extends Editor {
|
||||
|
||||
public void windowGainedFocus(WindowEvent e) { }
|
||||
});
|
||||
|
||||
textarea.addCaretListener(new CaretListener() {
|
||||
public void caretUpdate(CaretEvent e) {
|
||||
updateEditorStatus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter {
|
||||
this.handles = handles;
|
||||
this.colorBoxes = colorBoxes;
|
||||
|
||||
initTweakInterfacePositions();
|
||||
updateTweakInterfacePositions();
|
||||
repaint();
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter {
|
||||
* synchronize this method to prevent the execution of 'paint' in the middle.
|
||||
* (don't paint while we make changes to the text of the editor)
|
||||
*/
|
||||
private synchronized void initTweakInterfacePositions() {
|
||||
private synchronized void updateTweakInterfacePositions() {
|
||||
SketchCode[] code = getEditor().getSketch().getCode();
|
||||
int prevScroll = textArea.getVerticalScrollPosition();
|
||||
String prevText = textArea.getText();
|
||||
|
||||
Reference in New Issue
Block a user