PY-41923 Turn PythonConsoleRunnerFactory and its implementations into services

GitOrigin-RevId: 2811efc57958aa9a8598e2e7d801c97fed71a991
This commit is contained in:
Mikhail Golubev
2020-04-29 22:04:28 +00:00
committed by intellij-monorepo-bot
parent 8339715a3b
commit 8e6b628d12
2 changed files with 6 additions and 8 deletions
@@ -31,10 +31,8 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
<depends optional="true" config-file="python-terminal-plugin.xml">org.jetbrains.plugins.terminal</depends>
<depends optional="true" config-file="python-grazie-plugin.xml">tanvd.grazi</depends>
<application-components>
<component>
<interface-class>com.jetbrains.python.console.PythonConsoleRunnerFactory</interface-class>
<implementation-class>com.jetbrains.python.console.PydevConsoleRunnerFactory</implementation-class>
</component>
</application-components>
<extensions defaultExtensionNs="com.intellij">
<applicationService serviceInterface="com.jetbrains.python.console.PythonConsoleRunnerFactory"
serviceImplementation="com.jetbrains.python.console.PydevConsoleRunnerFactory" />
</extensions>
</idea-plugin>
@@ -1,7 +1,7 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.console;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.jetbrains.python.run.PythonRunConfiguration;
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
public abstract class PythonConsoleRunnerFactory {
@NotNull
public static PythonConsoleRunnerFactory getInstance() {
return ServiceManager.getService(PythonConsoleRunnerFactory.class);
return ApplicationManager.getApplication().getService(PythonConsoleRunnerFactory.class);
}
@NotNull