MinusculeMatcher (final boolean caseSensitive) { String prefix = applyMiddleMatching(myPrefix); NameUtil.MatcherBuilder builder = NameUtil.buildMatcher(prefix); if (caseSensitive) { int setting = CodeInsightSettings.getInstance().getCompletionCaseSensitive(); if (setting == CodeInsightSettings.FIRST_LETTER) { builder = builder.withCaseSensitivity(NameUtil.MatchingCaseSensitivity.FIRST_LETTER); } else if (setting == CodeInsightSettings.ALL) { builder = builder.withCaseSensitivity(NameUtil.MatchingCaseSensitivity.ALL); } } if (myTypoTolerant) { builder = builder.typoTolerant(); } return builder.build(); }