mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Mitigate stdout roaming through editor consoles
Still not a perfect solution; two compilation outputs will mix up anyway. A major refactor should be needed to avoid using System.out anywhere and inverse multiplexing the streams so they can be muted or replicated on any Console.
This commit is contained in:
parent
506a4c835a
commit
634fe10fa2
@ -629,9 +629,6 @@ public class Base {
|
||||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
// set the current window to be the console that's getting output
|
||||
EditorConsole.setCurrentEditorConsole(activeEditor.console);
|
||||
}
|
||||
|
||||
protected int[] defaultEditorLocation() {
|
||||
|
@ -343,6 +343,9 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
// Open the document that was passed in
|
||||
boolean loaded = handleOpenInternal(file);
|
||||
if (!loaded) sketchController = null;
|
||||
|
||||
// default the console output to the last opened editor
|
||||
EditorConsole.setCurrentEditorConsole(console);
|
||||
}
|
||||
|
||||
|
||||
@ -2536,6 +2539,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
private void handleBurnBootloader() {
|
||||
console.clear();
|
||||
EditorConsole.setCurrentEditorConsole(this.console);
|
||||
statusNotice(tr("Burning bootloader to I/O Board (this may take a minute)..."));
|
||||
new Thread(() -> {
|
||||
try {
|
||||
|
@ -631,6 +631,8 @@ public class SketchController {
|
||||
progressListener.progress(20);
|
||||
}
|
||||
|
||||
EditorConsole.setCurrentEditorConsole(editor.console);
|
||||
|
||||
ensureExistence();
|
||||
|
||||
|
||||
@ -693,6 +695,8 @@ public class SketchController {
|
||||
UploaderUtils uploaderInstance = new UploaderUtils();
|
||||
Uploader uploader = uploaderInstance.getUploaderByPreferences(false);
|
||||
|
||||
EditorConsole.setCurrentEditorConsole(editor.console);
|
||||
|
||||
boolean success = false;
|
||||
do {
|
||||
if (uploader.requiresAuthorization() && !PreferencesData.has(uploader.getAuthorizationKey())) {
|
||||
|
Loading…
Reference in New Issue
Block a user