private static int getOffsetFromBraceMatcher(@NotNull Editor editor, @NotNull PsiFile file) {
      BraceHighlightingAndNavigationContext matchingContext = BraceMatchingUtil.computeHighlightingAndNavigationContext(editor, file);
      return matchingContext != null ? matchingContext.navigationOffset() : tryFindPreviousUnclosedOpeningBraceOffset(editor, file);
    }
private static int getOffsetFromBraceMatcher(@NotNull Editor editor, @NotNull PsiFile file)