Search in sources :

Example 6 with CheckStyleToolWindowPanel

use of org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel in project checkstyle-idea by jshiell.

the class DisplayInfo method isSelected.

@Override
public boolean isSelected(final AnActionEvent event) {
    final Project project = getEventProject(event);
    if (project == null) {
        return false;
    }
    Boolean displayingInfo = getFromToolWindowPanel(toolWindow(project), CheckStyleToolWindowPanel::isDisplayingInfo);
    if (displayingInfo != null) {
        return displayingInfo;
    }
    return false;
}
Also used : Project(com.intellij.openapi.project.Project) CheckStyleToolWindowPanel(org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel)

Example 7 with CheckStyleToolWindowPanel

use of org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel in project checkstyle-idea by jshiell.

the class ScanFilesBeforeCheckinHandler method showResultsInToolWindow.

private void showResultsInToolWindow(final Map<PsiFile, List<Problem>> results, final CheckStylePlugin plugin) {
    final CheckStyleToolWindowPanel toolWindowPanel = CheckStyleToolWindowPanel.panelFor(plugin.getProject());
    if (toolWindowPanel != null) {
        toolWindowPanel.displayResults(results);
        toolWindowPanel.showToolWindow();
    }
}
Also used : CheckStyleToolWindowPanel(org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel)

Example 8 with CheckStyleToolWindowPanel

use of org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel in project checkstyle-idea by jshiell.

the class DisplayErrors method isSelected.

@Override
public boolean isSelected(final AnActionEvent event) {
    final Project project = getEventProject(event);
    if (project == null) {
        return false;
    }
    Boolean displayingErrors = getFromToolWindowPanel(toolWindow(project), CheckStyleToolWindowPanel::isDisplayingErrors);
    if (displayingErrors != null) {
        return displayingErrors;
    }
    return false;
}
Also used : Project(com.intellij.openapi.project.Project) CheckStyleToolWindowPanel(org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel)

Example 9 with CheckStyleToolWindowPanel

use of org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel in project checkstyle-idea by jshiell.

the class DisplayWarnings method isSelected.

@Override
public boolean isSelected(final AnActionEvent event) {
    final Project project = getEventProject(event);
    if (project == null) {
        return false;
    }
    Boolean displayingWarnings = getFromToolWindowPanel(toolWindow(project), CheckStyleToolWindowPanel::isDisplayingWarnings);
    if (displayingWarnings != null) {
        return displayingWarnings;
    }
    return false;
}
Also used : Project(com.intellij.openapi.project.Project) CheckStyleToolWindowPanel(org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel)

Aggregations

CheckStyleToolWindowPanel (org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel)9 Project (com.intellij.openapi.project.Project)6 Content (com.intellij.ui.content.Content)3 ToolWindow (com.intellij.openapi.wm.ToolWindow)2 CheckStylePlugin (org.infernus.idea.checkstyle.CheckStylePlugin)2