void () { JavaRecursiveElementWalkingVisitor visitor = new JavaRecursiveElementWalkingVisitor() { @Override public void visitReferenceElement(@NotNull PsiJavaCodeReferenceElement reference) { final PsiElement element = reference.resolve(); if (element instanceof PsiVariable variable) { PsiType type = variable.getType(); myParameters.annotateWithParameter(reference); if (myOutputParameters.contains(element)) { reference.putUserData(PARAMETER, new Parameter(variable, type)); } } PsiElement qualifier = reference.getQualifier(); if (qualifier != null) { qualifier.accept(this); } } }; for (final PsiElement patternComponent : myPattern) { patternComponent.accept(visitor); } }