From 8e6b628d12402147430b6dd3d8a34e8e2e1dc6ba Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Tue, 21 Apr 2020 18:47:33 +0300 Subject: [PATCH] PY-41923 Turn PythonConsoleRunnerFactory and its implementations into services GitOrigin-RevId: 2811efc57958aa9a8598e2e7d801c97fed71a991 --- python/pluginCore/resources/META-INF/plugin.xml | 10 ++++------ .../python/console/PythonConsoleRunnerFactory.java | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/python/pluginCore/resources/META-INF/plugin.xml b/python/pluginCore/resources/META-INF/plugin.xml index 187b6eadead8..ca52580f1fa5 100644 --- a/python/pluginCore/resources/META-INF/plugin.xml +++ b/python/pluginCore/resources/META-INF/plugin.xml @@ -31,10 +31,8 @@ The Python plug-in provides smart editing for Python scripts. The feature set of org.jetbrains.plugins.terminal tanvd.grazi - - - com.jetbrains.python.console.PythonConsoleRunnerFactory - com.jetbrains.python.console.PydevConsoleRunnerFactory - - + + + diff --git a/python/src/com/jetbrains/python/console/PythonConsoleRunnerFactory.java b/python/src/com/jetbrains/python/console/PythonConsoleRunnerFactory.java index 29b4ca6975c3..39ae0513c8f4 100644 --- a/python/src/com/jetbrains/python/console/PythonConsoleRunnerFactory.java +++ b/python/src/com/jetbrains/python/console/PythonConsoleRunnerFactory.java @@ -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