boolean (@NotNull PsiFile file, @NotNull Editor editor, int lBraceOffset, int rBraceOffset) { PsiDocumentManager.getInstance(file.getProject()).commitDocument(editor.getDocument()); if (file.findElementAt(lBraceOffset) == file.findElementAt(rBraceOffset)) { return true; } return false; }