void (int offset, boolean isAdjustedPosition) { if (myEditor.getFoldingModel().isOffsetCollapsed(offset)) return; HighlighterIterator iterator = getEditorHighlighter().createIterator(offset); CharSequence chars = myDocument.getCharsSequence(); FileType fileType = getFileTypeByOffset(offset); if (BraceMatchingUtil.isLBraceToken(iterator, chars, fileType)) { highlightLeftBrace(iterator, false, fileType); if (offset > 0 && !isAdjustedPosition && !myEditor.getSettings().isBlockCursor()) { iterator = getEditorHighlighter().createIterator(offset - 1); if (BraceMatchingUtil.isRBraceToken(iterator, chars, fileType)) { highlightRightBrace(iterator, fileType); } } } else if (BraceMatchingUtil.isRBraceToken(iterator, chars, fileType)) { highlightRightBrace(iterator, fileType); } }