boolean (final Editor editor, final PsiFile file) { if (!(file instanceof PsiJavaFile) && !(file instanceof PsiCodeFragment)) { return false; } return OverrideImplementUtil.getContextClass(file.getProject(), editor, file, true) != null; }