void () { VirtualFile foo = myFixture.addFileToProject("src/main/a.java", "class Foo {}").getVirtualFile(); VirtualFile main = foo.getParent(); VirtualFile src = main.getParent(); GlobalSearchScope scope = GlobalSearchScope.allScope(getProject()); assertEquals(foo, assertOneElement(FilenameIndex.getVirtualFilesByName("a.java", scope))); assertEquals(main, assertOneElement(FilenameIndex.getVirtualFilesByName("main", scope))); assertEquals(src, assertOneElement(FilenameIndex.getVirtualFilesByName("src", scope))); // content-less indexes has been passed // now all directories are indexed IndexingRequestToken indexingRequest = getProject().getService(ProjectIndexingDependenciesService.class).getLatestIndexingRequestToken(); assertFalse(IndexingFlag.isFileIndexed(foo, indexingRequest.getFileIndexingStamp(foo))); assertIsIndexed(main); assertIsIndexed(src); assert findClass("Foo") != null;// ensure content dependent indexes are passed //assertIsIndexed(foo) // FIXME-ank: not indexed, because indexing changes file's modCounter }