Search in sources :

Example 1 with MavenTasksManager

use of org.jetbrains.idea.maven.tasks.MavenTasksManager in project intellij-community by JetBrains.

the class ToggleCompilerTasksAction method setSelected.

@Override
public void setSelected(AnActionEvent e, boolean state) {
    final DataContext context = e.getDataContext();
    final MavenTasksManager tasksManager = getTasksManager(context);
    List<MavenCompilerTask> tasks = getTasks(context);
    if (tasksManager == null)
        return;
    if (state) {
        addTasks(tasksManager, tasks);
    } else {
        removeTasks(tasksManager, tasks);
    }
}
Also used : MavenCompilerTask(org.jetbrains.idea.maven.tasks.MavenCompilerTask) DataContext(com.intellij.openapi.actionSystem.DataContext) MavenTasksManager(org.jetbrains.idea.maven.tasks.MavenTasksManager)

Aggregations

DataContext (com.intellij.openapi.actionSystem.DataContext)1 MavenCompilerTask (org.jetbrains.idea.maven.tasks.MavenCompilerTask)1 MavenTasksManager (org.jetbrains.idea.maven.tasks.MavenTasksManager)1