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);
}