@Override
  public void positionCaret(@NotNull Editor editor, boolean toEditMethodBody) {
    final T firstMember = getPsiMember();
    LOG.assertTrue(firstMember != null);

    if (toEditMethodBody) {
      GrMethod method = (GrMethod)firstMember;
      GrOpenBlock body = method.getBlock();
      if (body != null) {
        PsiElement l = body.getLBrace();
        if (l != null) l = l.getNextSibling();
        while (PsiImplUtil.isWhiteSpaceOrNls(l)) l = l.getNextSibling();
        if (l == null) l = body;

        PsiElement r = body.getRBrace();
        if (r != null) r = r.getPrevSibling();
        while (PsiImplUtil.isWhiteSpaceOrNls(r)) r = r.getPrevSibling();
        if (r == null) r = body;

        int start = l.getTextRange().getStartOffset();
        int end = r.getTextRange().getEndOffset();

        editor.getCaretModel().moveToOffset(Math.min(start, end));
        editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
        if (start < end) {
          //Not an empty body
          editor.getSelectionModel().setSelection(start, end);
        }
        return;
      }
    }

    int offset;
    if (firstMember instanceof GrMethod method) {
      GrCodeBlock body = method.getBlock();
      if (body == null) {
        offset = method.getTextRange().getStartOffset();
      }
      else {
        offset = body.getLBrace().getTextRange().getEndOffset();
      }
    }
    else {
      offset = firstMember.getTextRange().getStartOffset();
    }

    editor.getCaretModel().moveToOffset(offset);
    editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
    editor.getSelectionModel().removeSelection();
  }
@Override
  public void positionCaret(@NotNull Editor editor, boolean toEditMethodBody)