void (final String fileName, final String s) { XmlFile xmlFile = (XmlFile)getContentDirectory().findFile(fileName); VirtualFile virtualFile = xmlFile.getVirtualFile(); final StructureViewBuilder structureViewBuilder = StructureViewBuilder.PROVIDER.getStructureViewBuilder(virtualFile.getFileType(), virtualFile, myProject); StructureViewModel viewModel = ((TreeBasedStructureViewBuilder)structureViewBuilder).createStructureViewModel(null); try { AbstractTreeStructure structure = new SmartTreeStructure(myProject, viewModel); checkNavigatability(structure.getRootElement()); ProjectViewTestUtil.assertStructureEqual(structure, s, null); } finally { Disposer.dispose(viewModel); } }