Commit 4088a5c1 authored by Anton Bragin's avatar Anton Bragin Committed by intellij-monorepo-bot
Browse files

DS-3600 Context module is retrieved from the run configuration

Python console works with WSL interpreter if multiple folders are attached to the workspace.

(cherry picked from commit da7d09209e21a48ac4b9fea42a9cab8e441df005)

IJ-CR-26419

GitOrigin-RevId: 613246a882b4f7b2eb5fbe9077db0b3ba0741035
parent 82938db1
Branches unavailable Tags unavailable
Showing with 4 additions and 4 deletions
+4 -4
......@@ -182,7 +182,7 @@ private fun startNewConsoleInstance(project: Project,
consoleRunnerFactory.createConsoleRunner(project, null)
}
else {
consoleRunnerFactory.createConsoleRunnerWithFile(project, null, config)
consoleRunnerFactory.createConsoleRunnerWithFile(project, config)
}
runner.addConsoleListener { consoleView ->
if (consoleView is PyCodeExecutor) {
......
......@@ -73,8 +73,8 @@ open class PydevConsoleRunnerFactory : PythonConsoleRunnerFactory() {
consoleParameters.setupScript)
}
override fun createConsoleRunnerWithFile(project: Project, contextModule: Module?, config: PythonRunConfiguration): PydevConsoleRunner {
val consoleParameters = createConsoleParameters(project, contextModule)
override fun createConsoleRunnerWithFile(project: Project, config: PythonRunConfiguration): PydevConsoleRunner {
val consoleParameters = createConsoleParameters(project, config.module)
val sdk = if (config.sdk != null) config.sdk else consoleParameters.sdk
val workingDir = if (config.workingDirectory != null) config.workingDirectory else consoleParameters.workingDir
val consoleEnvs = mutableMapOf<String, String>()
......
......@@ -18,6 +18,6 @@ public abstract class PythonConsoleRunnerFactory {
public abstract PydevConsoleRunner createConsoleRunner(@NotNull Project project, @Nullable Module contextModule);
@NotNull
public abstract PydevConsoleRunner createConsoleRunnerWithFile(@NotNull Project project, @Nullable Module contextModule,
public abstract PydevConsoleRunner createConsoleRunnerWithFile(@NotNull Project project,
@NotNull PythonRunConfiguration config);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment