mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] PY-79486: (WIP) Move tools to separate modules to access them from the frontend.
We are slowly moving all tools to the separate modules to register them as EP. On the front we might have `ToolId` only. To map it to an icon we will use EP. GitOrigin-RevId: 642f4b8d77a0a14b6b61a5192607fbc7984529c7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2d853ed3ac
commit
f1a3b39973
Generated
+1
@@ -1371,6 +1371,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/python/installer/intellij.python.community.impl.installer.iml" filepath="$PROJECT_DIR$/python/installer/intellij.python.community.impl.installer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/pipenv/intellij.python.community.impl.pipenv.iml" filepath="$PROJECT_DIR$/python/pipenv/intellij.python.community.impl.pipenv.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/poetry/intellij.python.community.impl.poetry.iml" filepath="$PROJECT_DIR$/python/poetry/intellij.python.community.impl.poetry.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/impl.uv/intellij.python.community.impl.uv.iml" filepath="$PROJECT_DIR$/python/impl.uv/intellij.python.community.impl.uv.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/python-venv/intellij.python.community.impl.venv.iml" filepath="$PROJECT_DIR$/python/python-venv/intellij.python.community.impl.venv.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/interpreters/intellij.python.community.interpreters.iml" filepath="$PROJECT_DIR$/python/interpreters/intellij.python.community.interpreters.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/python/junit5Tests-framework/intellij.python.community.junit5Tests.framework.iml" filepath="$PROJECT_DIR$/python/junit5Tests-framework/intellij.python.community.junit5Tests.framework.iml" />
|
||||
|
||||
@@ -1418,6 +1418,7 @@ python/ide/impl
|
||||
python/ide/impl/intellij.pycharm.community.ide.impl.promotion
|
||||
python/ide/implTraining/intellij.pycharm.community.ide.implTraining
|
||||
python/impl.helperLocator
|
||||
python/impl.uv
|
||||
python/installer
|
||||
python/intellij.python.community.communityOnly
|
||||
python/intellij.python.ml.features
|
||||
|
||||
@@ -353,6 +353,7 @@ jvm_library(
|
||||
"//python/python-exec-service/execService.python",
|
||||
"//python/interpreters",
|
||||
"//python/python-sdk-configurator/common",
|
||||
"//python/impl.uv",
|
||||
],
|
||||
exports = [
|
||||
"//python/openapi:community",
|
||||
|
||||
@@ -102,6 +102,4 @@ public final class PythonIcons {
|
||||
@ScheduledForRemoval
|
||||
public static final @NotNull Icon ViewAsImage = load("icons/com/jetbrains/pythonCore/python/expui/viewAsImage.svg", "icons/com/jetbrains/pythonCore/python/viewAsImage.svg", 0, 0);
|
||||
}
|
||||
|
||||
/** 16x16 */ public static final @NotNull Icon UV = load("icons/com/jetbrains/pythonCore/python/expui/uv.svg", -856014559, 0);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ jvm_library(
|
||||
"//python/python-exec-service:community-execService",
|
||||
"//python/python-sdk-configurator/common",
|
||||
"//python/python-sdk-ui:sdk-ui",
|
||||
"//python/impl.uv",
|
||||
],
|
||||
runtime_deps = ["//python/python-features-trainer:featuresTrainer"],
|
||||
plugins = ["@lib//:compose-plugin"]
|
||||
@@ -144,6 +145,7 @@ jvm_library(
|
||||
"//python/python-exec-service:community-execService_test_lib",
|
||||
"//python/python-sdk-configurator/common",
|
||||
"//python/python-sdk-ui:sdk-ui",
|
||||
"//python/impl.uv",
|
||||
],
|
||||
plugins = ["@lib//:compose-plugin"]
|
||||
)
|
||||
|
||||
@@ -83,5 +83,6 @@
|
||||
<orderEntry type="module" module-name="intellij.python.community.execService" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdkConfigurator.common" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdk.ui" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.impl.uv" />
|
||||
</component>
|
||||
</module>
|
||||
+3
-3
@@ -10,13 +10,13 @@ import com.intellij.python.hatch.HatchVirtualEnvironment
|
||||
import com.intellij.python.hatch.PythonVirtualEnvironment
|
||||
import com.intellij.python.hatch.cli.HatchEnvironment
|
||||
import com.intellij.python.hatch.getHatchService
|
||||
import com.intellij.python.sdk.ui.icons.PythonSdkUIIcons
|
||||
import com.intellij.python.hatch.impl.HATCH_TOOL_ID
|
||||
import com.intellij.python.hatch.impl.HATCH_UI_INFO
|
||||
import com.jetbrains.python.PyToolUIInfo
|
||||
import com.jetbrains.python.ToolId
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.getOrLogException
|
||||
import com.jetbrains.python.hatch.sdk.createSdk
|
||||
import com.jetbrains.python.projectModel.hatch.HATCH_TOOL_ID
|
||||
import com.jetbrains.python.sdk.configuration.*
|
||||
import com.jetbrains.python.util.runWithModalBlockingOrInBackground
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
@@ -27,7 +27,7 @@ class PyHatchSdkConfiguration : PyProjectTomlConfigurationExtension {
|
||||
private val LOGGER = Logger.getInstance(PyHatchSdkConfiguration::class.java)
|
||||
}
|
||||
|
||||
override val toolInfo: PyToolUIInfo = PyToolUIInfo("Hatch", PythonSdkUIIcons.Tools.Hatch)
|
||||
override val toolInfo: PyToolUIInfo = HATCH_UI_INFO
|
||||
override val toolId: ToolId = HATCH_TOOL_ID
|
||||
|
||||
override suspend fun checkEnvironmentAndPrepareSdkCreator(module: Module): CreateSdkInfo? = prepareSdkCreator(
|
||||
|
||||
+3
-2
@@ -11,6 +11,8 @@ import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.platform.ide.progress.withBackgroundProgress
|
||||
import com.intellij.platform.util.progress.reportRawProgress
|
||||
import com.intellij.pycharm.community.ide.impl.PyCharmCommunityCustomizationBundle
|
||||
import com.intellij.python.community.impl.poetry.impl.POETRY_TOOL_ID
|
||||
import com.intellij.python.community.impl.poetry.impl.POETRY_UI_INFO
|
||||
import com.intellij.python.pyproject.PyProjectToml
|
||||
import com.intellij.python.sdk.ui.icons.PythonSdkUIIcons
|
||||
import com.jetbrains.python.PyBundle
|
||||
@@ -19,7 +21,6 @@ import com.jetbrains.python.ToolId
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.poetry.findPoetryLock
|
||||
import com.jetbrains.python.poetry.getPyProjectTomlForPoetry
|
||||
import com.jetbrains.python.projectModel.poetry.POETRY_TOOL_ID
|
||||
import com.jetbrains.python.sdk.PythonSdkType
|
||||
import com.jetbrains.python.sdk.basePath
|
||||
import com.jetbrains.python.sdk.configuration.*
|
||||
@@ -40,7 +41,7 @@ class PyPoetrySdkConfiguration : PyProjectTomlConfigurationExtension {
|
||||
private val LOGGER = Logger.getInstance(PyPoetrySdkConfiguration::class.java)
|
||||
}
|
||||
|
||||
override val toolInfo: PyToolUIInfo = PyToolUIInfo("Poetry", PythonSdkUIIcons.Tools.Poetry)
|
||||
override val toolInfo: PyToolUIInfo = POETRY_UI_INFO
|
||||
override val toolId: ToolId = POETRY_TOOL_ID
|
||||
|
||||
override suspend fun checkEnvironmentAndPrepareSdkCreator(module: Module): CreateSdkInfo? = prepareSdkCreator(
|
||||
|
||||
+3
-2
@@ -9,6 +9,8 @@ import com.intellij.openapi.util.UserDataHolderBase
|
||||
import com.intellij.openapi.util.io.toNioPathOrNull
|
||||
import com.intellij.openapi.vfs.readText
|
||||
import com.intellij.pycharm.community.ide.impl.PyCharmCommunityCustomizationBundle
|
||||
import com.intellij.python.community.impl.uv.UV_TOOL_ID
|
||||
import com.intellij.python.community.impl.uv.UV_UI_INFO
|
||||
import com.intellij.python.pyproject.PyProjectToml
|
||||
import com.intellij.python.pyproject.model.api.SuggestedSdk
|
||||
import com.intellij.python.pyproject.model.api.suggestSdk
|
||||
@@ -18,7 +20,6 @@ import com.jetbrains.python.ToolId
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.getOrLogException
|
||||
import com.jetbrains.python.onSuccess
|
||||
import com.jetbrains.python.projectModel.uv.UV_TOOL_ID
|
||||
import com.jetbrains.python.sdk.*
|
||||
import com.jetbrains.python.sdk.configuration.*
|
||||
import com.jetbrains.python.sdk.legacy.PythonSdkUtil
|
||||
@@ -39,7 +40,7 @@ class PyUvSdkConfiguration : PyProjectTomlConfigurationExtension {
|
||||
private val existingSdks by lazy { PythonSdkUtil.getAllSdks() }
|
||||
private val context = UserDataHolderBase()
|
||||
|
||||
override val toolInfo: PyToolUIInfo = PyToolUIInfo("uv", PythonSdkUIIcons.Tools.UV)
|
||||
override val toolInfo: PyToolUIInfo = UV_UI_INFO
|
||||
override val toolId: ToolId = UV_TOOL_ID
|
||||
|
||||
override suspend fun checkEnvironmentAndPrepareSdkCreator(module: Module): CreateSdkInfo? = prepareSdkCreator(
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
### auto-generated section `build intellij.python.community.impl.uv` start
|
||||
load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup")
|
||||
|
||||
resourcegroup(
|
||||
name = "impl.uv_resources",
|
||||
srcs = glob(["resources/**/*"]),
|
||||
strip_prefix = "resources"
|
||||
)
|
||||
|
||||
jvm_library(
|
||||
name = "impl.uv",
|
||||
module_name = "intellij.python.community.impl.uv",
|
||||
visibility = ["//visibility:public"],
|
||||
srcs = glob(["gen/**/*.kt", "gen/**/*.java", "src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True),
|
||||
resources = [":impl.uv_resources"],
|
||||
deps = [
|
||||
"@lib//:kotlin-stdlib",
|
||||
"//python/python-pyproject:pyproject",
|
||||
"//python/openapi:community",
|
||||
"//plugins/toml/core",
|
||||
"@lib//:jetbrains-annotations",
|
||||
"//platform/util",
|
||||
"//platform/core-api:core",
|
||||
]
|
||||
)
|
||||
### auto-generated section `build intellij.python.community.impl.uv` end
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// 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.python.community.impl.uv.icons;
|
||||
|
||||
import com.intellij.ui.IconManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* NOTE THIS FILE IS AUTO-GENERATED
|
||||
* DO NOT EDIT IT BY HAND, run "Generate icon classes" configuration instead
|
||||
*/
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
public final class PythonCommunityImplUVIcons {
|
||||
private static @NotNull Icon load(@NotNull String path, int cacheKey, int flags) {
|
||||
return IconManager.getInstance().loadRasterizedIcon(path, PythonCommunityImplUVIcons.class.getClassLoader(), cacheKey, flags);
|
||||
}
|
||||
/** 16x16 */ public static final @NotNull Icon UV = load("images/com/intellij/python/community/impl/uv/expui/uv.svg", -856014559, 0);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="com.intellij.python.community.impl.uv" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="kotlin-stdlib" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.python.pyproject" />
|
||||
<orderEntry type="module" module-name="intellij.python.community" />
|
||||
<orderEntry type="module" module-name="intellij.toml.core" />
|
||||
<orderEntry type="library" name="jetbrains-annotations" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core" />
|
||||
</component>
|
||||
</module>
|
||||
|
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
@@ -0,0 +1,11 @@
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.python.sdk"/>
|
||||
<module name="intellij.toml.core"/>
|
||||
<module name="intellij.python.community"/>
|
||||
<module name="intellij.python.pyproject"/>
|
||||
</dependencies>
|
||||
<extensions defaultExtensionNs="com.intellij.python.pyproject.model">
|
||||
<tool implementation="com.intellij.python.community.impl.uv.UvTool"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+4
-2
@@ -1,9 +1,10 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.projectModel.uv
|
||||
package com.intellij.python.community.impl.uv
|
||||
|
||||
import com.intellij.openapi.diagnostic.fileLogger
|
||||
import com.intellij.openapi.util.NlsSafe
|
||||
import com.intellij.openapi.util.getPathMatcher
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.intellij.python.pyproject.model.spi.ProjectName
|
||||
import com.intellij.python.pyproject.model.spi.ProjectStructureInfo
|
||||
import com.intellij.python.pyproject.model.spi.PyProjectTomlProject
|
||||
@@ -11,7 +12,6 @@ import com.intellij.python.pyproject.model.spi.Tool
|
||||
import com.intellij.util.concurrency.annotations.RequiresBackgroundThread
|
||||
import com.jetbrains.python.PyToolUIInfo
|
||||
import com.jetbrains.python.ToolId
|
||||
import com.jetbrains.python.sdk.uv.UV_UI_INFO
|
||||
import com.jetbrains.python.venvReader.Directory
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -26,6 +26,8 @@ import kotlin.io.path.relativeTo
|
||||
@ApiStatus.Internal
|
||||
val UV_TOOL_ID: ToolId = ToolId("uv")
|
||||
|
||||
val UV_UI_INFO: PyToolUIInfo = PyToolUIInfo("uv", PythonCommunityImplUVIcons.UV)
|
||||
|
||||
internal class UvTool : Tool {
|
||||
|
||||
override val id: ToolId = UV_TOOL_ID
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@ApiStatus.Internal
|
||||
package com.jetbrains.python.projectModel;
|
||||
package com.intellij.python.community.impl.uv;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -190,5 +190,6 @@
|
||||
<orderEntry type="module" module-name="intellij.python.community.execService.python" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.interpreters" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdkConfigurator.common" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.impl.uv" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -66,6 +66,9 @@
|
||||
- name: lib/modules/intellij.python.community.impl.poetry.jar
|
||||
contentModules:
|
||||
- name: intellij.python.community.impl.poetry
|
||||
- name: lib/modules/intellij.python.community.impl.uv.jar
|
||||
contentModules:
|
||||
- name: intellij.python.community.impl.uv
|
||||
- name: lib/modules/intellij.python.community.impl.venv.jar
|
||||
contentModules:
|
||||
- name: intellij.python.community.impl.venv
|
||||
|
||||
@@ -37,6 +37,7 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
|
||||
<module name="intellij.python.sdkConfigurator.backend"/>
|
||||
<module name="intellij.python.sdkConfigurator.frontend"/>
|
||||
<module name="intellij.python.community.impl.poetry" loading="required"/>
|
||||
<module name="intellij.python.community.impl.uv" loading="required"/>
|
||||
<module name="intellij.python.community.impl.pipenv" loading="required"/>
|
||||
<module name="intellij.python.community.core.impl" loading="required"/>
|
||||
<module name="intellij.python.community.helpersLocator" loading="required"/>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<module name="intellij.python.community.execService.python"/>
|
||||
<module name="intellij.python.community.interpreters"/>
|
||||
<module name="intellij.python.community.impl.poetry"/>
|
||||
<module name="intellij.python.community.impl.uv"/>
|
||||
<module name="intellij.python.community.impl.pipenv"/>
|
||||
<module name="intellij.python.hatch"/>
|
||||
<module name="intellij.python.pydev"/>
|
||||
@@ -52,8 +53,10 @@
|
||||
language="Python"
|
||||
nameKey="INLAY.type.hints"
|
||||
providerId="python.type.inlays">
|
||||
<option bundle="messages.PyPsiBundle" descriptionKey="INLAY.reveal.type" enabledByDefault="true" nameKey="INLAY.reveal.type" optionId="python.type.inlays.reveal_type" />
|
||||
<option bundle="messages.PyPsiBundle" descriptionKey="INLAY.function.return" enabledByDefault="false" nameKey="INLAY.function.return" optionId="python.type.inlays.function.return" />
|
||||
<option bundle="messages.PyPsiBundle" descriptionKey="INLAY.reveal.type" enabledByDefault="true" nameKey="INLAY.reveal.type"
|
||||
optionId="python.type.inlays.reveal_type"/>
|
||||
<option bundle="messages.PyPsiBundle" descriptionKey="INLAY.function.return" enabledByDefault="false" nameKey="INLAY.function.return"
|
||||
optionId="python.type.inlays.function.return"/>
|
||||
</codeInsight.declarativeInlayProvider>
|
||||
|
||||
|
||||
@@ -81,11 +84,7 @@
|
||||
<virtualFileCustomDataProvider implementation="com.jetbrains.python.psi.PyLangLevelVirtualFileCustomDataProvider"/>
|
||||
</extensions>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij.python.pyproject.model">
|
||||
<tool implementation="com.jetbrains.python.projectModel.poetry.PoetryTool"/>
|
||||
<tool implementation="com.jetbrains.python.projectModel.uv.UvTool"/>
|
||||
<tool implementation="com.jetbrains.python.projectModel.hatch.HatchTool"/>
|
||||
</extensions>
|
||||
|
||||
|
||||
<projectListeners>
|
||||
<listener
|
||||
|
||||
@@ -11,13 +11,18 @@ jvm_library(
|
||||
name = "poetry",
|
||||
module_name = "intellij.python.community.impl.poetry",
|
||||
visibility = ["//visibility:public"],
|
||||
srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True),
|
||||
srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form", "gen/**/*.kt", "gen/**/*.java"], allow_empty = True),
|
||||
resources = [":poetry_resources"],
|
||||
deps = [
|
||||
"@lib//:kotlin-stdlib",
|
||||
"@lib//:jetbrains-annotations",
|
||||
"//platform/core-api:core",
|
||||
"//python/python-sdk:sdk",
|
||||
"//python/openapi:community",
|
||||
"//plugins/toml/core",
|
||||
"//python/python-pyproject:pyproject",
|
||||
"//platform/util/base/multiplatform",
|
||||
"//platform/util",
|
||||
]
|
||||
)
|
||||
### auto-generated section `build intellij.python.community.impl.poetry` end
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// 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.python.community.impl.poetry.icons;
|
||||
|
||||
import com.intellij.ui.IconManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* NOTE THIS FILE IS AUTO-GENERATED
|
||||
* DO NOT EDIT IT BY HAND, run "Generate icon classes" configuration instead
|
||||
*/
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
public final class PythonCommunityImplPoetryIcons {
|
||||
private static @NotNull Icon load(@NotNull String path, int cacheKey, int flags) {
|
||||
return IconManager.getInstance().loadRasterizedIcon(path, PythonCommunityImplPoetryIcons.class.getClassLoader(), cacheKey, flags);
|
||||
}
|
||||
/** 16x16 */ public static final @NotNull Icon Poetry = load("icons/com/intellij/python/community/impl/poetry/expui/poetry.svg", -142471747, 0);
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
@@ -12,5 +13,10 @@
|
||||
<orderEntry type="library" name="jetbrains-annotations" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdk" />
|
||||
<orderEntry type="module" module-name="intellij.python.community" />
|
||||
<orderEntry type="module" module-name="intellij.toml.core" />
|
||||
<orderEntry type="module" module-name="intellij.python.pyproject" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util.base.multiplatform" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||
</component>
|
||||
</module>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -1,5 +1,11 @@
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.python.sdk"/>
|
||||
<module name="intellij.toml.core"/>
|
||||
<module name="intellij.python.community"/>
|
||||
<module name="intellij.python.pyproject"/>
|
||||
</dependencies>
|
||||
<extensions defaultExtensionNs="com.intellij.python.pyproject.model">
|
||||
<tool implementation="com.intellij.python.community.impl.poetry.impl.PoetryTool"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+5
-4
@@ -1,12 +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.jetbrains.python.projectModel.poetry
|
||||
package com.intellij.python.community.impl.poetry.impl
|
||||
|
||||
|
||||
import com.intellij.openapi.util.NlsSafe
|
||||
import com.intellij.python.community.impl.poetry.icons.PythonCommunityImplPoetryIcons
|
||||
import com.intellij.python.pyproject.model.spi.ProjectName
|
||||
import com.intellij.python.pyproject.model.spi.ProjectStructureInfo
|
||||
import com.intellij.python.pyproject.model.spi.PyProjectTomlProject
|
||||
import com.intellij.python.pyproject.model.spi.Tool
|
||||
import com.intellij.python.sdk.ui.icons.PythonSdkUIIcons
|
||||
import com.jetbrains.python.PyToolUIInfo
|
||||
import com.jetbrains.python.ToolId
|
||||
import com.jetbrains.python.venvReader.Directory
|
||||
@@ -15,11 +16,11 @@ import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
val POETRY_TOOL_ID: ToolId = ToolId("poetry")
|
||||
|
||||
val POETRY_UI_INFO: PyToolUIInfo = PyToolUIInfo("Poetry", PythonCommunityImplPoetryIcons.Poetry)
|
||||
internal class PoetryTool : Tool {
|
||||
|
||||
override val id: ToolId = POETRY_TOOL_ID
|
||||
override val ui: PyToolUIInfo = PyToolUIInfo("Poetry", PythonSdkUIIcons.Tools.Poetry)
|
||||
override val ui: PyToolUIInfo = POETRY_UI_INFO
|
||||
|
||||
override suspend fun getSrcRoots(toml: TomlTable, projectRoot: Directory): Set<Directory> = emptySet()
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@Internal
|
||||
package com.intellij.python.community.impl.poetry.impl;
|
||||
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
@@ -32,11 +32,11 @@ jvm_library(
|
||||
"//python/openapi:community",
|
||||
"//python/python-exec-service:community-execService",
|
||||
"//python/python-sdk:sdk",
|
||||
"//python/python-sdk-ui:sdk-ui",
|
||||
"//python/python-pyproject:pyproject",
|
||||
"//libraries/kotlinx/serialization/json",
|
||||
"//libraries/kotlinx/serialization/core",
|
||||
"@lib//:io-github-z4kn4fein-semver-jvm-provided",
|
||||
"//python/python-sdk-ui:sdk-ui",
|
||||
]
|
||||
)
|
||||
### auto-generated section `build intellij.python.hatch` end
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@ApiStatus.Internal
|
||||
package com.jetbrains.python.projectModel.hatch;
|
||||
@Internal
|
||||
package com.intellij.python.hatch.icons;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
@@ -41,10 +41,10 @@
|
||||
<orderEntry type="module" module-name="intellij.python.community" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.execService" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdk" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdk.ui" />
|
||||
<orderEntry type="module" module-name="intellij.python.pyproject" />
|
||||
<orderEntry type="module" module-name="intellij.libraries.kotlinx.serialization.json" />
|
||||
<orderEntry type="module" module-name="intellij.libraries.kotlinx.serialization.core" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="io.github.z4kn4fein.semver.jvm" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdk.ui" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -12,4 +12,7 @@
|
||||
order="after CondaEvoProvider"
|
||||
implementation="com.intellij.python.hatch.sdk.evolution.HatchSelectSdkProvider"/>
|
||||
</extensions>
|
||||
<extensions defaultExtensionNs="com.intellij.python.pyproject.model">
|
||||
<tool implementation="com.intellij.python.hatch.impl.HatchTool"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@ApiStatus.Internal
|
||||
package com.jetbrains.python.projectModel.uv;
|
||||
@Internal
|
||||
package com.intellij.python.hatch.cli;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
+4
-3
@@ -1,12 +1,12 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.projectModel.hatch
|
||||
package com.intellij.python.hatch.impl
|
||||
|
||||
import com.intellij.openapi.util.NlsSafe
|
||||
import com.intellij.python.hatch.icons.PythonHatchIcons
|
||||
import com.intellij.python.pyproject.model.spi.ProjectName
|
||||
import com.intellij.python.pyproject.model.spi.ProjectStructureInfo
|
||||
import com.intellij.python.pyproject.model.spi.PyProjectTomlProject
|
||||
import com.intellij.python.pyproject.model.spi.Tool
|
||||
import com.intellij.python.sdk.ui.icons.PythonSdkUIIcons
|
||||
import com.jetbrains.python.PyToolUIInfo
|
||||
import com.jetbrains.python.ToolId
|
||||
import com.jetbrains.python.venvReader.Directory
|
||||
@@ -15,11 +15,12 @@ import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@ApiStatus.Internal
|
||||
val HATCH_TOOL_ID: ToolId = ToolId("hatch")
|
||||
val HATCH_UI_INFO: PyToolUIInfo = PyToolUIInfo("Hatch", PythonHatchIcons.Logo)
|
||||
|
||||
internal class HatchTool : Tool {
|
||||
|
||||
override val id: ToolId = HATCH_TOOL_ID
|
||||
override val ui: PyToolUIInfo = PyToolUIInfo("Hatch", PythonSdkUIIcons.Tools.Hatch)
|
||||
override val ui: PyToolUIInfo = HATCH_UI_INFO
|
||||
|
||||
override suspend fun getSrcRoots(toml: TomlTable, projectRoot: Directory): Set<Directory> = emptySet()
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@ApiStatus.Internal
|
||||
package com.jetbrains.python.projectModel.common;
|
||||
@Internal
|
||||
package com.intellij.python.hatch.impl;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@ApiStatus.Internal
|
||||
package com.jetbrains.python.projectModel.poetry;
|
||||
@Internal
|
||||
package com.intellij.python.hatch.runtime;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
@@ -0,0 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@Internal
|
||||
package com.intellij.python.hatch.sdk.evolution;
|
||||
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
@@ -0,0 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@Internal
|
||||
package com.intellij.python.hatch.service;
|
||||
|
||||
import static org.jetbrains.annotations.ApiStatus.Internal;
|
||||
@@ -28,6 +28,8 @@ jvm_library(
|
||||
"//libraries/caffeine",
|
||||
"@lib//:io-github-z4kn4fein-semver-jvm",
|
||||
"//python/python-exec-service:community-execService",
|
||||
"//python/poetry",
|
||||
"//python/impl.uv",
|
||||
]
|
||||
)
|
||||
### auto-generated section `build intellij.python.sdk.ui` end
|
||||
@@ -20,9 +20,6 @@ public final class PythonSdkUIIcons {
|
||||
|
||||
public static final class Tools {
|
||||
/** 16x16 */ public static final @NotNull Icon Anaconda = load("icons/com/intellij/python/sdk/ui/expui/tools/anaconda.svg", 1479605221, 2);
|
||||
/** 16x16 */ public static final @NotNull Icon Hatch = load("icons/com/intellij/python/sdk/ui/expui/tools/hatch.svg", -958563001, 0);
|
||||
/** 16x16 */ public static final @NotNull Icon Pip = load("icons/com/intellij/python/sdk/ui/expui/tools/pip.svg", 123856126, 0);
|
||||
/** 16x16 */ public static final @NotNull Icon Poetry = load("icons/com/intellij/python/sdk/ui/expui/tools/poetry.svg", -142471747, 0);
|
||||
/** 16x16 */ public static final @NotNull Icon UV = load("icons/com/intellij/python/sdk/ui/expui/tools/uv.svg", -883297877, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +23,7 @@
|
||||
<orderEntry type="module" module-name="intellij.libraries.caffeine" />
|
||||
<orderEntry type="library" name="io.github.z4kn4fein.semver.jvm" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.execService" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.impl.poetry" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.impl.uv" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,76 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M543.5 406.195L549 369.195L492 392.695L428 421.695L445 433.695L508 440.195L543.5 406.195Z" fill="url(#paint0_linear_5_2)"/>
|
||||
<path d="M556.5 299.195L608.5 332.695L591 351.195L556.5 363.695L530.5 377.695L491 393.695L439.5 416.195L390.5 427.695L400 391.195L317 377.695L294 357.695L286 299.195L299.5 286.195L341.5 250.695L366 234.695L396.5 231.195V261.695L429.5 254.195L492.5 273.195H510L523 310.195L556.5 299.195Z" fill="#E9D77A" stroke="black"/>
|
||||
<path d="M586 353.195L609 334.695L619 348.195L628.5 377.695V409.195L616.5 440.695L594.5 472.195L558 502.195L535.5 533.195L526 559.695L504 568.195L437 599.195L390.5 647.695L397 602.695L421.5 536.195L457 493.195L502 448.695L541 401.195L547.5 365.195L586 353.195Z" fill="#FDF7DD" stroke="black"/>
|
||||
<path d="M636.5 274.195L560 296.695V297.195L609.5 331.195L632 383.695L613 450.195L579 481.695L537.5 535.195L526 556.195L560 585.695L570 556.195L628.5 495.195L660 443.195L667.5 363.195L636.5 274.195Z" fill="#19A2F4" stroke="black"/>
|
||||
<path d="M657.5 446.695L736.5 433.695L717 380.195L669 367.695L657.5 446.695Z" fill="url(#paint1_linear_5_2)"/>
|
||||
<path d="M230.5 185.695L298.5 126.195L351.5 154.695L325 181.695L357.5 217.695H385L395 225.195L364.5 233.195L317.5 270.695L270.5 251.195V233.195L257.5 204.195L220.5 199.695L230.5 185.695Z" fill="url(#paint2_linear_5_2)"/>
|
||||
<path d="M200 461.195L297 474.695L313.5 499.195L355 461.195L380 503.695L423.5 463.195L454.5 486.695L416 556.195L386.5 647.195L333.5 590.695V566.695L276.5 556.195L226.5 503.695L219.5 521.195L195 499.195L200 461.195Z" fill="url(#paint3_linear_5_2)"/>
|
||||
<path d="M553.5 581.695L638 487.695L655.5 481.695L688 504.695L716 487.695L732 498.695H752.5L768.5 476.695L790.5 466.195L825 478.695V487.695L724.5 518.695L713 546.695H662.5L641 599.695H575.5L553.5 581.695Z" fill="url(#paint4_linear_5_2)"/>
|
||||
<path d="M848.5 566.695L829.5 484.695L727.5 518.695L713 545.195H661.5L642.5 600.195H576.5L527 559.195L435.5 600.195L385.5 649.195L338 591.695L335 566.695L277.5 556.195L225.5 499.195L218.5 518.195L190 499.195C187.333 511.028 181.8 536.695 181 544.695C180 554.695 163 653.695 169.5 736.695C176 819.695 271 910.695 305.5 925.195C340 939.695 474 985.195 646 951.195C783.6 923.995 838.333 780.195 848.5 711.695V566.695Z" fill="url(#paint5_radial_5_2)"/>
|
||||
<path d="M571 77.1947C463.861 37.8394 340.581 83.6949 294 121.695L352.5 151.195L325 181.695L358 217.195L396 217.195L396 258.695L462.5 244.695L485.5 270.195L508.5 276.195L523 309.695L643 270.195L675.5 364.695L714 382.695L738.5 431.695L754 438.269C776.5 364.695 769.5 390.695 776.5 336.433C773.5 273.195 764.226 234.29 745 211.195C725.774 188.1 704.923 126.389 571 77.1947Z" fill="url(#paint6_radial_5_2)"/>
|
||||
<path d="M510 439.695C492.5 440.361 450.1 438.395 420.5 425.195" stroke="black" stroke-width="16"/>
|
||||
<path d="M547 377.195C563.333 390.695 602.6 413.195 629 395.195" stroke="black" stroke-width="10"/>
|
||||
<path d="M524.5 430.195C526.5 446.528 541.7 478.795 586.5 477.195" stroke="black" stroke-width="10"/>
|
||||
<path d="M471 477.195C475.348 491.921 495.835 521.939 543 524.195" stroke="black" stroke-width="10"/>
|
||||
<path d="M417.5 556.195C427.667 566.361 456.1 584.595 488.5 576.195" stroke="black" stroke-width="10"/>
|
||||
<path d="M552.5 298.695C610.5 316.695 637 364.695 628.5 406.195C611.673 488.349 562.5 470.695 524.5 557.695" stroke="black" stroke-width="10"/>
|
||||
<path d="M168 416.195C281 469.695 341.333 419.028 366 388.695L332.5 381.195C310.5 427.995 214.167 424.028 168 416.195Z" fill="#E356E9"/>
|
||||
<path d="M366 388.695L369.879 391.849L374.977 385.581L367.092 383.816L366 388.695ZM168 416.195L168.836 411.265C166.374 410.847 163.981 412.311 163.231 414.693C162.481 417.075 163.603 419.645 165.86 420.714L168 416.195ZM332.5 381.195L333.592 376.316L329.68 375.44L327.975 379.068L332.5 381.195ZM362.121 385.54C350.162 400.246 329.689 419.713 298.677 429.097C267.772 438.448 225.721 437.991 170.14 411.676L165.86 420.714C223.279 447.899 267.895 448.858 301.573 438.668C335.144 428.51 357.171 407.477 369.879 391.849L362.121 385.54ZM167.164 421.124C190.562 425.094 226.689 428.099 259.903 424.147C276.512 422.171 292.64 418.428 306.149 412.027C319.678 405.617 330.883 396.387 337.025 383.322L327.975 379.068C323.117 389.403 314.031 397.227 301.867 402.99C289.683 408.763 274.717 412.314 258.722 414.217C226.728 418.024 191.605 415.128 168.836 411.265L167.164 421.124ZM367.092 383.816L333.592 376.316L331.408 386.074L364.908 393.574L367.092 383.816Z" fill="black"/>
|
||||
<path d="M388 645.195C393.333 607.861 417 525.595 459 487.195C511.5 439.195 547 411.195 549.5 367.695C533.833 370.361 508.227 383.217 485 396.695C444.5 420.195 394 428.695 388.5 428.695C390.5 419.361 398.4 396.795 396 391.195C393 384.195 321 390.195 294 361.695L285.5 303.195C286.333 299.361 291.2 288.095 296 285.695C298.632 284.379 324.871 269.582 337 257.195C360.5 233.195 374.547 230.695 396 230.695" stroke="black" stroke-width="16"/>
|
||||
<path d="M446 375.195C420.5 388.695 399.667 379.861 387.5 380.195L400 404.695C409 405.195 431.46 403.67 445 396.695C461.5 388.195 487.5 358.195 497.5 350.195C505.5 343.795 521 334.861 527.5 331.195C520 331.195 515.4 331.395 511 332.195C505.5 333.195 483.5 351.195 481 353.695C478.5 356.195 458.577 368.537 446 375.195Z" fill="black"/>
|
||||
<path d="M298.5 127.695L353 152.695L324 180.695L358 218.695H396.5V262.195L463 247.195L484.5 271.195L508.5 276.195L522 308.695L640.5 271.195L676 372.695L715 380.695L739 435.695" stroke="black" stroke-width="10"/>
|
||||
<path d="M313.5 273.695L310 266.695L299 268.195L296 256.195L272 254.695V228.195C272 228.195 261 210.195 255.5 204.195C251.1 199.395 225.333 202.195 213 204.195C251 156.028 350.5 53.6361 501.5 67.6948C646.5 81.1948 839 204.195 754 438.195L734.5 433.695L716.5 441.195L707 433.695L661 441.195" stroke="black" stroke-width="16"/>
|
||||
<path d="M632.5 483.695L657.5 480.695L686 504.695L717 485.195L730 499.195H755.5L766.5 476.195L791 466.695L824.5 476.195C824.5 476.195 985.5 987.336 491 966.195C11.4999 945.695 205 466.695 205 466.695L231 459.695L301 476.195L314 499.195L356 459.695L381.5 504.695L424 464.695L455 489.195" stroke="black" stroke-width="16"/>
|
||||
<path d="M827 484.695L724.5 520.695L712.5 546.195H661.5L641.5 600.195H576L529 557.695L435.5 600.195L385 652.195L335.5 591.195V566.695L277 557.695L226.5 500.195L219.5 520.695L199.5 500.195" stroke="black" stroke-width="10"/>
|
||||
<path d="M631 275.695C653.833 304.195 687.2 389.295 654 451.695C612.5 529.695 569.5 546.195 556 582.695" stroke="black" stroke-width="16"/>
|
||||
<path d="M326.5 301.195V285.695C320 285.195 312 291.195 309 294.195C306 297.195 308.5 306.195 311 308.695C313 310.695 316.167 309.528 317.5 308.695L326.5 301.195Z" fill="black"/>
|
||||
<path d="M353.482 303.385L367.808 297.468C370.752 303.285 368.26 312.97 366.632 316.888C365.005 320.806 355.732 321.931 352.467 320.574C349.855 319.489 349.725 316.117 349.986 314.566L353.482 303.385Z" fill="black"/>
|
||||
<path d="M552 364.195C571 361.695 598.691 349.657 606.5 335.695" stroke="black" stroke-width="10"/>
|
||||
<path d="M442.67 349.364C466.788 355.842 492.259 339.056 499.559 311.873C503.314 297.893 501.532 283.885 495.635 272.695L486 270.695L462 247.695L444 252.165C429.317 257.545 416.952 270.796 412.219 288.415C404.919 315.599 418.552 342.886 442.67 349.364Z" fill="black"/>
|
||||
<path d="M458.438 268.743C460.823 266.79 464.898 265.325 469.371 266.79C474.478 268.463 481.05 272.649 483.783 278.02C487.262 284.856 487.262 292.668 486.765 302.433C486.342 310.738 480.867 332.561 462.5 334.195C445.102 335.742 444.306 318.104 445 303.195C446 281.695 453.667 272.649 458.438 268.743Z" fill="#FECD10"/>
|
||||
<path d="M446.814 272.167C446.593 271.194 446.029 269.422 444.314 268.167C442.783 267.047 440.814 266.667 438.814 266.667C436.314 266.667 435.346 267.238 433.689 268.922C432.279 270.353 429.963 274.617 432.667 280.492C435.301 286.214 438.775 284.645 442.542 281.619C446.217 278.666 447.257 274.113 446.814 272.167Z" fill="white"/>
|
||||
<mask id="mask0_5_2" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="444" y="266" width="43" height="69">
|
||||
<path d="M458.438 268.743C460.823 266.79 464.898 265.325 469.371 266.79C474.478 268.463 481.05 272.649 483.783 278.02C487.262 284.856 487.262 292.668 486.765 302.433C486.342 310.738 480.867 332.561 462.5 334.195C445.102 335.742 444.306 318.104 445 303.195C446 281.695 453.667 272.649 458.438 268.743Z" fill="#FE9F10"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_5_2)">
|
||||
<g filter="url(#filter0_f_5_2)">
|
||||
<path d="M492 309.695L489 276.195L477 265.195L467.5 264.195L460 267.195C483.5 274.695 482.5 310.195 476 328.695L492 309.695Z" fill="#FE9F10"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_f_5_2" x="451" y="255.195" width="50" height="82.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feGaussianBlur stdDeviation="4.5" result="effect1_foregroundBlur_5_2"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_5_2" x1="488.5" y1="369.195" x2="488.5" y2="440.195" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#714D29"/>
|
||||
<stop offset="1" stop-color="#C1A180"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_5_2" x1="697" y1="367.695" x2="697" y2="446.695" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#714D29"/>
|
||||
<stop offset="1" stop-color="#C1A180"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_5_2" x1="307.75" y1="126.195" x2="307.75" y2="270.695" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#714D29"/>
|
||||
<stop offset="1" stop-color="#C1A180"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint3_linear_5_2" x1="324.75" y1="461.195" x2="324.75" y2="647.195" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#C1A180"/>
|
||||
<stop offset="1" stop-color="#714D29"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint4_linear_5_2" x1="689.25" y1="466.195" x2="689.25" y2="599.695" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#C1A180"/>
|
||||
<stop offset="1" stop-color="#714D29"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint5_radial_5_2" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(283.5 642.695) rotate(17.4274) scale(512.526 728.349)">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#BBBBBB"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint6_radial_5_2" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(436.5 102.195) rotate(30.5854) scale(363.585 350.906)">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#C0C0C0"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="100" height="100" rx="20" fill="#261230"/>
|
||||
<path d="M29.9998 30.1688L30.0841 50.1686L30.1516 66.1685C30.1609 68.3776 31.9593 70.1609 34.1684 70.1516L50.1683 70.0841L60.1682 70.042L61.185 70.0377C63.3875 70.0284 65.1681 68.2027 65.1681 66.0002V66.0002L67.0001 66.0002L67.0001 69.9994L70.1681 69.9998L69.9995 30.0002L51.5996 30.0778L51.6772 46.0187L51.6772 56L50.0772 56L48.3997 56L48.4772 46.0322L48.3997 30.0912L29.9998 30.1688Z" fill="#DE5FE9"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 565 B |
@@ -2,6 +2,8 @@
|
||||
<dependencies>
|
||||
<module name="intellij.python.sdk"/>
|
||||
<module name="intellij.python.community.execService"/>
|
||||
<module name="intellij.python.community.impl.poetry"/>
|
||||
<module name="intellij.python.community.impl.uv"/>
|
||||
</dependencies>
|
||||
|
||||
<extensionPoints>
|
||||
|
||||
+3
-1
@@ -3,6 +3,8 @@ package com.intellij.python.sdk.ui.evolution.tool.poetry.sdk
|
||||
//import com.jetbrains.python.sdk.poetry.PyPoetrySdkAdditionalData
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.python.community.impl.poetry.icons.PythonCommunityImplPoetryIcons
|
||||
import com.intellij.python.community.impl.poetry.impl.POETRY_UI_INFO
|
||||
import com.intellij.python.sdk.ui.evolution.sdk.EvoSdk
|
||||
import com.intellij.python.sdk.ui.evolution.sdk.EvoSdkProvider
|
||||
import com.intellij.python.sdk.ui.icons.PythonSdkUIIcons
|
||||
@@ -17,7 +19,7 @@ internal object PoetryEvoSdkManager {
|
||||
val name = venvName.takeIf { !it.startsWith(module.name.lowercase()) }
|
||||
|
||||
return EvoSdk(
|
||||
icon = PythonSdkUIIcons.Tools.Poetry,
|
||||
icon = PythonCommunityImplPoetryIcons.Poetry,
|
||||
name = name,
|
||||
pythonBinaryPath = pythonBinaryPath,
|
||||
)
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ package com.intellij.python.sdk.ui.evolution.ui
|
||||
import com.intellij.icons.AllIcons
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.intellij.python.sdk.ui.PySdkUiBundle
|
||||
import com.intellij.python.sdk.ui.evolution.sdk.EvoModuleSdk
|
||||
import com.intellij.python.sdk.ui.evolution.ui.components.EvoTreeLazyNodeElement
|
||||
@@ -24,7 +25,7 @@ internal val autoSetupWithAIAction = object : AnAction(
|
||||
internal val defaultUvAction = object : AnAction(
|
||||
{ PySdkUiBundle.message("evo.sdk.status.bar.popup.shortcuts.uv") },
|
||||
{ "" },
|
||||
PythonSdkUIIcons.Tools.UV,
|
||||
PythonCommunityImplUVIcons.UV,
|
||||
) {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ import com.intellij.python.community.execService.Args
|
||||
import com.intellij.python.community.execService.BinaryToExec
|
||||
import com.intellij.python.community.execService.ExecService
|
||||
import com.intellij.python.community.execService.execGetStdout
|
||||
import com.intellij.python.community.impl.poetry.icons.PythonCommunityImplPoetryIcons
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.intellij.python.hatch.icons.PythonHatchIcons
|
||||
import com.intellij.ui.dsl.builder.Align
|
||||
import com.intellij.ui.dsl.builder.Panel
|
||||
@@ -46,8 +48,6 @@ import com.jetbrains.python.sdk.flavors.PyFlavorAndData
|
||||
import com.jetbrains.python.sdk.flavors.PyFlavorData
|
||||
import com.jetbrains.python.sdk.flavors.VirtualEnvSdkFlavor
|
||||
import com.jetbrains.python.sdk.pipenv.PIPENV_ICON
|
||||
import com.jetbrains.python.sdk.poetry.POETRY_ICON
|
||||
import com.jetbrains.python.sdk.uv.UV_ICON
|
||||
import com.jetbrains.python.statistics.InterpreterTarget
|
||||
import com.jetbrains.python.statistics.PythonInterpreterInstallationIdsHolder.Companion.PYTHON_INSTALLATION_INTERRUPTED
|
||||
import com.jetbrains.python.target.PyTargetAwareAdditionalData
|
||||
@@ -142,9 +142,9 @@ enum class PythonSupportedEnvironmentManagers(
|
||||
) {
|
||||
VIRTUALENV("sdk.create.custom.virtualenv", PythonIcons.Python.Virtualenv, { true }),
|
||||
CONDA("sdk.create.custom.conda", PythonIcons.Python.Anaconda, { true }),
|
||||
POETRY("sdk.create.custom.poetry", POETRY_ICON),
|
||||
POETRY("sdk.create.custom.poetry", PythonCommunityImplPoetryIcons.Poetry),
|
||||
PIPENV("sdk.create.custom.pipenv", PIPENV_ICON),
|
||||
UV("sdk.create.custom.uv", UV_ICON),
|
||||
UV("sdk.create.custom.uv", PythonCommunityImplUVIcons.UV),
|
||||
HATCH("sdk.create.custom.hatch", PythonHatchIcons.Logo, { it is FileSystem.Eel }),
|
||||
PYTHON("sdk.create.custom.python", PythonParserIcons.PythonFile, { true })
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.openapi.projectRoots.SdkAdditionalData
|
||||
import com.intellij.openapi.util.UserDataHolder
|
||||
import com.intellij.python.community.impl.poetry.icons.PythonCommunityImplPoetryIcons
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.poetry.PoetryPyProjectTomlPythonVersionsService
|
||||
import com.jetbrains.python.sdk.*
|
||||
@@ -37,7 +38,7 @@ class PoetrySdkProvider : PySdkProvider {
|
||||
override fun getSdkAdditionalText(sdk: Sdk): String? = if (sdk.isPoetry) sdk.versionString else null
|
||||
|
||||
override fun getSdkIcon(sdk: Sdk): Icon? {
|
||||
return if (sdk.isPoetry) POETRY_ICON else null
|
||||
return if (sdk.isPoetry) PythonCommunityImplPoetryIcons.Poetry else null
|
||||
}
|
||||
|
||||
override fun loadAdditionalDataForSdk(element: Element): SdkAdditionalData? {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2018 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.sdk.poetry
|
||||
|
||||
import com.intellij.python.community.impl.poetry.icons.PythonCommunityImplPoetryIcons
|
||||
import com.jetbrains.python.sdk.flavors.CPythonSdkFlavor
|
||||
import com.jetbrains.python.sdk.flavors.PyFlavorData
|
||||
import com.jetbrains.python.sdk.flavors.PythonFlavorProvider
|
||||
@@ -12,7 +13,7 @@ import javax.swing.Icon
|
||||
*/
|
||||
|
||||
object PyPoetrySdkFlavor : CPythonSdkFlavor<PyFlavorData.Empty>() {
|
||||
override fun getIcon(): Icon = POETRY_ICON
|
||||
override fun getIcon(): Icon = PythonCommunityImplPoetryIcons.Poetry
|
||||
override fun getFlavorDataClass(): Class<PyFlavorData.Empty> = PyFlavorData.Empty::class.java
|
||||
|
||||
override fun isValidSdkPath(pathStr: String): Boolean = false
|
||||
|
||||
@@ -25,8 +25,6 @@ import java.util.regex.Pattern
|
||||
import javax.swing.Icon
|
||||
import kotlin.io.path.pathString
|
||||
|
||||
// TODO: Provide a special icon for poetry
|
||||
val POETRY_ICON: Icon = PythonIcons.Python.Origami
|
||||
|
||||
@Internal
|
||||
fun suggestedSdkName(basePath: Path): @NlsSafe String = "Poetry (${PathUtil.getFileName(basePath.pathString)})"
|
||||
|
||||
@@ -42,9 +42,6 @@ internal fun suggestedSdkName(basePath: Path): @NlsSafe String {
|
||||
return "uv (${PathUtil.getFileName(basePath.pathString)})"
|
||||
}
|
||||
|
||||
val UV_ICON: Icon = PythonIcons.UV
|
||||
|
||||
|
||||
suspend fun setupNewUvSdkAndEnv(
|
||||
workingDir: Path,
|
||||
existingSdks: List<Sdk>,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2018 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.sdk.uv
|
||||
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.jetbrains.python.sdk.PythonSdkAdditionalData
|
||||
import com.jetbrains.python.sdk.flavors.CPythonSdkFlavor
|
||||
import com.jetbrains.python.sdk.flavors.PyFlavorData
|
||||
@@ -67,7 +68,7 @@ class UvSdkAdditionalData : PythonSdkAdditionalData {
|
||||
}
|
||||
|
||||
object UvSdkFlavor : CPythonSdkFlavor<PyFlavorData.Empty>() {
|
||||
override fun getIcon(): Icon = UV_ICON
|
||||
override fun getIcon(): Icon = PythonCommunityImplUVIcons.UV
|
||||
override fun getFlavorDataClass(): Class<PyFlavorData.Empty> = PyFlavorData.Empty::class.java
|
||||
|
||||
override fun isValidSdkPath(pathStr: String): Boolean {
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.jetbrains.python.sdk.uv
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.openapi.projectRoots.SdkAdditionalData
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.sdk.PyInterpreterInspectionQuickFixData
|
||||
import com.jetbrains.python.sdk.PySdkProvider
|
||||
@@ -33,7 +34,7 @@ class UvSdkProvider : PySdkProvider {
|
||||
override fun getSdkAdditionalText(sdk: Sdk): String? = if (sdk.isUv) sdk.versionString else null
|
||||
|
||||
override fun getSdkIcon(sdk: Sdk): Icon? {
|
||||
return if (sdk.isUv) UV_ICON else null
|
||||
return if (sdk.isUv) PythonCommunityImplUVIcons.UV else null
|
||||
}
|
||||
|
||||
override fun loadAdditionalDataForSdk(element: Element): SdkAdditionalData? {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jetbrains.python.sdk.uv
|
||||
|
||||
import com.intellij.platform.eel.EelApi
|
||||
import com.intellij.platform.eel.provider.localEel
|
||||
import com.intellij.python.community.impl.uv.UV_UI_INFO
|
||||
import com.intellij.python.community.services.systemPython.SystemPythonProvider
|
||||
import com.jetbrains.python.PyToolUIInfo
|
||||
import com.jetbrains.python.PythonBinary
|
||||
@@ -27,4 +28,3 @@ internal class UvSystemPythonProvider : SystemPythonProvider {
|
||||
override val uiCustomization: PyToolUIInfo = UV_UI_INFO
|
||||
}
|
||||
|
||||
internal val UV_UI_INFO = PyToolUIInfo("uv", PythonIcons.UV)
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jetbrains.python.sdk.uv.run
|
||||
|
||||
import com.intellij.execution.configurations.ConfigurationTypeBase
|
||||
import com.intellij.openapi.util.NotNullLazyValue
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.icons.PythonIcons
|
||||
|
||||
@@ -13,7 +14,7 @@ internal class UvRunConfigurationType :
|
||||
UV_CONFIGURATION_ID,
|
||||
PyBundle.message("uv.run.configuration.type.display.name"),
|
||||
PyBundle.message("uv.run.configuration.type.description"),
|
||||
NotNullLazyValue.createValue { PythonIcons.UV },
|
||||
NotNullLazyValue.createValue { PythonCommunityImplUVIcons.UV },
|
||||
) {
|
||||
init {
|
||||
addFactory(UvRunConfigurationFactory(this))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jetbrains.python.uv.sdk.evolution
|
||||
|
||||
import com.intellij.openapi.ui.popup.ListSeparator
|
||||
import com.intellij.python.community.impl.uv.icons.PythonCommunityImplUVIcons
|
||||
import com.jetbrains.python.Result
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.sdk.basePath
|
||||
@@ -22,27 +23,30 @@ import kotlin.collections.component2
|
||||
|
||||
|
||||
private class UvSelectSdkProvider() : EvoSelectSdkProvider {
|
||||
override fun getTreeElement(evoModuleSdk: EvoModuleSdk) = EvoTreeLazyNodeElement("uv", PythonIcons.UV) {
|
||||
getUvExecutable() ?: return@EvoTreeLazyNodeElement PyResult.localizedError(PyBundle.message("evolution.uv.executable.is.not.found"))
|
||||
override fun getTreeElement(evoModuleSdk: EvoModuleSdk): EvoTreeLazyNodeElement {
|
||||
val icon = PythonCommunityImplUVIcons.UV
|
||||
return EvoTreeLazyNodeElement("uv", icon) {
|
||||
getUvExecutable() ?: return@EvoTreeLazyNodeElement PyResult.localizedError(PyBundle.message("evolution.uv.executable.is.not.found"))
|
||||
|
||||
val environments = VenvEvoSdkManager.findEnvironments(evoModuleSdk.module).getOr {
|
||||
return@EvoTreeLazyNodeElement it
|
||||
}.map { it.copy(icon = PythonIcons.UV) }
|
||||
val envByFolders = environments.groupBy { it.pythonBinaryPath?.parent?.parent?.parent }.toMutableMap()
|
||||
envByFolders.putIfAbsent(
|
||||
evoModuleSdk.module.basePath?.let { Path.of(it) },
|
||||
listOf(EvoSdk(icon = PythonIcons.UV, name = ".venv", pythonBinaryPath = null))
|
||||
)
|
||||
val envSections = envByFolders.map { (basePath, sdks) ->
|
||||
val label = basePath?.toString() ?: "undefined"
|
||||
val leafs = sdks.map { evoSdk -> SelectEnvAction(evoSdk) }.map { action -> EvoTreeLeafElement(action) }
|
||||
EvoTreeSection(ListSeparator(label), leafs + EvoTreeLeafElement(AddNewEnvAction()))
|
||||
val environments = VenvEvoSdkManager.findEnvironments(evoModuleSdk.module).getOr {
|
||||
return@EvoTreeLazyNodeElement it
|
||||
}.map { it.copy(icon = icon) }
|
||||
val envByFolders = environments.groupBy { it.pythonBinaryPath?.parent?.parent?.parent }.toMutableMap()
|
||||
envByFolders.putIfAbsent(
|
||||
evoModuleSdk.module.basePath?.let { Path.of(it) },
|
||||
listOf(EvoSdk(icon = icon, name = ".venv", pythonBinaryPath = null))
|
||||
)
|
||||
val envSections = envByFolders.map { (basePath, sdks) ->
|
||||
val label = basePath?.toString() ?: "undefined"
|
||||
val leafs = sdks.map { evoSdk -> SelectEnvAction(evoSdk) }.map { action -> EvoTreeLeafElement(action) }
|
||||
EvoTreeSection(ListSeparator(label), leafs + EvoTreeLeafElement(AddNewEnvAction()))
|
||||
}
|
||||
|
||||
val sections = buildList {
|
||||
addAll(envSections)
|
||||
}
|
||||
|
||||
Result.success(sections)
|
||||
}
|
||||
|
||||
val sections = buildList {
|
||||
addAll(envSections)
|
||||
}
|
||||
|
||||
Result.success(sections)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user