use of com.intellij.ide.projectView.impl.PackageViewPane in project intellij-community by JetBrains.
the class PackagesTreeStructureTest method doTest.
private void doTest(final boolean showModules, final boolean showLibraryContents, boolean flattenPackages, boolean abbreviatePackageNames, @NonNls final String expected, final int levels) throws InterruptedException {
final ProjectViewImpl projectView = (ProjectViewImpl) ProjectView.getInstance(myProject);
projectView.setShowModules(showModules, PackageViewPane.ID);
projectView.setShowLibraryContents(showLibraryContents, PackageViewPane.ID);
projectView.setFlattenPackages(flattenPackages, PackageViewPane.ID);
projectView.setAbbreviatePackageNames(abbreviatePackageNames, PackageViewPane.ID);
projectView.setHideEmptyPackages(true, PackageViewPane.ID);
PackageViewPane packageViewPane = new PackageViewPane(myProject);
packageViewPane.createComponent();
((AbstractProjectTreeStructure) packageViewPane.getTreeStructure()).setProviders(new ResourceBundleGrouper(myProject));
packageViewPane.updateFromRoot(true);
JTree tree = packageViewPane.getTree();
TreeUtil.expand(tree, levels);
PlatformTestUtil.assertTreeEqual(tree, expected);
BaseProjectViewTestCase.checkContainsMethod(packageViewPane.getTreeStructure().getRootElement(), packageViewPane.getTreeStructure());
Disposer.dispose(packageViewPane);
}
Aggregations