FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

now rebuilding, but visual update not happening · haive/processing@daa6f20 · GitHub

Repository navigation

Commit daa6f20

Browse files
committed
now rebuilding, but visual update not happening
1 parent 4b86d0b commit daa6f20

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,7 @@ public void toggleDebug() {
21322132

21332133
public void updateDebugToggle() {
21342134
final boolean enabled = isDebuggerEnabled();
2135+
rebuildToolbar();
21352136
/*
21362137
if (enabled) {
21372138
inspector.setFocusableWindowState(false); // to not get focus when set visible

‎java/src/processing/mode/java/JavaToolbar.java‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.awt.event.ActionEvent;
2424
import java.awt.event.InputEvent;
2525
import java.util.ArrayList;
26-
import java.util.Arrays;
2726
import java.util.List;
2827

2928
import javax.swing.Box;
@@ -50,8 +49,12 @@ public JavaToolbar(Editor editor) {
5049
}
5150

5251

52+
@Override
5353
public List<EditorButton> createButtons() {
54-
final boolean debug = jeditor.isDebuggerEnabled();
54+
// jeditor not ready yet because this is called by super()
55+
final boolean debug = ((JavaEditor) editor).isDebuggerEnabled();
56+
// System.out.println("creating buttons in JavaToolbar, debug:" + debug);
57+
List<EditorButton> outgoing = new ArrayList<>();
5558

5659
final String runText = debug ?
5760
Language.text("toolbar.debug") : Language.text("toolbar.run");
@@ -64,6 +67,7 @@ public void actionPerformed(ActionEvent e) {
6467
handleRun(e.getModifiers());
6568
}
6669
};
70+
outgoing.add(runButton);
6771

6872
if (debug) {
6973
stepButton = new EditorButton(mode,
@@ -76,6 +80,8 @@ public void actionPerformed(ActionEvent e) {
7680
jeditor.handleStep(e.getModifiers());
7781
}
7882
};
83+
outgoing.add(stepButton);
84+
7985
continueButton = new EditorButton(mode,
8086
"/lib/toolbar/continue",
8187
Language.text("menu.debug.continue")) {
@@ -84,6 +90,7 @@ public void actionPerformed(ActionEvent e) {
8490
jeditor.handleContinue();
8591
}
8692
};
93+
outgoing.add(continueButton);
8794
}
8895

8996
stopButton = new EditorButton(mode,
@@ -94,7 +101,9 @@ public void actionPerformed(ActionEvent e) {
94101
handleStop();
95102
}
96103
};
97-
return new ArrayList<>(Arrays.asList(runButton, stopButton));
104+
outgoing.add(stopButton);
105+
106+
return outgoing;
98107
}
99108

100109

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL