void (final String name, final MatchResult matchResult) { final boolean multiMatch = matchResult.isMultipleMatch() || matchResult.isScopeMatch(); if (matchResult.hasChildren() && multiMatch) { for (MatchResult r : matchResult.getChildren()) { fillElementToVariableNameMap(name, r); } } else if (!multiMatch) { final PsiElement match = matchResult.getMatch(); if (match != null) { elementToVariableNameMap.put(match, name); } } }