mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] PY-79486 (WIP): Use real EPs to create SDKs.
The process is described in `ModulesSdkConfigurator` doc. GitOrigin-RevId: 1a21824e488a2d799b229d7c8355b60b0b177809
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a1b92b2591
commit
a35535b51a
@@ -25,6 +25,7 @@
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<python.common.toolToIconMapper implementation="com.intellij.pycharm.community.ide.impl.configuration.PyReqToolIdToIconMapper"/>
|
||||
<projectService serviceInterface="com.intellij.psi.search.ProjectScopeBuilder"
|
||||
serviceImplementation="com.intellij.pycharm.community.ide.impl.PyProjectScopeBuilder"
|
||||
overrides="true"/>
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.pycharm.community.ide.impl.configuration
|
||||
|
||||
import com.intellij.python.common.tools.ToolId
|
||||
import com.intellij.python.common.tools.spi.ToolIdToIconMapper
|
||||
import com.jetbrains.python.icons.PythonIcons
|
||||
import javax.swing.Icon
|
||||
|
||||
internal class PyReqToolIdToIconMapper : ToolIdToIconMapper {
|
||||
override val id: ToolId = PY_REQ_TOOL_ID
|
||||
override val icon: Icon = PythonIcons.Python.Virtualenv
|
||||
override val clazz: Class<*> = PythonIcons::class.java
|
||||
}
|
||||
+3
-1
@@ -45,10 +45,12 @@ import kotlin.io.path.Path
|
||||
|
||||
private val LOGGER = fileLogger()
|
||||
|
||||
internal val PY_REQ_TOOL_ID = ToolId("requirements.txt")
|
||||
|
||||
@ApiStatus.Internal
|
||||
class PyRequirementsTxtOrSetupPySdkConfiguration : PyProjectSdkConfigurationExtension {
|
||||
|
||||
override val toolId: ToolId = ToolId("PyRequirements") // This is nonsense, but will be dropped soon
|
||||
override val toolId: ToolId = PY_REQ_TOOL_ID // This is nonsense, but will be dropped soon
|
||||
|
||||
override suspend fun checkEnvironmentAndPrepareSdkCreator(module: Module): CreateSdkInfo? = prepareSdkCreator(
|
||||
{ checkManageableEnv(module) },
|
||||
|
||||
Reference in New Issue
Block a user