@Override public boolean isClassAcceptable(Class elementClass) { if (myFilters.isEmpty()) return true; for (ElementFilter elementFilter : myFilters) { if (elementFilter.isClassAcceptable(elementClass)) { return true; } } return false; }
@Override public boolean isAcceptable(Object element, PsiElement context) { if (myFilters.isEmpty()) return true; for (ElementFilter elementFilter : myFilters) { if (elementFilter.isAcceptable(element, context)) { return true; } } return false; }
private static void _findChildrenElements( Collection<PsiElement> found, PsiElement element, ElementFilter filter) { for (PsiElement e : element.getChildren()) { if (filter.filter(e)) { found.add(e); } _findChildrenElements(found, e, filter); } }