mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-41923 Turn PythonConsoleRunnerFactory and its implementations into services
GitOrigin-RevId: 2811efc57958aa9a8598e2e7d801c97fed71a991
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8339715a3b
commit
8e6b628d12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user