boolean () { if (myDescriptor == null) return false; if (myElement == null || !myElement.isValid()) return false; if (myDescriptor instanceof ProblemDescriptor) { final PsiElement psiElement = ((ProblemDescriptor)myDescriptor).getPsiElement(); return psiElement != null && psiElement.isValid(); } return true; }