diff --git a/base/src/com/google/idea/blaze/base/actions/BlazeMenuGroup.java b/base/src/com/google/idea/blaze/base/actions/BlazeMenuGroup.java index 7fe7e016c2d..582f88c1c93 100644 --- a/base/src/com/google/idea/blaze/base/actions/BlazeMenuGroup.java +++ b/base/src/com/google/idea/blaze/base/actions/BlazeMenuGroup.java @@ -17,6 +17,7 @@ import com.google.idea.blaze.base.settings.Blaze; import com.google.idea.blaze.base.settings.BuildSystemName; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.openapi.project.Project; @@ -51,4 +52,9 @@ private static String menuName(BuildSystemName buildSystemName) { public boolean isDumbAware() { return true; } + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } } diff --git a/base/src/com/google/idea/blaze/base/actions/BlazeProjectAction.java b/base/src/com/google/idea/blaze/base/actions/BlazeProjectAction.java index dc550e0aac3..08efe283bda 100644 --- a/base/src/com/google/idea/blaze/base/actions/BlazeProjectAction.java +++ b/base/src/com/google/idea/blaze/base/actions/BlazeProjectAction.java @@ -20,6 +20,7 @@ import com.google.idea.blaze.base.settings.Blaze; import com.google.idea.blaze.base.settings.BuildSystemName; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.Project; @@ -125,6 +126,11 @@ public final void actionPerformed(AnActionEvent anActionEvent) { protected void updateForBlazeProject(Project project, AnActionEvent e) {} + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.BGT; + } + protected abstract void actionPerformedInBlazeProject(Project project, AnActionEvent e); private boolean compatibleBuildSystem(Project project) { diff --git a/base/src/com/google/idea/blaze/base/actions/BlazeProjectToggleAction.java b/base/src/com/google/idea/blaze/base/actions/BlazeProjectToggleAction.java index 270f0679815..efa77c39db3 100644 --- a/base/src/com/google/idea/blaze/base/actions/BlazeProjectToggleAction.java +++ b/base/src/com/google/idea/blaze/base/actions/BlazeProjectToggleAction.java @@ -16,6 +16,7 @@ package com.google.idea.blaze.base.actions; import com.google.idea.blaze.base.settings.Blaze; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.ToggleAction; import com.intellij.openapi.project.Project; @@ -49,4 +50,9 @@ public final void update(AnActionEvent e) { } protected void updateForBlazeProject(Project project, AnActionEvent e) {} + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.BGT; + } } diff --git a/base/src/com/google/idea/blaze/base/run/exporter/ExportRunConfigurationDialog.java b/base/src/com/google/idea/blaze/base/run/exporter/ExportRunConfigurationDialog.java index 18ad585e0ae..7d560513e76 100644 --- a/base/src/com/google/idea/blaze/base/run/exporter/ExportRunConfigurationDialog.java +++ b/base/src/com/google/idea/blaze/base/run/exporter/ExportRunConfigurationDialog.java @@ -27,6 +27,7 @@ import com.intellij.execution.RunManager; import com.intellij.execution.configurations.RunConfiguration; import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.fileChooser.FileChooserDescriptor; @@ -276,5 +277,10 @@ public synchronized void actionPerformed(AnActionEvent anActionEvent) { table.revalidate(); table.repaint(); } + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } } } diff --git a/base/src/com/google/idea/blaze/base/sync/actions/IncrementalSyncProjectAction.java b/base/src/com/google/idea/blaze/base/sync/actions/IncrementalSyncProjectAction.java index 0be0dd159c1..b6f86d21f9f 100644 --- a/base/src/com/google/idea/blaze/base/sync/actions/IncrementalSyncProjectAction.java +++ b/base/src/com/google/idea/blaze/base/sync/actions/IncrementalSyncProjectAction.java @@ -28,6 +28,7 @@ import com.intellij.notification.NotificationGroup; import com.intellij.notification.NotificationType; import com.intellij.notification.Notifications; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.application.ApplicationNamesInfo; @@ -117,4 +118,10 @@ private static void showPopupNotification(Project project) { protected QuerySyncStatus querySyncSupport() { return QuerySyncStatus.SUPPORTED; } + + @Override + public ActionUpdateThread getActionUpdateThread() { + // Not clear what `showPopupNotification` does and why. + return ActionUpdateThread.EDT; + } } diff --git a/base/src/com/google/idea/blaze/base/toolwindow/ConsoleView.java b/base/src/com/google/idea/blaze/base/toolwindow/ConsoleView.java index 17e2675c05c..aa2d4272281 100644 --- a/base/src/com/google/idea/blaze/base/toolwindow/ConsoleView.java +++ b/base/src/com/google/idea/blaze/base/toolwindow/ConsoleView.java @@ -44,6 +44,7 @@ import com.intellij.ide.actions.NextOccurenceToolbarAction; import com.intellij.ide.actions.PreviousOccurenceToolbarAction; import com.intellij.openapi.Disposable; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.DefaultActionGroup; @@ -272,6 +273,11 @@ public void actionPerformed(AnActionEvent e) { public void update(AnActionEvent event) { event.getPresentation().setEnabled(stopHandler != null); } + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } } /** A composite filter composed of a modifiable list of custom filters. */ diff --git a/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java b/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java index a1800c500d3..eb907305ea7 100644 --- a/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java +++ b/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java @@ -28,6 +28,7 @@ import com.intellij.openapi.actionSystem.ActionManager; import com.intellij.openapi.actionSystem.ActionPlaces; import com.intellij.openapi.actionSystem.ActionToolbar; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.actionSystem.DataKey; @@ -182,6 +183,11 @@ public boolean isSelected(AnActionEvent event) { public void setSelected(AnActionEvent event, boolean flag) { configuration.setAutoscrollToConsole(flag); } + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } } private static class OpenInConsoleAction extends BaseNavigateToSourceAction { @@ -222,6 +228,11 @@ public void setSelected(AnActionEvent event, boolean showWarnings) { reload(); } } + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } } @Override diff --git a/base/src/com/google/idea/blaze/base/wizard2/BlazeImportProjectAction.java b/base/src/com/google/idea/blaze/base/wizard2/BlazeImportProjectAction.java index af41e6e8358..1409ca37aab 100644 --- a/base/src/com/google/idea/blaze/base/wizard2/BlazeImportProjectAction.java +++ b/base/src/com/google/idea/blaze/base/wizard2/BlazeImportProjectAction.java @@ -17,6 +17,7 @@ import com.google.idea.blaze.base.settings.Blaze; import com.intellij.ide.util.projectWizard.WizardContext; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.application.ApplicationManager; @@ -54,6 +55,11 @@ public void update(AnActionEvent e) { .setText(String.format("Import %s Project...", Blaze.defaultBuildSystemName())); } + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } + private static void createFromWizard( BlazeProjectCreator blazeProjectCreator, WizardContext wizardContext) { try { diff --git a/java/src/com/google/idea/blaze/java/run/hotswap/BlazeHotSwapAction.java b/java/src/com/google/idea/blaze/java/run/hotswap/BlazeHotSwapAction.java index ae4ad5899be..3c24375b4ec 100644 --- a/java/src/com/google/idea/blaze/java/run/hotswap/BlazeHotSwapAction.java +++ b/java/src/com/google/idea/blaze/java/run/hotswap/BlazeHotSwapAction.java @@ -19,6 +19,7 @@ import com.google.idea.common.actions.ReplaceActionHelper; import com.intellij.debugger.actions.HotSwapAction; import com.intellij.openapi.actionSystem.ActionManager; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.impl.ActionConfigurationCustomizer; @@ -60,4 +61,9 @@ public void update(AnActionEvent e) { && BlazeHotSwapManager.findHotSwappableBlazeDebuggerSession(e.getProject()) != null; e.getPresentation().setEnabled(canHotSwap); } + + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.BGT; + } }