boolean (Object element, PsiElement scope) { if (!(element instanceof PsiElement)) return false; PsiElement currentChild = ((PsiElement)element).getFirstChild(); while (currentChild != null) { if (getFilter().isAcceptable(currentChild, ((PsiElement)element))) { return true; } currentChild = currentChild.getNextSibling(); } return false; }