|
7 | 7 |
|
8 | 8 | import com.intellij.icons.AllIcons; |
9 | 9 | import com.intellij.ide.IdeTooltipManager; |
| 10 | +import com.intellij.openapi.application.ApplicationManager; |
10 | 11 | import com.intellij.openapi.project.Project; |
11 | 12 | import com.intellij.openapi.util.Comparing; |
12 | 13 | import com.intellij.packaging.artifacts.Artifact; |
13 | 14 | import com.intellij.ui.HideableDecorator; |
14 | 15 | import com.intellij.ui.HyperlinkLabel; |
15 | 16 | import com.microsoft.azure.management.appservice.DeploymentSlot; |
16 | | -import com.microsoft.azure.toolkit.intellij.appservice.AppServiceComboBoxModel; |
17 | 17 | import com.microsoft.azure.toolkit.intellij.common.*; |
18 | 18 | import com.microsoft.azure.toolkit.intellij.webapp.WebAppComboBox; |
19 | 19 | import com.microsoft.azure.toolkit.intellij.webapp.WebAppComboBoxModel; |
@@ -250,7 +250,14 @@ protected void apply(@NotNull WebAppConfiguration configuration) { |
250 | 250 | } |
251 | 251 | configuration.setDeployToRoot(chkToRoot.isVisible() && chkToRoot.isSelected()); |
252 | 252 | configuration.setOpenBrowserAfterDeployment(chkOpenBrowser.isSelected()); |
253 | | - syncBeforeRunTasks(comboBoxArtifact.getValue(), configuration); |
| 253 | + // hot fix, to avoid similar cases, prefer to refactor this code with common factory |
| 254 | + if (ApplicationManager.getApplication().isDispatchThread()) { |
| 255 | + syncBeforeRunTasks(comboBoxArtifact.getValue(), configuration); |
| 256 | + } else { |
| 257 | + ApplicationManager.getApplication().invokeLater(() -> |
| 258 | + syncBeforeRunTasks(comboBoxArtifact.getValue(), configuration) |
| 259 | + ); |
| 260 | + } |
254 | 261 | } |
255 | 262 |
|
256 | 263 | private boolean isAbleToDeployToRoot(final AzureArtifact azureArtifact) { |
|
0 commit comments