Search in sources :

Example 1 with MavenIgnoredFilesConfigurable

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

the class ToggleIgnoredProjectsAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
    final DataContext context = e.getDataContext();
    MavenProjectsManager projectsManager = MavenActionUtil.getProjectsManager(context);
    if (projectsManager == null)
        return;
    List<MavenProject> projects = MavenActionUtil.getMavenProjects(context);
    final Project project = MavenActionUtil.getProject(context);
    if (project == null)
        return;
    if (isIgnoredInSettings(projectsManager, projects)) {
        ShowSettingsUtil.getInstance().editConfigurable(project, new MavenIgnoredFilesConfigurable(project));
    } else {
        projectsManager.setIgnoredState(projects, !isIgnored(projectsManager, projects));
    }
}
Also used : MavenProject(org.jetbrains.idea.maven.project.MavenProject) Project(com.intellij.openapi.project.Project) DataContext(com.intellij.openapi.actionSystem.DataContext) MavenProjectsManager(org.jetbrains.idea.maven.project.MavenProjectsManager) MavenProject(org.jetbrains.idea.maven.project.MavenProject) MavenIgnoredFilesConfigurable(org.jetbrains.idea.maven.project.MavenIgnoredFilesConfigurable)

Aggregations

DataContext (com.intellij.openapi.actionSystem.DataContext)1 Project (com.intellij.openapi.project.Project)1 MavenIgnoredFilesConfigurable (org.jetbrains.idea.maven.project.MavenIgnoredFilesConfigurable)1 MavenProject (org.jetbrains.idea.maven.project.MavenProject)1 MavenProjectsManager (org.jetbrains.idea.maven.project.MavenProjectsManager)1