@Override
 protected CommentPreviewPagerAdapter createAdapter() {
   CommentPreviewPagerAdapter commentPreviewPagerAdapter =
       new CommentPreviewPagerAdapter(this, repositoryId);
   commentPreviewPagerAdapter.setCommentText(comment != null ? comment.getBody() : null);
   return commentPreviewPagerAdapter;
 }
  @NbBundle.Messages({
    "GitHubIssueController.edit.comment.title=Edit Comment",
    "GitHubIssueController.edit.comment.fail=Can't edit this comment."
  })
  private void editComment() {
    final Comment comment = getPanel().getEditedComment();
    final String editedBody =
        CommentTabbedPanel.showDialog(
            Bundle.GitHubIssueController_edit_comment_title(), comment.getBody());
    if (editedBody != null) {
      final GitHubIssue issue = getPanel().getIssue();
      if (issue != null) {
        RequestProcessor rp = GitHubIssues.getInstance().getRequestProcessor();
        rp.post(
            new Runnable() {

              @Override
              public void run() {
                Comment editedComment = issue.editComment(comment, editedBody);
                if (editedComment == null) {
                  UiUtils.showErrorDialog(Bundle.GitHubIssueController_edit_comment_fail());
                  return;
                }
                SwingUtilities.invokeLater(
                    new Runnable() {

                      @Override
                      public void run() {
                        getPanel().loadComments();
                      }
                    });
              }
            });
      }
    }
  }