void (@NotNull String text) { ApplicationManager.getApplication().executeOnPooledThread(() -> { WriteCommandAction .writeCommandAction(myConsole.getProject()) .run(() -> myQueueEditor.getDocument() .setText(text)); }); }