PsiJavaFile (String text) { configureFromFileText("dummy.java", text); assertTrue(getFile() instanceof PsiJavaFile); DaemonRespondToChangesTest.makeWholeEditorWindowVisible((EditorImpl)getEditor()); UIUtil.markAsFocused(getEditor().getContentComponent(), true); // to make ShowIntentionPass call its collectInformation() return (PsiJavaFile)getFile(); }