mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[actions] action-update-thread: maven actions
GitOrigin-RevId: 181cf6ce2ae64c567b1d00dd60fc193214ae9f0e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4614f168fe
commit
65bac975d2
@@ -17,6 +17,7 @@ package org.jetbrains.idea.maven.tasks.actions;
|
||||
|
||||
import com.intellij.execution.RunManager;
|
||||
import com.intellij.execution.RunManagerEx;
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -33,6 +34,12 @@ import org.jetbrains.idea.maven.utils.actions.MavenToggleAction;
|
||||
import java.util.List;
|
||||
|
||||
public class ToggleBeforeRunTaskAction extends MavenToggleAction {
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAvailable(@NotNull AnActionEvent e) {
|
||||
return super.isAvailable(e) && getTaskDesc(e.getDataContext()) != null;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.idea.maven.tasks.actions;
|
||||
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -39,6 +40,11 @@ public abstract class ToggleCompilerTasksAction extends MavenToggleAction {
|
||||
myPhase = phase;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAvailable(@NotNull AnActionEvent e) {
|
||||
return super.isAvailable(e) && !getTasks(e.getDataContext()).isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user