From 502ce93513d7d99e61a851efac3edcc5d78d4eee Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Tue, 19 Dec 2023 07:21:01 +0100 Subject: [PATCH] Azure Functions: Default run configuration is no longer Azure Functions run configuration #746 --- .../resources/META-INF/platformPlugin.xml | 1 + .../rider/resources/META-INF/plugin.xml | 1 + .../run/AzureFunctionsHostRunConfigurationProducer.kt | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/resources/META-INF/platformPlugin.xml b/PluginsAndFeatures/azure-toolkit-for-intellij/resources/META-INF/platformPlugin.xml index 6e07a9a6c2..a380c022f5 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/resources/META-INF/platformPlugin.xml +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/resources/META-INF/platformPlugin.xml @@ -12,6 +12,7 @@

Fixed bugs:

diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/rider/resources/META-INF/plugin.xml b/PluginsAndFeatures/azure-toolkit-for-intellij/rider/resources/META-INF/plugin.xml index 7eb1454c4f..439d6b2bd9 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/rider/resources/META-INF/plugin.xml +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/rider/resources/META-INF/plugin.xml @@ -31,6 +31,7 @@

Fixed bugs:

diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/rider/src/org/jetbrains/plugins/azure/functions/run/AzureFunctionsHostRunConfigurationProducer.kt b/PluginsAndFeatures/azure-toolkit-for-intellij/rider/src/org/jetbrains/plugins/azure/functions/run/AzureFunctionsHostRunConfigurationProducer.kt index 2eff673d99..0c0a81ac64 100644 --- a/PluginsAndFeatures/azure-toolkit-for-intellij/rider/src/org/jetbrains/plugins/azure/functions/run/AzureFunctionsHostRunConfigurationProducer.kt +++ b/PluginsAndFeatures/azure-toolkit-for-intellij/rider/src/org/jetbrains/plugins/azure/functions/run/AzureFunctionsHostRunConfigurationProducer.kt @@ -1,5 +1,5 @@ /** - * Copyright (c) 2020-2022 JetBrains s.r.o. + * Copyright (c) 2020-2023 JetBrains s.r.o. * * All rights reserved. * @@ -23,6 +23,7 @@ package org.jetbrains.plugins.azure.functions.run import com.intellij.execution.actions.ConfigurationContext +import com.intellij.execution.actions.ConfigurationFromContext import com.intellij.execution.actions.LazyRunConfigurationProducer import com.intellij.execution.configurations.ConfigurationTypeUtil import com.intellij.openapi.util.Ref @@ -82,4 +83,8 @@ class AzureFunctionsHostRunConfigurationProducer return true } + + override fun shouldReplace(self: ConfigurationFromContext, other: ConfigurationFromContext): Boolean { + return !other.isProducedBy(AzureFunctionsHostRunConfigurationProducer::class.java) + } }