use of com.intellij.lang.properties.projectView.ResourceBundleGrouper 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);
}
use of com.intellij.lang.properties.projectView.ResourceBundleGrouper in project intellij-community by JetBrains.
the class PropertiesProjectViewTest method setupPane.
private AbstractProjectViewPSIPane setupPane(final boolean sortByType) {
myStructure.setProviders(new ResourceBundleGrouper(getProject()));
final AbstractProjectViewPSIPane pane = myStructure.createPane();
pane.getTreeBuilder().setNodeDescriptorComparator(new GroupByTypeComparator(sortByType));
// there should be xxx.properties in all test data
PsiFile psiFile = getPsiManager().findFile(myFixture.findFileInTempDir(getTestName(true) + "/xxx.properties"));
assert psiFile != null;
pane.select(psiFile, psiFile.getVirtualFile(), sortByType);
return pane;
}
Aggregations