void (int offset, @NotNull PsiFile regExpFile) { final RegExpGroup group = findCapturingGroupAtOffset(regExpFile, offset); final HighlightManager highlightManager = HighlightManager.getInstance(regExpFile.getProject()); removeHighlights(highlightManager); if (group != null) { final int index = SyntaxTraverser.psiTraverser(regExpFile).filter(RegExpGroup.class).indexOf(e -> e == group) + 1; highlightRegExpGroup(group, highlightManager); highlightMatchGroup(highlightManager, getMatches(regExpFile), index); } else { highlightMatchGroup(highlightManager, getMatches(regExpFile), 0); } }