MinusculeMatcher (@NotNull FindSymbolParameters parameters) { String namePattern = StringUtil.getShortName(parameters.getCompletePattern()); boolean hasDollar = namePattern.contains("$"); if (hasDollar) { Matcher matcher = ChooseByNamePopup.patternToDetectAnonymousClasses.matcher(namePattern); if (matcher.matches()) { namePattern = matcher.group(1); hasDollar = namePattern.contains("$"); } } return hasDollar ? NameUtil.buildMatcher("*" + namePattern).build() : null; }