IDEA-COMMUNITY-CR-599

This commit is contained in:
Vladimir Krivosheev
2014-09-16 10:13:16 +02:00
parent 6b1cd386fb
commit 5e99101dcb
3 changed files with 6 additions and 6 deletions
@@ -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;
}
}