boolean (Object element, @Nullable PsiElement context) { // Do not suggest final/sealed library classes return !(element instanceof PsiClass) || !(element instanceof PsiCompiledElement) || !((PsiClass)element).hasModifierProperty(PsiModifier.FINAL) && !((PsiClass)element).hasModifierProperty(PsiModifier.SEALED); }