void (@Nullable PsiElement element, ArrayList<PsiNamedElement> defintions) { if (element == null) return; for (PsiElement child : element.getChildren()) { if (child instanceof GrVariable && !(child instanceof GrParameter)) { defintions.add((GrVariable) child); } if (!(child instanceof GrClosableBlock)) { collectInnerDefinitions(child, defintions); } } }