diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md b/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md index 97b3fe2529a..32fd197f3c1 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md +++ b/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md @@ -4,6 +4,10 @@ ## [Unreleased] +### Fixed + +- AppService ComboBox render logic + ## [4.3.8] - 2024-12-17 ### Fixed diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/CreateAppServiceTask.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/CreateAppServiceTask.kt index 903a9628818..7bee6a4c7e4 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/CreateAppServiceTask.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/CreateAppServiceTask.kt @@ -4,6 +4,8 @@ package com.microsoft.azure.toolkit.intellij.appservice +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntimeConfig import com.microsoft.azure.toolkit.intellij.common.RiderRunProcessHandlerMessager import com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase import com.microsoft.azure.toolkit.lib.appservice.model.DockerConfiguration diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntime.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntime.kt deleted file mode 100644 index 20f76656898..00000000000 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntime.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2018-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the MIT license. - */ - -package com.microsoft.azure.toolkit.intellij.appservice - -import com.azure.resourcemanager.appservice.models.FunctionRuntimeStack -import com.azure.resourcemanager.appservice.models.NetFrameworkVersion -import com.azure.resourcemanager.appservice.models.RuntimeStack -import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem - -data class DotNetRuntime( - val operatingSystem: OperatingSystem, - val stack: RuntimeStack?, - val frameworkVersion: NetFrameworkVersion?, - val functionStack: FunctionRuntimeStack?, - val isDocker: Boolean -) diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/components/AppServiceComboBoxDotNetRender.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/components/AppServiceComboBoxDotNetRender.kt new file mode 100644 index 00000000000..aae44bae40f --- /dev/null +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/components/AppServiceComboBoxDotNetRender.kt @@ -0,0 +1,76 @@ +/* + * Copyright 2018-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the MIT license. + */ + +package com.microsoft.azure.toolkit.intellij.appservice.components + +import com.intellij.ui.SimpleListCellRenderer +import com.microsoft.azure.toolkit.lib.Azure +import com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase +import com.microsoft.azure.toolkit.lib.appservice.AppServiceResourceModule +import com.microsoft.azure.toolkit.lib.appservice.AppServiceServiceSubscription +import com.microsoft.azure.toolkit.lib.appservice.config.AppServiceConfig +import com.microsoft.azure.toolkit.lib.appservice.config.FunctionAppConfig +import com.microsoft.azure.toolkit.lib.appservice.function.AzureFunctions +import com.microsoft.azure.toolkit.lib.appservice.webapp.AzureWebApp +import com.microsoft.azure.toolkit.lib.auth.AzureAccount +import javax.swing.JList + +class AppServiceComboBoxDotNetRender : SimpleListCellRenderer() { + override fun customize( + list: JList, + config: AppServiceConfig?, + index: Int, + isSelected: Boolean, + cellHasFocus: Boolean + ) { + if (config == null) return + + text = if (index >= 0) { + getAppServiceLabel(config) + } else { + config.appName + } + accessibleContext?.accessibleDescription = config.appName + } + + private fun getAppServiceLabel(config: AppServiceConfig): String { + val module = getModule(config) + val isDraft = module?.exists(config.appName, config.resourceGroup) == false + val appName = config.appName + val resourceGroup = config.resourceGroup + val app = module?.get(config.appName, config.resourceGroup) + val linuxFxVersion = app?.linuxFxVersion + val os = config.runtime?.os ?: "unknown" + + return buildString { + append("
") + if (isDraft) { + append("(New) ") + } + append(appName) + append("
") + append("") + append("OS: ") + append(os) + if (!linuxFxVersion.isNullOrEmpty()) { + append(" | Runtime: ") + append(linuxFxVersion) + } + if (!resourceGroup.isNullOrEmpty()) { + append(" | Resource Group: ") + append(resourceGroup) + } + append("") + } + } + + private fun getModule(config: AppServiceConfig): AppServiceResourceModule?, AppServiceServiceSubscription?, *>? { + if (config.subscriptionId.isNullOrEmpty() || !Azure.az(AzureAccount::class.java).isLoggedIn) { + return null + } + + return if (config is FunctionAppConfig) Azure.az(AzureFunctions::class.java).functionApps(config.subscriptionId) + else Azure.az(AzureWebApp::class.java).webApps(config.subscriptionId) + } +} \ No newline at end of file diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntimeExtensions.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/dotnetRuntime/DotNetRuntime.kt similarity index 75% rename from PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntimeExtensions.kt rename to PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/dotnetRuntime/DotNetRuntime.kt index acfb1a88aa3..35459817f18 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntimeExtensions.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/dotnetRuntime/DotNetRuntime.kt @@ -1,25 +1,34 @@ /* - * Copyright 2018-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the MIT license. + * Copyright 2018-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the MIT license. */ -package com.microsoft.azure.toolkit.intellij.appservice +package com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime import com.azure.resourcemanager.appservice.models.FunctionRuntimeStack -import com.azure.resourcemanager.appservice.models.OperatingSystem +import com.azure.resourcemanager.appservice.models.NetFrameworkVersion import com.azure.resourcemanager.appservice.models.RuntimeStack import com.azure.resourcemanager.appservice.models.WebAppBase import com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase +import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem + +data class DotNetRuntime( + val operatingSystem: OperatingSystem, + val stack: RuntimeStack?, + val frameworkVersion: NetFrameworkVersion?, + val functionStack: FunctionRuntimeStack?, + val isDocker: Boolean +) private const val FUNCTIONS_WORKER_RUNTIME = "FUNCTIONS_WORKER_RUNTIME" private const val FUNCTIONS_EXTENSION_VERSION = "FUNCTIONS_EXTENSION_VERSION" fun WebAppBase.getDotNetRuntime(): DotNetRuntime { val os = operatingSystem() - if (os == OperatingSystem.LINUX) { + if (os == com.azure.resourcemanager.appservice.models.OperatingSystem.LINUX) { val linuxFxVersion = linuxFxVersion() if (linuxFxVersion.startsWith("docker", true)) { return DotNetRuntime( - com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem.LINUX, + OperatingSystem.LINUX, null, null, null, @@ -30,7 +39,7 @@ fun WebAppBase.getDotNetRuntime(): DotNetRuntime { val runtime = requireNotNull(appSettings[FUNCTIONS_WORKER_RUNTIME]).value() val version = requireNotNull(appSettings[FUNCTIONS_EXTENSION_VERSION]).value() return DotNetRuntime( - com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem.LINUX, + OperatingSystem.LINUX, null, null, FunctionRuntimeStack(runtime, version, linuxFxVersion()), @@ -40,7 +49,7 @@ fun WebAppBase.getDotNetRuntime(): DotNetRuntime { val stack = linuxFxVersion.substringBefore('|', "DOTNETCORE") val version = linuxFxVersion.substringAfter('|', "8.0") return DotNetRuntime( - com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem.LINUX, + OperatingSystem.LINUX, RuntimeStack(stack, version), null, null, @@ -53,7 +62,7 @@ fun WebAppBase.getDotNetRuntime(): DotNetRuntime { val runtime = requireNotNull(appSettings[FUNCTIONS_WORKER_RUNTIME]).value() val version = requireNotNull(appSettings[FUNCTIONS_EXTENSION_VERSION]).value() return DotNetRuntime( - com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem.WINDOWS, + OperatingSystem.WINDOWS, null, null, FunctionRuntimeStack(runtime, version, linuxFxVersion()), @@ -61,7 +70,7 @@ fun WebAppBase.getDotNetRuntime(): DotNetRuntime { ) } else { return DotNetRuntime( - com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem.WINDOWS, + OperatingSystem.WINDOWS, null, netFrameworkVersion(), null, diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntimeConfig.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/dotnetRuntime/DotNetRuntimeConfig.kt similarity index 80% rename from PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntimeConfig.kt rename to PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/dotnetRuntime/DotNetRuntimeConfig.kt index be2b1e21955..14a503ff942 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/DotNetRuntimeConfig.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/dotnetRuntime/DotNetRuntimeConfig.kt @@ -1,8 +1,8 @@ /* - * Copyright 2018-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the MIT license. + * Copyright 2018-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the MIT license. */ -package com.microsoft.azure.toolkit.intellij.appservice +package com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime import com.azure.resourcemanager.appservice.models.FunctionRuntimeStack import com.azure.resourcemanager.appservice.models.NetFrameworkVersion diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppConfig.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppConfig.kt index 78da84f214f..02325792f69 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppConfig.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppConfig.kt @@ -4,7 +4,7 @@ package com.microsoft.azure.toolkit.intellij.appservice.functionapp -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntimeConfig +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntimeConfig import com.microsoft.azure.toolkit.lib.appservice.config.FunctionAppConfig class DotNetFunctionAppConfig : FunctionAppConfig() { diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDeploymentSlotDraft.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDeploymentSlotDraft.kt index 9bb28809365..56016cfd87e 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDeploymentSlotDraft.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDeploymentSlotDraft.kt @@ -8,8 +8,8 @@ import com.azure.core.management.exception.ManagementException import com.azure.resourcemanager.appservice.fluent.models.SitePatchResourceInner import com.azure.resourcemanager.appservice.models.FunctionApp import com.azure.resourcemanager.appservice.models.FunctionDeploymentSlot -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntime -import com.microsoft.azure.toolkit.intellij.appservice.getDotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.getDotNetRuntime import com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppDeploymentSlot import com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppDeploymentSlotModule import com.microsoft.azure.toolkit.lib.appservice.model.DiagnosticConfig diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDraft.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDraft.kt index 62c7d3a5945..89464c30d19 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDraft.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/functionapp/DotNetFunctionAppDraft.kt @@ -4,8 +4,8 @@ package com.microsoft.azure.toolkit.intellij.appservice.functionapp -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntime -import com.microsoft.azure.toolkit.intellij.appservice.getDotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.getDotNetRuntime import com.microsoft.azure.toolkit.lib.appservice.function.FunctionApp import com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppModule import com.microsoft.azure.toolkit.lib.appservice.model.DiagnosticConfig diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetAppServiceConfig.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetAppServiceConfig.kt index 41ec727a17d..e82cbd432c0 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetAppServiceConfig.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetAppServiceConfig.kt @@ -4,7 +4,7 @@ package com.microsoft.azure.toolkit.intellij.appservice.webapp -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntimeConfig +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntimeConfig import com.microsoft.azure.toolkit.lib.appservice.config.AppServiceConfig class DotNetAppServiceConfig : AppServiceConfig() { diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDeploymentSlotDraft.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDeploymentSlotDraft.kt index 589aef5b87e..3026daf7985 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDeploymentSlotDraft.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDeploymentSlotDraft.kt @@ -6,8 +6,8 @@ package com.microsoft.azure.toolkit.intellij.appservice.webapp import com.azure.core.management.exception.ManagementException import com.azure.resourcemanager.appservice.models.DeploymentSlot -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntime -import com.microsoft.azure.toolkit.intellij.appservice.getDotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.getDotNetRuntime import com.microsoft.azure.toolkit.lib.appservice.model.DiagnosticConfig import com.microsoft.azure.toolkit.lib.appservice.model.DockerConfiguration import com.microsoft.azure.toolkit.lib.appservice.utils.AppServiceUtils diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDraft.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDraft.kt index 1c5e9e8e156..570d6295624 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDraft.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/appservice/webapp/DotNetWebAppDraft.kt @@ -6,8 +6,8 @@ package com.microsoft.azure.toolkit.intellij.appservice.webapp import com.azure.resourcemanager.appservice.models.WebApp.DefinitionStages import com.azure.resourcemanager.appservice.models.WebAppRuntimeStack -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntime -import com.microsoft.azure.toolkit.intellij.appservice.getDotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntime +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.getDotNetRuntime import com.microsoft.azure.toolkit.lib.appservice.model.DiagnosticConfig import com.microsoft.azure.toolkit.lib.appservice.model.DockerConfiguration import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionAppComboBox.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionAppComboBox.kt index c16f20aa3d2..cf4dbd0ed51 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionAppComboBox.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionAppComboBox.kt @@ -8,6 +8,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.util.Disposer import com.intellij.ui.dsl.builder.Cell import com.intellij.ui.dsl.builder.Row +import com.microsoft.azure.toolkit.intellij.appservice.components.AppServiceComboBoxDotNetRender import com.microsoft.azure.toolkit.intellij.legacy.appservice.AppServiceComboBox import com.microsoft.azure.toolkit.intellij.legacy.function.FunctionAppConfigProducer import com.microsoft.azure.toolkit.lib.Azure @@ -24,6 +25,10 @@ import java.util.stream.Collectors class FunctionAppComboBox(project: Project) : AppServiceComboBox(project) { var targetProjectOnNetFramework: Boolean = false + init { + setRenderer(AppServiceComboBoxDotNetRender()) + } + override fun refreshItems() { Azure.az(AzureFunctions::class.java).refresh() super.refreshItems() diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionDeploymentState.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionDeploymentState.kt index 166bbb9b680..be5c8157975 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionDeploymentState.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/FunctionDeploymentState.kt @@ -14,7 +14,7 @@ import com.jetbrains.rider.model.PublishableProjectModel import com.jetbrains.rider.model.publishableProjectsModel import com.jetbrains.rider.projectView.solution import com.microsoft.azure.toolkit.intellij.appservice.DotNetAppServiceDeployer -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntimeConfig +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntimeConfig import com.microsoft.azure.toolkit.intellij.appservice.functionapp.CreateDotNetFunctionAppTask import com.microsoft.azure.toolkit.intellij.appservice.functionapp.DotNetFunctionAppConfig import com.microsoft.azure.toolkit.intellij.appservice.functionapp.DotNetFunctionAppDeploymentSlotDraft diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppComboBox.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppComboBox.kt index 6bf2cd4b068..9c9f67d5998 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppComboBox.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppComboBox.kt @@ -8,6 +8,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.util.Disposer import com.intellij.ui.dsl.builder.Cell import com.intellij.ui.dsl.builder.Row +import com.microsoft.azure.toolkit.intellij.appservice.components.AppServiceComboBoxDotNetRender import com.microsoft.azure.toolkit.intellij.legacy.appservice.AppServiceComboBox import com.microsoft.azure.toolkit.lib.Azure import com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase @@ -23,6 +24,10 @@ import java.util.stream.Collectors open class WebAppComboBox(project: Project) : AppServiceComboBox(project) { var targetProjectOnNetFramework: Boolean = false + init { + setRenderer(AppServiceComboBoxDotNetRender()) + } + override fun refreshItems() { Azure.az(AzureWebApp::class.java).refresh() super.refreshItems() diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppDeploymentState.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppDeploymentState.kt index 2f1510fd26b..96c6a6ddf25 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppDeploymentState.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webApp/WebAppDeploymentState.kt @@ -13,7 +13,7 @@ import com.intellij.openapi.project.Project import com.jetbrains.rider.model.PublishableProjectModel import com.jetbrains.rider.model.publishableProjectsModel import com.jetbrains.rider.projectView.solution -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntimeConfig +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntimeConfig import com.microsoft.azure.toolkit.intellij.appservice.functionapp.DotNetFunctionAppDeploymentSlotDraft import com.microsoft.azure.toolkit.intellij.appservice.webapp.CreateDotNetWebAppTask import com.microsoft.azure.toolkit.intellij.appservice.webapp.DotNetAppServiceConfig diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webAppContainer/WebAppContainerDeploymentState.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webAppContainer/WebAppContainerDeploymentState.kt index 52bff7d5b8d..2df7f9a4bcc 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webAppContainer/WebAppContainerDeploymentState.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webAppContainer/WebAppContainerDeploymentState.kt @@ -5,7 +5,7 @@ package com.microsoft.azure.toolkit.intellij.legacy.webapp.runner.webAppContainer import com.intellij.openapi.project.Project -import com.microsoft.azure.toolkit.intellij.appservice.DotNetRuntimeConfig +import com.microsoft.azure.toolkit.intellij.appservice.dotnetRuntime.DotNetRuntimeConfig import com.microsoft.azure.toolkit.intellij.appservice.webapp.CreateDotNetWebAppTask import com.microsoft.azure.toolkit.intellij.appservice.webapp.DotNetAppServiceConfig import com.microsoft.azure.toolkit.intellij.common.RunProcessHandler