From 369b50fa62195063acf903354c35ba17c39d7dd4 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Tue, 15 Feb 2011 20:06:27 +0300 Subject: [PATCH] Removed stupid 3 seconds wait on python console launch (PY-2282) --- .../AbstractConsoleRunnerWithHistory.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java b/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java index 21bed94c1850..ef936fc4706b 100644 --- a/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java +++ b/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java @@ -108,14 +108,7 @@ public abstract class AbstractConsoleRunnerWithHistory { myProcessHandler.addProcessListener(new ProcessAdapter() { @Override public void processTerminated(ProcessEvent event) { - myRunAction.getTemplatePresentation().setEnabled(false); - myConsoleView.getConsole().setPrompt(""); - myConsoleView.getConsole().getConsoleEditor().setRendererMode(true); - ApplicationManager.getApplication().invokeLater(new Runnable() { - public void run() { - myConsoleView.getConsole().getConsoleEditor().getComponent().updateUI(); - } - }); + finishConsole(); } }); @@ -155,6 +148,17 @@ public abstract class AbstractConsoleRunnerWithHistory { myProcessHandler.startNotify(); } + protected void finishConsole() { + myRunAction.getTemplatePresentation().setEnabled(false); + myConsoleView.getConsole().setPrompt(""); + myConsoleView.getConsole().getConsoleEditor().setRendererMode(true); + ApplicationManager.getApplication().invokeLater(new Runnable() { + public void run() { + myConsoleView.getConsole().getConsoleEditor().getComponent().updateUI(); + } + }); + } + protected abstract LanguageConsoleViewImpl createConsoleView(); @Nullable