void (int offset) { if (!myPsiFile.isValid()) return; if (myEditor.getFoldingModel().isOffsetCollapsed(offset)) return; if (myEditor.getDocument().getTextLength() <= offset) return; HighlighterIterator iterator = getEditorHighlighter().createIterator(offset); CharSequence chars = myDocument.getCharsSequence(); FileType fileType = getFileTypeByOffset(offset); if (!(BraceMatchingUtil.isStructuralBraceToken(fileType, iterator, chars) && (BraceMatchingUtil.isRBraceToken(iterator, chars, fileType) || BraceMatchingUtil.isLBraceToken(iterator, chars, fileType))) && BraceMatchingUtil.findStructuralLeftBrace(fileType, iterator, chars)) { highlightLeftBrace(iterator, true, fileType); } }