diff --git a/python/python-community-configure/src/com/jetbrains/python/configuration/PySdkStatusBar.kt b/python/python-community-configure/src/com/jetbrains/python/configuration/PySdkStatusBar.kt index 329bf10df5a6..2d8322833cc6 100644 --- a/python/python-community-configure/src/com/jetbrains/python/configuration/PySdkStatusBar.kt +++ b/python/python-community-configure/src/com/jetbrains/python/configuration/PySdkStatusBar.kt @@ -53,9 +53,13 @@ private class PySdkStatusBar(project: Project) : EditorBasedStatusBarPopup(proje module = ModuleUtil.findModuleForFile(file, project!!) ?: return WidgetState.HIDDEN - val sdk = PythonSdkType.findPythonSdk(module) ?: return WidgetState.HIDDEN - - return WidgetState("Current Interpreter: ${shortenNameAndPath(sdk)}]", shortenNameInBar(sdk), true) + val sdk = PythonSdkType.findPythonSdk(module) + return if (sdk == null) { + WidgetState("", noInterpreterMarker, true) + } + else { + WidgetState("Current Interpreter: ${shortenNameAndPath(sdk)}]", shortenNameInBar(sdk), true) + } } override fun registerCustomListeners() { diff --git a/python/src/com/jetbrains/python/sdk/PySdkListCellRenderer.kt b/python/src/com/jetbrains/python/sdk/PySdkListCellRenderer.kt index c541937f5882..dcfb94444cb0 100644 --- a/python/src/com/jetbrains/python/sdk/PySdkListCellRenderer.kt +++ b/python/src/com/jetbrains/python/sdk/PySdkListCellRenderer.kt @@ -28,7 +28,7 @@ import javax.swing.JList * @author vlan */ open class PySdkListCellRenderer @JvmOverloads constructor(private val sdkModifiers: Map?, - private val nullSdkName: String = "", + private val nullSdkName: String = noInterpreterMarker, private val nullSdkValue: Sdk? = null) : ColoredListCellRenderer() { override fun getListCellRendererComponent(list: JList?, value: Any?, index: Int, selected: Boolean, diff --git a/python/src/com/jetbrains/python/sdk/PySdkRendering.kt b/python/src/com/jetbrains/python/sdk/PySdkRendering.kt index 193e96387828..239fbfc53d5a 100644 --- a/python/src/com/jetbrains/python/sdk/PySdkRendering.kt +++ b/python/src/com/jetbrains/python/sdk/PySdkRendering.kt @@ -15,6 +15,8 @@ import com.jetbrains.python.sdk.pipenv.PIPENV_ICON import com.jetbrains.python.sdk.pipenv.isPipEnv import javax.swing.Icon +const val noInterpreterMarker: String = "" + fun name(sdk: Sdk, sdkModificator: SdkModificator? = null): Triple = name(sdk, sdkModificator?.name ?: sdk.name) /**