void (final String qClassName) { final PsiClass aClass = myJavaFacade.findClass(qClassName, GlobalSearchScope.allScope(getProject())); assertNotNull("Class " + qClassName + " not found", aClass); configureByExistingFile(aClass.getContainingFile().getVirtualFile()); if (myEditor.getCaretModel().getOffset() == 0) { myEditor.getCaretModel().moveToOffset(aClass.getTextOffset()); } performAction(); }