mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-COMMUNITY-CR-599
This commit is contained in:
@@ -140,7 +140,7 @@ public class ConsoleExecuteAction extends DumbAwareAction {
|
||||
private boolean myAddToHistory = true;
|
||||
final boolean myPreserveMarkup;
|
||||
|
||||
boolean useProcessStdIn;
|
||||
boolean myUseProcessStdIn;
|
||||
|
||||
public ConsoleExecuteActionHandler(boolean preserveMarkup) {
|
||||
myCommandHistoryModel = new ConsoleHistoryModel();
|
||||
@@ -163,14 +163,14 @@ public class ConsoleExecuteAction extends DumbAwareAction {
|
||||
}
|
||||
|
||||
protected void runExecuteAction(@NotNull LanguageConsoleImpl console, @Nullable LanguageConsoleView consoleView) {
|
||||
if (!useProcessStdIn) {
|
||||
if (!myUseProcessStdIn) {
|
||||
beforeExecution(console);
|
||||
}
|
||||
|
||||
String text = console.prepareExecuteAction(myAddToHistory && !useProcessStdIn, myPreserveMarkup, true);
|
||||
String text = console.prepareExecuteAction(myAddToHistory && !myUseProcessStdIn, myPreserveMarkup, true);
|
||||
((UndoManagerImpl)UndoManager.getInstance(console.getProject())).invalidateActionsFor(DocumentReferenceManager.getInstance().create(console.getCurrentEditor().getDocument()));
|
||||
|
||||
if (useProcessStdIn) {
|
||||
if (myUseProcessStdIn) {
|
||||
assert consoleView != null;
|
||||
consoleView.print(text, ConsoleViewContentType.USER_INPUT);
|
||||
consoleView.print("\n", ConsoleViewContentType.USER_INPUT);
|
||||
|
||||
@@ -175,7 +175,7 @@ public final class LanguageConsoleBuilder {
|
||||
if (processInputStateKey != null) {
|
||||
assert executeActionHandler != null;
|
||||
if (PropertiesComponent.getInstance().getBoolean(processInputStateKey, false)) {
|
||||
executeActionHandler.useProcessStdIn = true;
|
||||
executeActionHandler.myUseProcessStdIn = true;
|
||||
DaemonCodeAnalyzer daemonCodeAnalyzer = DaemonCodeAnalyzer.getInstance(consoleView.getProject());
|
||||
daemonCodeAnalyzer.setHighlightingEnabled(consoleView.getConsole().getFile(), false);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,6 @@ final class UseConsoleInputAction extends ToggleAction implements DumbAware {
|
||||
|
||||
List<AnAction> actions = ActionUtil.getActions(consoleView.getConsole().getConsoleEditor().getComponent());
|
||||
ConsoleExecuteAction action = ContainerUtil.findInstance(actions, ConsoleExecuteAction.class);
|
||||
action.myExecuteActionHandler.useProcessStdIn = !state;
|
||||
action.myExecuteActionHandler.myUseProcessStdIn = !state;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user