Package org.infernus.idea.checkstyle.toolwindow

Examples of org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel


        }

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel)
                toolWindow.getContentManager().getContent(0).getComponent();
        panel.collapseTree();
    }
View Full Code Here


        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            panel.expandTree();
        }
    }
View Full Code Here

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            return panel.isDisplayingErrors();
        }

        return false;
    }
View Full Code Here

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            panel.setDisplayingErrors(selected);
            panel.filterDisplayedResults();
        }
    }
View Full Code Here

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            return panel.isDisplayingInfo();
        }

        return false;
    }
View Full Code Here

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            panel.setDisplayingInfo(selected);
            panel.filterDisplayedResults();
        }
    }
View Full Code Here

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            return panel.isScrollToSource();
        }

        return false;
    }
View Full Code Here

        final ToolWindow toolWindow = ToolWindowManager.getInstance(
                project).getToolWindow(CheckStyleConstants.ID_TOOLWINDOW);

        final Content content = toolWindow.getContentManager().getContent(0);
        if (content != null) {
            final CheckStyleToolWindowPanel panel = (CheckStyleToolWindowPanel) content.getComponent();
            panel.setScrollToSource(selected);
        }
    }
View Full Code Here

                buttons, 0, UIUtil.getWarningIcon());
    }

    private void showResultsInToolWindow(final Map<PsiFile, List<ProblemDescriptor>> results,
                                         final CheckStylePlugin plugin) {
        final CheckStyleToolWindowPanel toolWindowPanel = CheckStyleToolWindowPanel.panelFor(plugin.getProject());
        if (toolWindowPanel != null) {
            toolWindowPanel.displayResults(results);
            toolWindowPanel.showToolWindow();
        }
    }
View Full Code Here

        try {
            // set progress bar
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    final CheckStyleToolWindowPanel toolWindowPanel = toolWindowPanel();
                    if (toolWindowPanel != null) {
                        toolWindowPanel.displayInProgress(getFiles().size());
                    }
                }
            });

            this.processFilesForModuleInfoAndScan();

            // invoke Swing fun in Swing thread.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    final CheckStyleToolWindowPanel toolWindowPanel = toolWindowPanel();
                    if (toolWindowPanel != null) {
                        switch (getConfigurationLocationStatus()) {
                            case NOT_PRESENT:
                                toolWindowPanel.displayWarningResult("plugin.results.no-rules-file");
                                break;
                            case BLACKLISTED:
                                toolWindowPanel.displayWarningResult("plugin.results.rules-blacklist");
                                break;
                            default:
                                toolWindowPanel.displayResults(getFileResults());
                        }
                    }
                    markThreadComplete();
                }
            });

        } catch (final Throwable e) {
            final CheckStylePluginException processedError = CheckStylePlugin.processError(
                    "An error occurred during a file scan.", e);

            if (processedError != null) {
                LOG.error("An error occurred while scanning a file.", processedError);

                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        final CheckStyleToolWindowPanel toolWindowPanel = toolWindowPanel();
                        if (toolWindowPanel != null) {
                            toolWindowPanel.displayErrorResult(processedError);
                        }
                        markThreadComplete();
                    }
                });
            }
View Full Code Here

TOP

Related Classes of org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.