int (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(); }