use of com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane in project intellij-community by JetBrains.
the class FormMergerTreeStructureProviderTest method testStandardProviders.
public void testStandardProviders() {
final AbstractProjectViewPSIPane pane = myStructure.createPane();
getProjectTreeStructure().setProviders(new ClassesTreeStructureProvider(myProject), new FormMergerTreeStructureProvider(myProject));
assertStructureEqual(getPackageDirectory(), "PsiDirectory: package1\n" + " PsiClass:Class1\n" + " PsiJavaFile:Class2.java\n" + " PsiClass:Class2\n" + " PsiClass:Class3\n" + " PsiJavaFile:Class4.java\n" + " PsiFile(plain text):Form2.form\n" + " Form:Form1\n" + " PsiClass:Form1\n" + " PsiFile(plain text):Form1.form\n");
PsiClass psiClass = ((PsiJavaFile) getPackageDirectory().findFile("Form1.java")).getClasses()[0];
myStructure.checkNavigateFromSourceBehaviour(psiClass, psiClass.getContainingFile().getVirtualFile(), pane);
}
use of com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane in project intellij-community by JetBrains.
the class PropertiesProjectViewTest method testSortByType.
public void testSortByType() {
myFixture.copyDirectoryToProject(getTestName(true), getTestName(true));
AbstractProjectViewPSIPane pane = setupPane(true);
String structure = "-Project\n" + " -PsiDirectory: src\n" + " -PsiDirectory: sortByType\n" + " a.properties\n" + " xxx2.properties\n" + " yyy.properties\n" + " -Resource Bundle 'xxx'\n" + " xxx.properties\n" + " xxx_en.properties\n" + " X.txt\n" + " External Libraries\n";
PlatformTestUtil.assertTreeEqual(pane.getTree(), structure);
pane = setupPane(false);
structure = "-Project\n" + " -PsiDirectory: src\n" + " -PsiDirectory: sortByType\n" + " a.properties\n" + " X.txt\n" + " -Resource Bundle 'xxx'\n" + " xxx.properties\n" + " xxx_en.properties\n" + " xxx2.properties\n" + " yyy.properties\n" + " External Libraries\n";
PlatformTestUtil.assertTreeEqual(pane.getTree(), structure);
}
use of com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane 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;
}
use of com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane in project intellij-community by JetBrains.
the class PropertiesProjectViewTest method testBundle.
public void testBundle() {
myFixture.copyDirectoryToProject(getTestName(true), getTestName(true));
final AbstractProjectViewPSIPane pane = setupPane(true);
String structure = "-Project\n" + " -PsiDirectory: src\n" + " -PsiDirectory: bundle\n" + " yyy.properties\n" + " -Resource Bundle 'xxx'\n" + " xxx.properties\n" + " xxx_en.properties\n" + " xxx_ru_RU.properties\n" + " X.txt\n" + " External Libraries\n";
PlatformTestUtil.assertTreeEqual(pane.getTree(), structure);
}
use of com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane in project intellij-community by JetBrains.
the class PropertiesProjectViewTest method testStandAlone.
public void testStandAlone() {
myFixture.copyDirectoryToProject(getTestName(true), getTestName(true));
final AbstractProjectViewPSIPane pane = setupPane(true);
String structure = "-Project\n" + " -PsiDirectory: src\n" + " -PsiDirectory: standAlone\n" + " a.properties\n" + " xxx.properties\n" + " xxx2.properties\n" + " yyy.properties\n" + " X.txt\n" + " External Libraries\n";
PlatformTestUtil.assertTreeEqual(pane.getTree(), structure);
}
Aggregations