Skip to content

Commit 7ebf5f8

Browse files
committed
✨ feat(sdk): add environment detection and dynamic icons for PyCharm 2026.1
PyCharm 2026.1 removed the generic Virtualenv icon and now requires proper SDK flavor data to display environment-specific icons (UV, Poetry, Hatch, Conda, Pipenv). Without this, all environments showed broken icon references and package managers couldn't properly detect their tooling. The plugin now detects environment types by checking filesystem markers: pyvenv.cfg for UV, conda-meta directories for Conda, .gitignore markers for Hatch, and standard cache locations (with environment variable overrides) for Poetry and Pipenv. Each detected type gets the appropriate SDK flavor data so PyCharm's package managers work correctly and display the right icons. SDK creation now properly handles PyCharm's threading model by separating name generation (which runs Python) from write-locked modifications. Only in-project virtual environments get associated with the project to avoid polluting other projects' interpreter lists. Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
1 parent 6c061f5 commit 7ebf5f8

File tree

13 files changed

+697
-170
lines changed

13 files changed

+697
-170
lines changed

CHANGELOG.md

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- Environment type detection for UV, Conda, Poetry, Hatch, and Pipenv virtual environments
8+
- Dynamic icons in tree view and context menu based on detected environment type
9+
- Proper SDK flavor data for each environment type (UV, Poetry, Hatch, etc.)
10+
- Project association for in-project virtual environments
11+
- Support for configurable environment paths via environment variables (HATCH_DATA_DIR, WORKON_HOME, etc.)
12+
- Comprehensive logging for environment detection debugging
13+
14+
### Changed
15+
16+
- Updated to PyCharm 2026.1 platform API
17+
- Minimum supported version is now PyCharm 2026.1 (build 261)
18+
- Removed module-level interpreter action (kept project-level only)
19+
- SDK creation now uses proper SdkModificator API with write actions
20+
- Environment detection checks pyvenv.cfg for UV marker, .gitignore for Hatch marker, and standard cache locations
21+
22+
### Fixed
23+
24+
- Icon loading errors on PyCharm 2026.1 by removing hardcoded icon references
25+
- SDK duplicate registration errors by checking global SDK table before creating new SDKs
26+
- Threading assertions by properly wrapping SDK modifications in write actions
27+
528
## [2.2.7] - 2026-03-31
629

730
${GITHUB_EVENT_RELEASE_BODY}
@@ -16,8 +39,10 @@ ${GITHUB_EVENT_RELEASE_BODY}
1639
- Standardize .github files to .yaml suffix by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/142
1740
- Clarify the venv selection painfulness by @andrask in https://github.com/tox-dev/PyVenvManage/pull/143
1841
- 🔒 ci(workflows): add zizmor security auditing by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/154
19-
- 🐛 fix(icons): resolve NoSuchFieldError on IntelliJ 2026.1 by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/157
20-
- 🔒 fix(ci): split release workflow for proper credential scoping by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/158
42+
- 🐛 fix(icons): resolve NoSuchFieldError on IntelliJ 2026.1 by @gaborbernat in
43+
https://github.com/tox-dev/PyVenvManage/pull/157
44+
- 🔒 fix(ci): split release workflow for proper credential scoping by @gaborbernat in
45+
https://github.com/tox-dev/PyVenvManage/pull/158
2146

2247
## [2.2.5] - 2026-01-30
2348

@@ -26,13 +51,15 @@ ${GITHUB_EVENT_RELEASE_BODY}
2651
## [2.2.4] - 2026-01-30
2752

2853
- Bump version to `2.2.4-dev` by @github-actions[bot] in https://github.com/tox-dev/PyVenvManage/pull/123
29-
- Use RELEASE_TOKEN for post-release PR and auto-merge by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/124
54+
- Use RELEASE_TOKEN for post-release PR and auto-merge by @gaborbernat in
55+
https://github.com/tox-dev/PyVenvManage/pull/124
3056

3157
## [2.2.3] - 2026-01-30
3258

3359
- Bump version to `2.2.3-dev` by @github-actions[bot] in https://github.com/tox-dev/PyVenvManage/pull/120
3460
- Add auto-merge workflow for trusted contributors by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/121
35-
- Make Python dependency optional to fix marketplace verification by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/122
61+
- Make Python dependency optional to fix marketplace verification by @gaborbernat in
62+
https://github.com/tox-dev/PyVenvManage/pull/122
3663

3764
## [2.2.2] - 2026-01-29
3865

@@ -48,13 +75,16 @@ ${GITHUB_EVENT_RELEASE_BODY}
4875
## [2.2.0] - 2026-01-04
4976

5077
- Changelog update - `v2.1.2` by @github-actions[bot] in https://github.com/tox-dev/PyVenvManage/pull/78
51-
- Optimize GitHub Actions: parallelize verification and fix disk space by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/99
52-
- Refactor to modern Kotlin idioms and fix deprecated API by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/100
78+
- Optimize GitHub Actions: parallelize verification and fix disk space by @gaborbernat in
79+
https://github.com/tox-dev/PyVenvManage/pull/99
80+
- Refactor to modern Kotlin idioms and fix deprecated API by @gaborbernat in
81+
https://github.com/tox-dev/PyVenvManage/pull/100
5382
- Add cache invalidation with file watcher by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/101
5483
- Improve error UX with notifications by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/102
5584
- Add plugin settings page by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/103
5685
- Improve plugin description and documentation by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/105
57-
- Enhance project view decorations and add 100% test coverage by @gaborbernat in https://github.com/tox-dev/PyVenvManage/pull/104
86+
- Enhance project view decorations and add 100% test coverage by @gaborbernat in
87+
https://github.com/tox-dev/PyVenvManage/pull/104
5888

5989
## [2.1.2] - 2025-10-23
6090

@@ -127,22 +157,22 @@ ${GITHUB_EVENT_RELEASE_BODY}
127157

128158
- Removed the usage of the deprecated PythonSdkType.getPythonExecutable API
129159

130-
[Unreleased]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.7...HEAD
131-
[2.2.7]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.6...v2.2.7
132-
[2.2.6]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.5...v2.2.6
133-
[2.2.5]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.4...v2.2.5
134-
[2.2.4]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.3...v2.2.4
135-
[2.2.3]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.2...v2.2.3
136-
[2.2.2]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.1...v2.2.2
137-
[2.2.1]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.0...v2.2.1
138-
[2.2.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.1.2...v2.2.0
139-
[2.1.2]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.1.0...v2.1.2
140-
[2.1.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.0.1...v2.1.0
141-
[2.0.1]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.0.0...v2.0.1
142-
[2.0.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.4.0...v2.0.0
143-
[1.4.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.4...v1.4.0
144-
[1.3.4]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.3...v1.3.4
145-
[1.3.3]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.2...v1.3.3
146-
[1.3.2]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.1...v1.3.2
147-
[1.3.1]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.0...v1.3.1
148160
[1.3.0]: https://github.com/pyvenvmanage/PyVenvManage/commits/v1.3.0
161+
[1.3.1]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.0...v1.3.1
162+
[1.3.2]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.1...v1.3.2
163+
[1.3.3]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.2...v1.3.3
164+
[1.3.4]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.3...v1.3.4
165+
[1.4.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.3.4...v1.4.0
166+
[2.0.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v1.4.0...v2.0.0
167+
[2.0.1]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.0.0...v2.0.1
168+
[2.1.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.0.1...v2.1.0
169+
[2.1.2]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.1.0...v2.1.2
170+
[2.2.0]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.1.2...v2.2.0
171+
[2.2.1]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.0...v2.2.1
172+
[2.2.2]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.1...v2.2.2
173+
[2.2.3]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.2...v2.2.3
174+
[2.2.4]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.3...v2.2.4
175+
[2.2.5]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.4...v2.2.5
176+
[2.2.6]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.5...v2.2.6
177+
[2.2.7]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.6...v2.2.7
178+
[unreleased]: https://github.com/pyvenvmanage/PyVenvManage/compare/v2.2.7...HEAD

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,42 @@
1212
**PyVenvManage** simplifies Python virtual environment management in JetBrains IDEs.
1313

1414
Managing multiple Python interpreters across different virtual environments (for testing against various Python versions
15-
with tools like `tox` or `nox`) traditionally requires navigating through multiple dialogs in PyCharm or other JetBrains IDEs.
16-
PyVenvManage streamlines this by enabling quick interpreter selection directly from the project view with just a right-click.
15+
with tools like `tox` or `nox`) traditionally requires navigating through multiple dialogs in PyCharm or other JetBrains
16+
IDEs. PyVenvManage streamlines this by enabling quick interpreter selection directly from the project view with just a
17+
right-click.
1718

1819
## Features
1920

2021
- **Quick interpreter switching**: Right-click any virtual environment folder to set it as your project or module
2122
interpreter instantly
22-
- **Visual identification**: Virtual environment folders display with a distinctive icon and customizable decoration
23-
(e.g., `.venv [3.11.5 - CPython]`) in the project view
23+
- **Smart environment detection**: Automatically detects environment types (UV, Conda, Poetry, Hatch, Pipenv,
24+
virtualenv) and sets appropriate metadata and icons
25+
- **Dynamic icons**: Tree view and context menus display environment-specific icons (UV, Conda, Poetry, Hatch, Pipenv)
26+
based on detection
27+
- **Visual identification**: Virtual environment folders display with customizable decoration (e.g.,
28+
`.venv [3.11.5 - CPython]`) in the project view
2429
- **Customizable decorations**: Configure which fields to show (Python version, implementation, system site-packages,
2530
creator tool), their order, and the format via Settings
2631
- **Multi-IDE support**: Works with PyCharm (Community and Professional), IntelliJ IDEA, GoLand, CLion, and RustRover
27-
- **Smart detection**: Automatically detects Python virtual environments by recognizing `pyvenv.cfg` files
32+
- **Smart association**: In-project virtual environments are associated with the current project; external environments
33+
(Poetry cache, Hatch cache, Pipenv virtualenvs) remain global
2834
- **Cached version display**: Python version information is cached for performance and automatically refreshed when
2935
`pyvenv.cfg` files change
3036

3137
<!-- Plugin description end -->
3238

3339
## Supported IDEs
3440

35-
Version 2025.1 or later of:
41+
Version 2026.1 or later of:
3642

3743
- PyCharm (Community and Professional)
3844
- IntelliJ IDEA (Community and Ultimate)
3945
- GoLand
4046
- CLion
4147
- RustRover
4248

49+
**Note**: Version 2.2.x supports PyCharm 2025.1 and earlier.
50+
4351
## Install
4452

4553
In your JetBrains IDE, open **Settings** -> **Plugins**, search for "PyVenv Manage", and click **Install**.
@@ -51,9 +59,9 @@ The official plugin page is at https://plugins.jetbrains.com/plugin/20536-pyvenv
5159
![usage video](anim.gif?raw=true)
5260

5361
1. Create or navigate to a Python virtual environment folder in your project
54-
2. Right-click the virtual environment folder (e.g., `venv`, `.venv`, or any folder with a `pyvenv.cfg`)
55-
3. Select **Set as Project Interpreter** or **Set as Module Interpreter**
56-
4. The interpreter is configured instantly with a confirmation notification
62+
1. Right-click the virtual environment folder (e.g., `venv`, `.venv`, or any folder with a `pyvenv.cfg`)
63+
1. Select **Set as Project Interpreter** or **Set as Module Interpreter**
64+
1. The interpreter is configured instantly with a confirmation notification
5765

5866
## Settings
5967

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dependencies {
5656
testImplementation(libs.remoteRobot)
5757
testImplementation(libs.remoteRobotFixtures)
5858
intellijPlatform {
59-
pycharmCommunity(platformVersion)
59+
pycharm(platformVersion)
6060
bundledPlugin("PythonCore")
6161
pluginVerifier()
6262
zipSigner()

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ nl.littlerobots.vcu.resolver=true
44
org.gradle.caching=true
55
org.gradle.configuration-cache=true
66
org.gradle.welcome=never
7-
platformVersion=2025.1
7+
platformVersion=2026.1
88
pluginGroup=com.github.pyvenvmanage
99
pluginName=PyVenv Manage 2
1010
pluginRepositoryUrl=https://github.com/pyvenvmanage/PyVenvManage
11-
pluginSinceBuild=251
11+
pluginSinceBuild=261
1212
pluginVersion=2.2.8-dev
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-all.zip
4-
networkTimeout=10000
4+
networkTimeout=60000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
77
zipStorePath=wrapper/dists
Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package com.github.pyvenvmanage
22

3-
import javax.swing.Icon
4-
3+
import com.github.pyvenvmanage.sdk.EnvironmentDetector
4+
import com.github.pyvenvmanage.sdk.SdkFactory
5+
import com.github.pyvenvmanage.settings.PyVenvManageSettings
56
import com.intellij.ide.projectView.PresentationData
67
import com.intellij.ide.projectView.ProjectViewNode
78
import com.intellij.ide.projectView.ProjectViewNodeDecorator
89
import com.intellij.openapi.diagnostic.thisLogger
910
import com.intellij.ui.SimpleTextAttributes
10-
11-
import com.github.pyvenvmanage.settings.PyVenvManageSettings
11+
import com.jetbrains.python.sdk.PythonSdkUtil
12+
import java.nio.file.Path
1213

1314
class VenvProjectViewNodeDecorator : ProjectViewNodeDecorator {
1415
override fun decorate(
@@ -23,6 +24,17 @@ class VenvProjectViewNodeDecorator : ProjectViewNodeDecorator {
2324
val settings = PyVenvManageSettings.getInstance()
2425
val venvInfo = VenvVersionCache.getInstance().getInfo(pyVenvCfgPath.toString())
2526
thisLogger().debug("VenvInfo from cache: $venvInfo")
27+
28+
val venvRoot = Path.of(pyVenvCfgPath.toString()).parent
29+
val pythonExecutable = venvRoot?.let { PythonSdkUtil.getPythonExecutable(it.toString()) }
30+
31+
if (pythonExecutable != null) {
32+
val envType = EnvironmentDetector.detectEnvironmentType(pythonExecutable)
33+
val icon = SdkFactory.getIconForEnvironmentType(envType)
34+
thisLogger().debug("Setting icon for environment type: $envType")
35+
data.setIcon(icon)
36+
}
37+
2638
venvInfo?.let { info ->
2739
data.presentableText?.let { fileName ->
2840
val decoration = settings.formatDecoration(info)
@@ -32,25 +44,6 @@ class VenvProjectViewNodeDecorator : ProjectViewNodeDecorator {
3244
data.addText(decoration, SimpleTextAttributes.GRAY_ATTRIBUTES)
3345
} ?: thisLogger().debug("No presentableText for decoration")
3446
} ?: thisLogger().debug("No venvInfo found for $pyVenvCfgPath")
35-
virtualenvIcon?.let { data.setIcon(it) }
36-
}
37-
}
38-
39-
companion object {
40-
val virtualenvIcon: Icon? by lazy {
41-
loadIcon("com.intellij.python.venv.icons.PythonVenvIcons", "VirtualEnv")
42-
?: loadIcon("com.jetbrains.python.icons.PythonIcons\$Python", "Virtualenv")
4347
}
44-
45-
private fun loadIcon(
46-
className: String,
47-
fieldName: String,
48-
): Icon? =
49-
try {
50-
val clazz = Class.forName(className)
51-
clazz.getField(fieldName).get(null) as? Icon
52-
} catch (_: Exception) {
53-
null
54-
}
5548
}
5649
}

src/main/kotlin/com/github/pyvenvmanage/actions/ConfigurePythonActionAbstract.kt

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,50 @@
11
package com.github.pyvenvmanage.actions
22

3+
import com.github.pyvenvmanage.sdk.EnvironmentDetector
4+
import com.github.pyvenvmanage.sdk.PythonEnvironmentType
5+
import com.github.pyvenvmanage.sdk.SdkFactory
36
import com.intellij.notification.NotificationGroupManager
47
import com.intellij.notification.NotificationType
58
import com.intellij.openapi.actionSystem.ActionUpdateThread
69
import com.intellij.openapi.actionSystem.AnAction
710
import com.intellij.openapi.actionSystem.AnActionEvent
811
import com.intellij.openapi.actionSystem.CommonDataKeys
12+
import com.intellij.openapi.diagnostic.Logger
913
import com.intellij.openapi.project.Project
14+
import com.intellij.openapi.projectRoots.ProjectJdkTable
1015
import com.intellij.openapi.projectRoots.Sdk
11-
import com.intellij.openapi.projectRoots.impl.SdkConfigurationUtil
1216
import com.intellij.openapi.vfs.VirtualFile
13-
1417
import com.jetbrains.python.configuration.PyConfigurableInterpreterList
15-
import com.jetbrains.python.sdk.PythonSdkType
1618
import com.jetbrains.python.sdk.PythonSdkUtil
1719
import com.jetbrains.python.statistics.executionType
1820
import com.jetbrains.python.statistics.interpreterType
1921

2022
abstract class ConfigurePythonActionAbstract : AnAction() {
23+
companion object {
24+
private val LOG = Logger.getInstance(ConfigurePythonActionAbstract::class.java)
25+
}
26+
2127
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
2228

2329
override fun update(e: AnActionEvent) {
24-
e.presentation.isEnabledAndVisible =
25-
e.getData(CommonDataKeys.VIRTUAL_FILE)?.let { selectedPath ->
26-
if (selectedPath.isDirectory) {
27-
PythonSdkUtil.getPythonExecutable(selectedPath.path) != null
28-
} else {
29-
PythonSdkUtil.isVirtualEnv(selectedPath.path)
30-
}
31-
} ?: false
30+
val selectedPath = e.getData(CommonDataKeys.VIRTUAL_FILE)
31+
LOG.info("Update called for path: $selectedPath")
32+
val isValid =
33+
selectedPath?.let { path ->
34+
val dir = if (path.isDirectory) path else path.parent
35+
LOG.info("Checking directory: ${dir.path}")
36+
PythonSdkUtil.getPythonExecutable(dir.path)?.let { pythonExe ->
37+
LOG.info("Found python executable: $pythonExe")
38+
val envType = EnvironmentDetector.detectEnvironmentType(pythonExe)
39+
val icon = SdkFactory.getIconForEnvironmentType(envType)
40+
LOG.info("Setting icon for type $envType: $icon")
41+
e.presentation.icon = icon
42+
true
43+
} ?: false.also { LOG.info("No python executable found") }
44+
} ?: false.also { LOG.info("No selected path") }
45+
46+
e.presentation.isEnabledAndVisible = isValid
47+
LOG.info("Action visible: $isValid")
3248
}
3349

3450
override fun actionPerformed(e: AnActionEvent) {
@@ -44,24 +60,22 @@ abstract class ConfigurePythonActionAbstract : AnAction() {
4460
return
4561
}
4662

63+
val envType = EnvironmentDetector.detectEnvironmentType(pythonExecutable)
64+
65+
val existingSdk = ProjectJdkTable.getInstance().allJdks.firstOrNull { it.homePath == pythonExecutable }
66+
4767
val sdk: Sdk =
48-
PyConfigurableInterpreterList
49-
.getInstance(project)
50-
.model
51-
.projectSdks
52-
.values
53-
.firstOrNull { it.homePath == pythonExecutable }
54-
?: run {
55-
val newSdk = SdkConfigurationUtil.createAndAddSDK(pythonExecutable, PythonSdkType.getInstance())
56-
if (newSdk == null) {
57-
notifyError(project, "Failed to create SDK from $pythonExecutable")
58-
return
59-
}
60-
newSdk
68+
existingSdk ?: run {
69+
val newSdk = SdkFactory.createSdk(pythonExecutable, envType, selectedPath.toNioPath())
70+
if (newSdk == null) {
71+
notifyError(project, "Failed to create SDK from $pythonExecutable")
72+
return
6173
}
74+
newSdk
75+
}
6276

6377
when (val result = setSdk(project, selectedPath, sdk)) {
64-
is SetSdkResult.Success -> notifySuccess(project, result.target, sdk)
78+
is SetSdkResult.Success -> notifySuccess(project, result.target, sdk, envType)
6579
is SetSdkResult.Error -> notifyError(project, result.message)
6680
}
6781
}
@@ -70,17 +84,20 @@ abstract class ConfigurePythonActionAbstract : AnAction() {
7084
project: Project,
7185
target: String,
7286
sdk: Sdk,
87+
envType: PythonEnvironmentType,
7388
) {
7489
NotificationGroupManager
7590
.getInstance()
7691
.getNotificationGroup("Python SDK change")
7792
.createNotification(
7893
"Python SDK Updated",
7994
"Updated SDK for $target to:\n${sdk.name} " +
95+
"(${envType.name.lowercase()}) " +
8096
"of type ${sdk.interpreterType.toString().lowercase()} " +
8197
sdk.executionType.toString().lowercase(),
8298
NotificationType.INFORMATION,
83-
).notify(project)
99+
).setIcon(SdkFactory.getIconForEnvironmentType(envType))
100+
.notify(project)
84101
}
85102

86103
private fun notifyError(

0 commit comments

Comments
 (0)