Skip to content

Commit 68bfec0

Browse files
committed
moving more things into Editor
1 parent 1913987 commit 68bfec0

File tree

5 files changed

+16
-25
lines changed

5 files changed

+16
-25
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ public void actionPerformed(ActionEvent e) {
278278
}
279279
});
280280
}
281+
textarea.addCaretListener(new CaretListener() {
282+
public void caretUpdate(CaretEvent e) {
283+
updateEditorStatus();
284+
}
285+
});
281286

282287
footer = createFooter();
283288

core/todo.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ X Fix resizing targets for async save
1212
X https://github.com/processing/processing/pull/4607
1313
X https://github.com/processing/processing/issues/4578
1414

15+
contrib
16+
X Make loadStrings() and loadJSONObject/loadJSONArray() error msgs consistent
17+
X https://github.com/processing/processing/issues/4265
18+
X https://github.com/processing/processing/pull/4268
19+
20+
1521
_ disable OpenGL ES on Linux?
1622
_ https://github.com/processing/processing/issues/4584
1723

18-
1924
_ Can't render PGraphics object using image() within a PDF
2025
_ https://github.com/processing/processing/issues/4473
2126

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

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,6 @@ protected JavaEditor(Base base, String path, EditorState state,
8080
debugger = new Debugger(this);
8181
inspector = new VariableInspector(this);
8282

83-
// set action on frame close
84-
// addWindowListener(new WindowAdapter() {
85-
// @Override
86-
// public void windowClosing(WindowEvent e) {
87-
// onWindowClosing(e);
88-
// }
89-
// });
90-
91-
92-
// // load settings from theme.txt
93-
// breakpointColor = mode.getColor("breakpoint.bgcolor");
94-
// breakpointMarkerColor = mode.getColor("breakpoint.marker.color");
95-
// currentLineColor = mode.getColor("currentline.bgcolor");
96-
// currentLineMarkerColor = mode.getColor("currentline.marker.color");
97-
9883
// set breakpoints from marker comments
9984
for (LineID lineID : stripBreakpointComments()) {
10085
//System.out.println("setting: " + lineID);
@@ -119,7 +104,7 @@ protected JavaEditor(Base base, String path, EditorState state,
119104
// add our hacked version back to the editor
120105
box.add(textAndError);
121106

122-
getJavaTextArea().setMode(jmode);
107+
getPdeTextArea().setMode(jmode);
123108

124109
preprocessingService = new PreprocessingService(this);
125110
pdex = new PDEX(this, preprocessingService);
@@ -134,12 +119,6 @@ public void windowLostFocus(WindowEvent e) {
134119

135120
public void windowGainedFocus(WindowEvent e) { }
136121
});
137-
138-
textarea.addCaretListener(new CaretListener() {
139-
public void caretUpdate(CaretEvent e) {
140-
updateEditorStatus();
141-
}
142-
});
143122
}
144123

145124

java/src/processing/mode/java/pdex/JavaTextAreaPainter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ protected void updateTweakInterface(List<List<Handle>> handles,
234234
this.handles = handles;
235235
this.colorBoxes = colorBoxes;
236236

237-
initTweakInterfacePositions();
237+
updateTweakInterfacePositions();
238238
repaint();
239239
}
240240

@@ -244,7 +244,7 @@ protected void updateTweakInterface(List<List<Handle>> handles,
244244
* synchronize this method to prevent the execution of 'paint' in the middle.
245245
* (don't paint while we make changes to the text of the editor)
246246
*/
247-
private synchronized void initTweakInterfacePositions() {
247+
private synchronized void updateTweakInterfacePositions() {
248248
SketchCode[] code = getEditor().getSketch().getCode();
249249
int prevScroll = textArea.getVerticalScrollPosition();
250250
String prevText = textArea.getText();

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ _ https://github.com/processing/processing/issues/3965
5151
medium
5252
_ Move general PDE code out of JavaMode and into general base classes
5353
_ https://github.com/processing/processing/issues/4606
54+
_ detect changes in case with libraries
55+
_ https://github.com/processing/processing/issues/4507
5456

5557
lower
5658
_ make when opening new editor window, open on the same display as current

0 commit comments

Comments
 (0)