Search in sources :

Example 1 with PackageViewPane

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);
}
Also used : AbstractProjectTreeStructure(com.intellij.ide.projectView.impl.AbstractProjectTreeStructure) ResourceBundleGrouper(com.intellij.lang.properties.projectView.ResourceBundleGrouper) PackageViewPane(com.intellij.ide.projectView.impl.PackageViewPane) ProjectViewImpl(com.intellij.ide.projectView.impl.ProjectViewImpl)

Aggregations

AbstractProjectTreeStructure (com.intellij.ide.projectView.impl.AbstractProjectTreeStructure)1 PackageViewPane (com.intellij.ide.projectView.impl.PackageViewPane)1 ProjectViewImpl (com.intellij.ide.projectView.impl.ProjectViewImpl)1 ResourceBundleGrouper (com.intellij.lang.properties.projectView.ResourceBundleGrouper)1