diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/resources/whatsnew/whatsnew.md b/PluginsAndFeatures/azure-toolkit-for-intellij/resources/whatsnew/whatsnew.md
index daacefca0e..ba2e51da95 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/resources/whatsnew/whatsnew.md
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/resources/whatsnew/whatsnew.md
@@ -79,63 +79,6 @@ For all the updates and fixes in this release, please refer the release notes be
### Changed
- Show non-anonymous HTTP trigger urls after function deployment
-## 3.39.0
-
-[Azure CLI](https://docs.microsoft.com/cli/azure/) is supported as a sign in option. You can now sign in with single click if you have already signed in with Azure CLI.
-
-![azure-cli-auth](https://user-images.githubusercontent.com/12445236/86110888-b1734a00-baf8-11ea-9d12-6bffef0d6823.gif)
-
-Besides, Azure toolkit add new support on [Azure Synapse](https://docs.microsoft.com/en-us/azure/synapse-analytics/spark/intellij-tool-synapse) now! The following features are waiting to be discovered.
- - Monitor Spark batch job on Spark history server UI and Spark job details UI
-
- ![monitor-spark-batch-job](https://user-images.githubusercontent.com/32627233/86082318-0ba8e680-baca-11ea-97db-bfdb21c33310.gif)
-
- - Run Apache Spark Livy interactive console on Azure Synapse
-
-![spark-interactive-console](https://user-images.githubusercontent.com/32627233/84374160-319c4300-ac10-11ea-902a-f98dec9d6f99.gif)
-
-### Added
-- Support Azure Functions with Java 11 runtime(Preview)
-- Support authentication with Azure CLI credentials
-
-### Changed
-- Show Apache Spark on Cosmos node by default no matter whether there are SoC clusters under user's subscription or not
-- Remove Docker Host in Azure Explorer
-
-### Fixed
-- Fix Spark history server link broken for Azure Synapse issue
-- [#3712](https://github.com/microsoft/azure-tools-for-java/issues/3712) Fixes NPE while refreshing Azure node
-- [#4449](https://github.com/microsoft/azure-tools-for-java/issues/4449) Fixes NPE while parsing Function bindings
-- [#2226](https://github.com/microsoft/azure-tools-for-java/issues/2226) Fixes AuthException for no subscrition account
-- [#4102](https://github.com/microsoft/azure-tools-for-java/issues/4102) Fixes Exception when app service run process is terminated
-- [#4389](https://github.com/microsoft/azure-tools-for-java/issues/4389) Fixes check box UI issue when create function project
-- [#4307](https://github.com/microsoft/azure-tools-for-java/issues/4307) Selecting wrong module automatically when adding function run configuration for gradle function project
-
-
-## 3.38.0
-We are proud to announce the support for [Azure Synapse](https://docs.microsoft.com/en-us/azure/synapse-analytics/spark/intellij-tool-synapse) in Azure toolkit! The following features are waiting to be discovered.
- - List Azure Synapse workspaces and Apache Spark pools
-
-![list-workspaces-pools-blur](https://user-images.githubusercontent.com/32627233/84378742-3dd7ce80-ac17-11ea-871f-d85e9bedf99f.gif)
-
- - Submit Apache Spark batch jobs to Apache Spark pools
-
-![synapse-submit-middle-quick](https://user-images.githubusercontent.com/32627233/84487331-2f4ded80-acd1-11ea-8fe1-b6cc15b9371b.gif)
-
-### Added
-- Support create application insights connection while creating new function app
-
-### Changed
-- Deprecate Docker Host(will be removed in v3.39.0)
-
-### Fixed
-- [#4423](https://github.com/microsoft/azure-tools-for-java/issues/4423) Spark local run mockfs issue with Hive support enabled
-- [#4410](https://github.com/microsoft/azure-tools-for-java/issues/4410) The context menu Submit Spark Application
action regression issue at IDEA 2020.1
-- [#4419](https://github.com/microsoft/azure-tools-for-java/issues/4419) The run configuration Spark config table changes didn't take effects regression
-- [#4413](https://github.com/microsoft/azure-tools-for-java/issues/4413) The regression issue of Spark local console with Scala plugin 2020.1.36
-- [#4422](https://github.com/microsoft/azure-tools-for-java/issues/4422) Fixes ConcurrentModificationException
while refreshing spring cloud clusters
-- [#4438](https://github.com/microsoft/azure-tools-for-java/issues/4438) Fixes modality state issue when open what's new document
-
## Summary
The plugin allows Java developers to easily develop, configure, test, and deploy highly available and scalable Java web apps. It also supports Azure Synapse data engineers, Azure HDInsight developers and Apache Spark on SQL Server users to create, test and submit Apache Spark/Hadoop jobs to Azure from IntelliJ on all supported platforms.
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/appservice/platform/PlatformComboBox.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/appservice/platform/PlatformComboBox.java
index c2dd524c10..da75840ce2 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/appservice/platform/PlatformComboBox.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/appservice/platform/PlatformComboBox.java
@@ -40,7 +40,6 @@ public class PlatformComboBox extends AzureComboBox {
Platform.Linux.JAVA11,
Platform.Windows.JAVA8_TOMCAT9,
Platform.Windows.JAVA8_TOMCAT85,
- Platform.Windows.JAVA8_JBOSS72,
Platform.Windows.JAVA8,
Platform.Windows.JAVA11_TOMCAT9,
Platform.Windows.JAVA11_TOMCAT85,
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/common/AzureArtifactComboBox.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/common/AzureArtifactComboBox.java
index e4154bf9d2..f9e3f7daef 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/common/AzureArtifactComboBox.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/common/AzureArtifactComboBox.java
@@ -69,14 +69,14 @@ public void setFileFilter(final Condition super VirtualFile> filter) {
this.fileFilter = filter;
}
- public synchronized void refreshItems(AzureArtifactType defaultArtifactType, String artifactIdentifier) {
+ public synchronized void refreshItems(AzureArtifact defaultArtifact) {
unsubscribeSubscription(subscription);
this.setLoading(true);
subscription = this.loadItemsAsync()
.subscribe(items -> DefaultLoader.getIdeHelper().invokeLater(() -> {
this.setItems(items);
this.setLoading(false);
- this.resetDefaultValue(defaultArtifactType, artifactIdentifier);
+ this.resetDefaultValue(defaultArtifact);
}), this::handleLoadingError);
}
@@ -149,17 +149,16 @@ private void addOrSelectExistingVirtualFile(VirtualFile virtualFile) {
}
}
- private void resetDefaultValue(final AzureArtifactType defaultArtifactType, final String artifactIdentifier) {
+ private void resetDefaultValue(final AzureArtifact defaultArtifact) {
final List artifacts = this.getItems();
final AzureArtifactManager manager = AzureArtifactManager.getInstance(project);
- final Predicate predicate = artifact -> StringUtils.equals(artifactIdentifier, manager.getArtifactIdentifier(artifact));
- final AzureArtifact defaultArtifact = artifacts.stream().filter(predicate).findFirst().orElse(null);
- if (defaultArtifact != null) {
+ final Predicate predicate = artifact -> manager.equalsAzureArtifactIdentifier(defaultArtifact, artifact);
+ final AzureArtifact toSelect = artifacts.stream().filter(predicate).findFirst().orElse(null);
+ if (toSelect != null) {
+ this.setSelectedItem(toSelect);
+ } else if (defaultArtifact.getType() == AzureArtifactType.File) {
+ this.addItem(defaultArtifact);
this.setSelectedItem(defaultArtifact);
- } else if (defaultArtifactType == AzureArtifactType.File) {
- final AzureArtifact userArtifact = AzureArtifact.createFromFile(artifactIdentifier);
- this.addItem(userArtifact);
- this.setSelectedItem(userArtifact);
} else {
this.setSelectedItem(null);
}
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/lib/appservice/Platform.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/lib/appservice/Platform.java
index 41b010bf46..ee2c246315 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/lib/appservice/Platform.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/lib/appservice/Platform.java
@@ -106,7 +106,6 @@ public String toString() {
enum Windows implements Platform {
JAVA8("java 8", "1.8"),
JAVA11("java 11", "11"),
- JAVA8_JBOSS72("jboss 7.2", "1.8"),
JAVA8_TOMCAT9("tomcat 9.0", "1.8"),
JAVA8_TOMCAT85("tomcat 8.5", "1.8"),
JAVA11_TOMCAT9("tomcat 9.0", "11"),
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/WhatsNewManager.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/WhatsNewManager.java
index 4bf37688e6..565945d46b 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/WhatsNewManager.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/WhatsNewManager.java
@@ -33,7 +33,6 @@
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.LightVirtualFile;
import com.microsoft.azure.hdinsight.common.StreamUtil;
-import com.microsoft.tooling.msservices.components.DefaultLoader;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
@@ -84,7 +83,7 @@ private void createAndShowWhatsNew(Project project, FileEditorManager fileEditor
virtualFile.setContent(null, content, true);
virtualFile.putUserData(WHAT_S_NEW_ID, WHAT_S_NEW_CONSTANT);
virtualFile.setWritable(false);
- DefaultLoader.getIdeHelper().invokeAndWait(() -> {
+ ApplicationManager.getApplication().invokeAndWait(() -> {
final FileEditor[] fileEditors = fileEditorManager.openFile(virtualFile, true, true);
for (FileEditor fileEditor : fileEditors) {
if (fileEditor instanceof MarkdownSplitEditor) {
@@ -93,7 +92,7 @@ private void createAndShowWhatsNew(Project project, FileEditorManager fileEditor
true);
}
}
- });
+ }, ModalityState.defaultModalityState());
}
private String getWhatsNewContent() throws IOException {
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/AzureSettingPanel.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/AzureSettingPanel.java
index e99a53081a..408f55028e 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/AzureSettingPanel.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/AzureSettingPanel.java
@@ -61,7 +61,7 @@ public abstract class AzureSettingPanel {
private boolean isArtifact;
private boolean telemetrySent;
private Artifact lastSelectedArtifact;
- private AzureArtifact lastSelectedAzureArtifact;
+ protected AzureArtifact lastSelectedAzureArtifact;
protected SecureStore secureStore;
public AzureSettingPanel(@NotNull Project project) {
@@ -275,15 +275,6 @@ public void customize(JList list,
}
});
- getCbAzureArtifact().addActionListener(e -> {
- AzureArtifact artifact = (AzureArtifact) getCbAzureArtifact().getSelectedItem();
- syncBeforeRunTasks(artifact, configuration);
- });
-
- if (getCbAzureArtifact().getSelectedItem() != null) {
- syncBeforeRunTasks((AzureArtifact) getCbAzureArtifact().getSelectedItem(), configuration);
- }
-
isCbArtifactInited = true;
}
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/springcloud/ui/SpringCloudAppSettingPanel.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/springcloud/ui/SpringCloudAppSettingPanel.java
index d6a8325cb0..09844a646f 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/springcloud/ui/SpringCloudAppSettingPanel.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/springcloud/ui/SpringCloudAppSettingPanel.java
@@ -481,7 +481,7 @@ protected void apply(@NotNull SpringCloudDeployConfiguration configuration) {
} else {
configuration.setArtifactIdentifier("");
}
-
+ syncBeforeRunTasks(artifact, configuration);
}
private static T getValueFromComboBox(JComboBox comboBox, Function selectFunc, @NotNull Class clz) {
diff --git a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/webapp/webappconfig/slimui/WebAppSlimSettingPanel.java b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/webapp/webappconfig/slimui/WebAppSlimSettingPanel.java
index ec9618031f..a65268163f 100644
--- a/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/webapp/webappconfig/slimui/WebAppSlimSettingPanel.java
+++ b/PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/runner/webapp/webappconfig/slimui/WebAppSlimSettingPanel.java
@@ -39,7 +39,6 @@
import com.microsoft.intellij.ui.components.AzureArtifact;
import com.microsoft.intellij.ui.components.AzureArtifactManager;
import com.microsoft.intellij.ui.util.UIUtils;
-import com.microsoft.intellij.util.BeforeRunTaskUtils;
import com.microsoft.tooling.msservices.components.DefaultLoader;
import org.apache.commons.compress.utils.FileNameUtils;
import org.apache.commons.lang.ArrayUtils;
@@ -62,8 +61,6 @@ public class WebAppSlimSettingPanel extends AzureSettingPanel {
- if (!(event.getItem() instanceof AzureArtifact)) {
- return;
- } else {
- syncBeforeRunTasks((AzureArtifact) event.getItem());
- }
- });
- }
-
- private synchronized void syncBeforeRunTasks(AzureArtifact azureArtifact) {
- try {
- if (AzureArtifactManager.getInstance(project).equalsAzureArtifactIdentifier(previousArtifact, azureArtifact)) {
- return;
- }
- if (previousArtifact != null) {
- BeforeRunTaskUtils.addOrRemoveBeforeRunTask(this.getMainPanel(), previousArtifact, webAppConfiguration, false);
- }
- previousArtifact = azureArtifact;
- BeforeRunTaskUtils.addOrRemoveBeforeRunTask(this.getMainPanel(), azureArtifact, webAppConfiguration, true);
- } catch (IllegalAccessException e) {
- // swallow before run task errors
- }
}
private void loadDeploymentSlot(WebAppComboBoxModel selectedWebApp) {
diff --git a/Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/vmarm/VMArmModule.java b/Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/vmarm/VMArmModule.java
index ffcf48d045..f1f44b0c60 100644
--- a/Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/vmarm/VMArmModule.java
+++ b/Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/vmarm/VMArmModule.java
@@ -36,7 +36,9 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
+import java.util.stream.Collectors;
public class VMArmModule extends AzureRefreshableNode {
private static final String VM_SERVICE_MODULE_ID = com.microsoft.tooling.msservices.serviceexplorer.azure.vmarm.VMArmModule.class.getName();
@@ -58,7 +60,11 @@ protected void refreshItems() throws AzureCmdException {
}
SubscriptionManager subscriptionManager = azureManager.getSubscriptionManager();
- Set sidList = subscriptionManager.getAccountSidList();
+ Set sidList = subscriptionManager.getSelectedSubscriptionDetails()
+ .stream()
+ .filter(subscriptionDetail -> Objects.nonNull(subscriptionDetail) && subscriptionDetail.isSelected())
+ .map(subscriptionDetail -> subscriptionDetail.getSubscriptionId())
+ .collect(Collectors.toSet());
for (String sid : sidList) {
try {
Azure azure = azureManager.getAzure(sid);