mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
[python] Move plugin-specific classes to the correct package
GitOrigin-RevId: 14efb7be0fd8f9614a1849c9345bcbf319f76cb9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
970cde3a72
commit
5e4dbef015
@@ -1,24 +1,22 @@
|
||||
<idea-plugin>
|
||||
<!-- Components and extensions declared in this file work ONLY in the Python plugin,
|
||||
both Community and Professional versions. -->
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<applicationService serviceInterface="com.jetbrains.python.run.PyCommonOptionsFormFactory"
|
||||
serviceImplementation="com.jetbrains.python.run.PyPluginCommonOptionsFormFactory"/>
|
||||
serviceImplementation="com.intellij.python.community.plugin.impl.run.PyPluginCommonOptionsFormFactory"/>
|
||||
<applicationService serviceInterface="com.jetbrains.python.run.PyCommonFragmentsBuilder"
|
||||
serviceImplementation="com.jetbrains.python.run.PyPluginCommonFragmentsBuilder"/>
|
||||
serviceImplementation="com.intellij.python.community.plugin.impl.run.PyPluginCommonFragmentsBuilder"/>
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<action id="PyManagePackages" class="com.jetbrains.python.packaging.PyManagePackagesAction">
|
||||
<action id="PyManagePackages" class="com.intellij.python.community.plugin.impl.packaging.PyManagePackagesAction">
|
||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||
</action>
|
||||
<action id="RunPythonToolwindowAction" class="com.jetbrains.python.console.RunPythonToolwindowAction">
|
||||
<action id="RunPythonToolwindowAction" class="com.intellij.python.community.plugin.impl.RunPythonToolwindowAction">
|
||||
</action>
|
||||
</actions>
|
||||
|
||||
<applicationListeners>
|
||||
<listener class="com.jetbrains.python.facet.PythonSdkTableListener" topic="com.intellij.openapi.projectRoots.ProjectJdkTable$Listener"/>
|
||||
<listener class="com.intellij.python.community.plugin.impl.facet.PythonSdkTableListener" topic="com.intellij.openapi.projectRoots.ProjectJdkTable$Listener"/>
|
||||
</applicationListeners>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl
|
||||
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.wm.ToolWindowManager
|
||||
import com.jetbrains.python.actions.executeCodeInConsole
|
||||
import com.jetbrains.python.console.PythonConsoleToolWindowFactory
|
||||
import com.jetbrains.python.icons.PythonIcons
|
||||
|
||||
internal class RunPythonToolwindowAction : AnAction(
|
||||
PythonIcons.Python.PythonConsoleToolWindow), DumbAware {
|
||||
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val project = e.project
|
||||
if (project == null) return
|
||||
executeCodeInConsole(project, null, null, false, false, false, null)
|
||||
}
|
||||
|
||||
override fun getActionUpdateThread(): ActionUpdateThread {
|
||||
return ActionUpdateThread.EDT
|
||||
}
|
||||
|
||||
/*
|
||||
* This action should be available only when Python Console tool window isn't registered yet
|
||||
* It's used only in Python plugin, because Console tool window is available by default in PyCharm
|
||||
*/
|
||||
override fun update(e: AnActionEvent) {
|
||||
val project = e.project
|
||||
if (project == null) return
|
||||
e.presentation.isEnabledAndVisible = ToolWindowManager.getInstance(project).getToolWindow(PythonConsoleToolWindowFactory.ID) == null
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.facet;
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.facet;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.module.Module;
|
||||
@@ -7,6 +7,7 @@ import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.roots.libraries.LibraryTable;
|
||||
import com.jetbrains.python.facet.PythonFacetSettings;
|
||||
|
||||
import static com.jetbrains.python.facet.LibraryContributingFacet.PYTHON_FACET_LIBRARY_NAME_SUFFIX;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.facet;
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.facet;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2021 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.packaging;
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.packaging;
|
||||
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
@@ -11,7 +11,7 @@ import com.jetbrains.python.sdk.PythonSdkUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
public class PyManagePackagesAction extends AnAction {
|
||||
class PyManagePackagesAction extends AnAction {
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
Module module = e.getData(PlatformCoreDataKeys.MODULE);
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2021 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.packaging;
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.packaging;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
@@ -11,6 +11,8 @@ import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.webcore.packaging.PackagesNotificationPanel;
|
||||
import com.jetbrains.python.PyBundle;
|
||||
import com.jetbrains.python.PySdkBundle;
|
||||
import com.jetbrains.python.packaging.PyPackageManagers;
|
||||
import com.jetbrains.python.packaging.PyPackagesNotificationPanel;
|
||||
import com.jetbrains.python.packaging.ui.PyInstalledPackagesPanel;
|
||||
import com.jetbrains.python.sdk.PreferredSdkComparator;
|
||||
import com.jetbrains.python.sdk.PySdkListCellRenderer;
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.run
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.run
|
||||
|
||||
import com.jetbrains.python.run.EnvFileComponent.Companion.createEnvFilesFragment
|
||||
import com.intellij.execution.ui.SettingsEditorFragment
|
||||
import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.jetbrains.python.run.AbstractPythonRunConfiguration
|
||||
import com.jetbrains.python.run.PyCommonFragmentsBuilder
|
||||
import com.jetbrains.python.run.configuration.PyInterpreterModeNotifier
|
||||
import com.jetbrains.python.run.configuration.PyPathMappingsEditorFragment
|
||||
import javax.swing.JPanel
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2021 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.run;
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.run;
|
||||
|
||||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||||
import com.intellij.openapi.module.Module;
|
||||
@@ -13,6 +13,8 @@ import com.intellij.ui.CollectionComboBoxModel;
|
||||
import com.intellij.util.PathMappingSettings;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.jetbrains.python.PyBundle;
|
||||
import com.jetbrains.python.run.AbstractPyCommonOptionsForm;
|
||||
import com.jetbrains.python.run.PyCommonOptionsFormData;
|
||||
import com.jetbrains.python.sdk.PreferredSdkComparator;
|
||||
import com.jetbrains.python.sdk.PythonSdkUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.run;
|
||||
|
||||
|
||||
import com.jetbrains.python.run.AbstractPyCommonOptionsForm;
|
||||
import com.jetbrains.python.run.PyCommonOptionsFormData;
|
||||
import com.jetbrains.python.run.PyCommonOptionsFormFactory;
|
||||
|
||||
public final class PyPluginCommonOptionsFormFactory extends PyCommonOptionsFormFactory {
|
||||
@Override
|
||||
public AbstractPyCommonOptionsForm createForm(PyCommonOptionsFormData data) {
|
||||
return new PyPluginCommonOptionsForm(data);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.run
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.run
|
||||
|
||||
import com.intellij.application.options.ModulesComboBox
|
||||
import com.intellij.execution.configuration.EnvironmentVariablesComponent
|
||||
@@ -12,6 +12,7 @@ import com.intellij.ui.RawCommandLineEditor
|
||||
import com.intellij.ui.dsl.builder.*
|
||||
import com.intellij.ui.layout.selected
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.run.AbstractPyCommonOptionsForm
|
||||
import com.jetbrains.python.sdk.PySdkListCellRenderer
|
||||
import javax.swing.JCheckBox
|
||||
import javax.swing.JRadioButton
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.run
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.plugin.impl.run
|
||||
|
||||
import com.intellij.application.options.ModulesComboBox
|
||||
import com.intellij.execution.ui.CommandLinePanel
|
||||
@@ -10,6 +10,7 @@ import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.openapi.roots.ModuleRootManager
|
||||
import com.intellij.openapi.ui.ComboBox
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.run.AbstractPythonRunConfiguration
|
||||
import com.jetbrains.python.run.configuration.PyInterpreterModeNotifier
|
||||
import com.jetbrains.python.run.configuration.PySdkComboBox
|
||||
import com.jetbrains.python.sdk.PythonSdkUtil
|
||||
@@ -1,10 +0,0 @@
|
||||
// Copyright 2000-2021 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.run;
|
||||
|
||||
|
||||
public final class PyPluginCommonOptionsFormFactory extends PyCommonOptionsFormFactory {
|
||||
@Override
|
||||
public AbstractPyCommonOptionsForm createForm(PyCommonOptionsFormData data) {
|
||||
return new PyPluginCommonOptionsForm(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user