use of com.intellij.packageDependencies.ui.DependenciesPanel in project intellij-community by JetBrains.
the class DependenciesPanelTest method doTestDependenciesTrees.
private void doTestDependenciesTrees(AnalysisScope scope, String expectedLeftTree, String expectedRightTree) {
DependenciesBuilder builder = new ForwardDependenciesBuilder(myProject, scope);
builder.analyze();
DependenciesPanel dependenciesPanel = new DependenciesPanel(myProject, builder);
try {
JTree leftTree = dependenciesPanel.getLeftTree();
TreeUtil.expandAll(leftTree);
PlatformTestUtil.assertTreeEqual(leftTree, expectedLeftTree, true);
JTree rightTree = dependenciesPanel.getRightTree();
TreeUtil.expandAll(rightTree);
PlatformTestUtil.assertTreeEqual(rightTree, expectedRightTree, true);
} finally {
Disposer.dispose(dependenciesPanel);
}
}
use of com.intellij.packageDependencies.ui.DependenciesPanel in project intellij-community by JetBrains.
the class DependenciesHandlerBase method onSuccess.
private void onSuccess(final List<DependenciesBuilder> builders) {
//noinspection SSBasedInspection
SwingUtilities.invokeLater(() -> {
if (shouldShowDependenciesPanel(builders)) {
final String displayName = getPanelDisplayName(builders);
DependenciesPanel panel = new DependenciesPanel(myProject, builders, myExcluded);
Content content = ContentFactory.SERVICE.getInstance().createContent(panel, displayName, false);
content.setDisposer(panel);
panel.setContent(content);
DependenciesToolWindow.getInstance(myProject).addContent(content);
}
});
}
Aggregations