Skip to content

Commit 2c05841

Browse files
author
Federico Fissore
committed
EditorStatus rewritten: less shared state, shorter and cleaner code. Also fixes #666
1 parent 444babd commit 2c05841

File tree

3 files changed

+236
-381
lines changed

3 files changed

+236
-381
lines changed

app/src/processing/app/Base.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ protected void onProgress(Progress progress) {
456456
}
457457

458458
// Error during build or upload
459-
int res = editor.status.mode;
460-
if (res == EditorStatus.ERR)
459+
if (editor.status.isErr()) {
461460
System.exit(1);
461+
}
462462

463463
// No errors exit gracefully
464464
System.exit(0);

app/src/processing/app/Editor.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ public void windowDeactivated(WindowEvent e) {
250250
// For rev 0120, placing things inside a JPanel
251251
Container contentPain = getContentPane();
252252
contentPain.setLayout(new BorderLayout());
253-
JPanel pain = new JPanel();
254-
pain.setLayout(new BorderLayout());
255-
contentPain.add(pain, BorderLayout.CENTER);
253+
JPanel pane = new JPanel();
254+
pane.setLayout(new BorderLayout());
255+
contentPain.add(pane, BorderLayout.CENTER);
256256

257257
Box box = Box.createVerticalBox();
258258
Box upper = Box.createVerticalBox();
@@ -326,12 +326,12 @@ public void windowDeactivated(WindowEvent e) {
326326
// hopefully these are no longer needed w/ swing
327327
// (har har har.. that was wishful thinking)
328328
// listener = new EditorListener(this, textarea);
329-
pain.add(box);
329+
pane.add(box);
330330

331331
// get shift down/up events so we can show the alt version of toolbar buttons
332332
textarea.addKeyListener(toolbar);
333333

334-
pain.setTransferHandler(new FileDropHandler());
334+
pane.setTransferHandler(new FileDropHandler());
335335

336336
// System.out.println("t1");
337337

0 commit comments

Comments
 (0)