void () { ID<?, ?> myId = ID.create("my.id"); try { FileBasedIndex.getInstance().getContainingFiles((ID<Object, Object>)myId, "null", GlobalSearchScope.allScope(getProject())); FileBasedIndex.getInstance().processAllKeys((ID<Object, ?>)myId, CommonProcessors.alwaysTrue(), getProject()); fail(); } catch (IllegalStateException ignored) { } }