-- get rid of inheritance from AbstractConsoleRunner with history. It adds no almost...
[idea/community.git] / python / src / com / jetbrains / python / console / PydevConsoleRunnerFactory.java
index df713a8364ecb57a70e9134d01003d46e6056479..cc2f9568e257358c9462fb4db5c2aa7479569c63 100644 (file)
@@ -40,8 +40,8 @@ import java.util.Map;
  */
 public class PydevConsoleRunnerFactory extends PythonConsoleRunnerFactory {
   @Override
-  public PydevConsoleRunner createConsoleRunner(@NotNull Project project,
-                                                @Nullable Module contextModule) {
+  public PydevConsoleRunnerImpl createConsoleRunner(@NotNull Project project,
+                                                    @Nullable Module contextModule) {
     Pair<Sdk, Module> sdkAndModule = PydevConsoleRunner.findPythonSdkAndModule(project, contextModule);
 
     Module module = sdkAndModule.second;
@@ -107,23 +107,19 @@ public class PydevConsoleRunnerFactory extends PythonConsoleRunnerFactory {
     }
 
     Map<String, String> envs = Maps.newHashMap(settingsProvider.getEnvs());
-    putIPythonEnvFlag(project, envs);
-    
-    return createConsoleRunner(project, sdk, workingDir, envs, PyConsoleType.PYTHON, settingsProvider, setupFragment);
-  }
-
-  public static void putIPythonEnvFlag(@NotNull Project project, Map<String, String> envs) {
     String ipythonEnabled = PyConsoleOptions.getInstance(project).isIpythonEnabled() ? "True" : "False";
     envs.put(PythonEnvUtil.IPYTHONENABLE, ipythonEnabled);
+    
+    return createConsoleRunner(project, sdk, workingDir, envs, PyConsoleType.PYTHON, settingsProvider, setupFragment);
   }
 
-  protected PydevConsoleRunner createConsoleRunner(Project project,
-                                                   Sdk sdk,
-                                                   String workingDir,
-                                                   Map<String, String> envs,
-                                                   PyConsoleType consoleType,
-                                                   PyConsoleOptions.PyConsoleSettings settingsProvider,
-                                                   String... setupFragment) {
-    return new PydevConsoleRunner(project, sdk, consoleType, workingDir, envs, settingsProvider, setupFragment);
+  protected PydevConsoleRunnerImpl createConsoleRunner(Project project,
+                                                       Sdk sdk,
+                                                       String workingDir,
+                                                       Map<String, String> envs,
+                                                       PyConsoleType consoleType,
+                                                       PyConsoleOptions.PyConsoleSettings settingsProvider,
+                                                       String... setupFragment) {
+    return new PydevConsoleRunnerImpl(project, sdk, consoleType, workingDir, envs, settingsProvider, setupFragment);
   }
 }