@@ -0,0 +1,1775 @@
+package com.intellij.projectView;%0A%0Aimport com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane;%0Aimport com.intellij.ide.projectView.impl.ClassesTreeStructureProvider;%0Aimport com.intellij.ide.util.treeView.TreeState;%0Aimport com.intellij.testFramework.PlatformTestUtil;%0Aimport com.intellij.uiDesigner.projectView.FormMergerTreeStructureProvider;%0Aimport org.jdom.Element;%0A%0Aimport javax.swing.*;%0A%0Apublic class ProjectTreeStateTest extends BaseProjectViewTestCase %7B%0A  private String myExpectedTree;%0A%0A  public void testUpdateProjectView() %7B%0A    getProjectTreeStructure().setProviders(new ClassesTreeStructureProvider(myProject), new FormMergerTreeStructureProvider(myProject));%0A%0A    final AbstractProjectViewPSIPane pane = myStructure.createPane();%0A%0A    final JTree tree = pane.getTree();%0A    tree.expandRow(1);%0A    tree.expandRow(5);%0A    tree.expandRow(6);%0A    tree.expandRow(9);%0A    tree.expandRow(11);%0A    PlatformTestUtil.assertTreeEqual(pane.getTree(), myExpectedTree, true);%0A%0A    final TreeState treeState = TreeState.createOn(tree);%0A%0A    doTestState(treeState);%0A%0A    final Element stored = new Element(%22Root%22);%0A    treeState.writeExternal(stored);%0A%0A    TreeState readState = TreeState.createFrom(stored);%0A    doTestState(readState);%0A%0A  %7D%0A%0A  private void doTestState(final TreeState treeState) %7B%0A    final JTree tree2 = myStructure.createPane().getTree();%0A%0A%0A    treeState.applyTo(tree2);%0A%0A    PlatformTestUtil.waitWhileBusy(tree2);%0A    PlatformTestUtil.assertTreeEqual(tree2, myExpectedTree, true);%0A  %7D%0A%0A  @Override%0A  protected void setUp() throws Exception %7B%0A    super.setUp();%0A    myExpectedTree = %22-Project%5Cn%22 +%0A                     %22 +PsiDirectory: updateProjectView%5Cn%22 +%0A                     getRootFiles() +%0A                     %22 +External Libraries%5Cn%22;%0A  %7D%0A%7D%0A

move ProjectTreeStateTest into the community project