private static int findOpeningBrace(GrCodeBlock block) {
    PsiElement lbrace = block.getLBrace();
    if (lbrace == null) return block.getTextRange().getStartOffset();

    while (PsiImplUtil.isWhiteSpaceOrNls(lbrace.getNextSibling())) {
      lbrace = lbrace.getNextSibling();
    }
    return lbrace.getTextRange().getEndOffset();
  }
private static int findOpeningBrace(GrCodeBlock block)