void () { getProjectTreeStructure().setProviders(new ClassesTreeStructureProvider(myProject)); final AbstractProjectViewPane pane = myStructure.createPane(); final JTree tree = pane.getTree(); AbstractTreeBuilder builder = pane.getTreeBuilder(); if (builder != null) builder.setPassthroughMode(false); myStructure.setShowMembers(true); PsiJavaFile classFile = (PsiJavaFile)getContentDirectory().findSubdirectory("src").findSubdirectory("com").findSubdirectory("package1").findFile("Class1.java"); PsiClass aClass = classFile.getClasses()[0]; PsiFile containingFile = aClass.getContainingFile(); PsiDirectory directory = containingFile.getContainingDirectory(); pane.select(aClass, containingFile.getVirtualFile(), true); PlatformTestUtil.waitWhileBusy(tree); Point viewPosition = ((JViewport)tree.getParent()).getViewPosition(); for (int i=0;i<100;i++) { JavaDirectoryService.getInstance().createClass(directory, "A" + i); } PlatformTestUtil.waitWhileBusy(pane.getTree()); Point viewPositionAfter = ((JViewport)tree.getParent()).getViewPosition(); assertEquals(viewPosition, viewPositionAfter); }