Package org.sonar.ide.intellij.component

Examples of org.sonar.ide.intellij.component.SonarProjectComponent


        ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
        Content content = contentFactory.createContent(panel, "", false);
        toolWindow.getContentManager().addContent(content);

        SonarProjectComponent projectComponent = project.getComponent(SonarProjectComponent.class);
        ToolWindowModel toolWindowModel = new ToolWindowModel(project, violationTableModel, localTreeModel, projectComponent.getSonarCache());
        projectComponent.setToolWindowModel(toolWindowModel);
        LastInspectionResult.getInstance().addListener(new ViolatationChangedListener() {
            @Override
            public void violationChanged(Map<VirtualFile, List<Violation>> violations) {
                treeModel.setViolations(violations);
            }
        });
        violationsTree.addMouseListener(new TreeMousePressedListener(violationsTree, displayDescriptionAction));
        localViolationsTree.addMouseListener(new TreeMousePressedListener(localViolationsTree, localDisplayDescriptionAction));


        projectComponent.getSonarCache().addLoadingFileListener(this);
    }
View Full Code Here


        this.project = project;
    }

    @Override
    protected List<Rule> doInBackground() throws Exception {
        SonarProjectComponent component = project.getComponent(SonarProjectComponent.class);
        Sonar sonar = component.getSonar();
        return sonar.findAll(new RuleQuery("java"));
    }
View Full Code Here

        this.violation = violation;
    }

    @Override
    public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
        SonarProjectComponent component = project.getComponent(SonarProjectComponent.class);
        VirtualFile virtualFile = descriptor.getPsiElement().getContainingFile().getVirtualFile();
        component.getSonarCache().removeViolation(virtualFile, this.violation);
        component.getToolWindowModel().refreshViolationsTable(virtualFile);
    }
View Full Code Here

TOP

Related Classes of org.sonar.ide.intellij.component.SonarProjectComponent

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.