void (int offset, @NotNull PsiFile regExpFile) { final HighlightManager highlightManager = HighlightManager.getInstance(regExpFile.getProject()); removeHighlights(highlightManager); final List<RegExpMatch> matches = getMatches(regExpFile); int index = indexOfGroupAtOffset(matches, offset); if (index > 0) { @Nullable RegExpGroup group = SyntaxTraverser.psiTraverser(regExpFile) .filter(RegExpGroup.class) .filter(RegExpGroup::isCapturing) .get(index - 1); highlightRegExpGroup(group, highlightManager); highlightMatchGroup(highlightManager, matches, index); } else { highlightMatchGroup(highlightManager, matches, 0); } }