private void addVersionedComment(final Project project) {
if (editor == null || filePath == null) return;
final CommentForm commentForm = new CommentForm(project, editor, filePath, commentSide, commentToEdit);
final JBPopup balloon = commentBalloonBuilder.getNewCommentBalloon(commentForm, "Comment");
balloon.addListener(new JBPopupAdapter() {
@Override
public void onClosed(LightweightWindowEvent event) {
DraftInput comment = commentForm.getComment();
if (comment != null) {
handleComment(comment, project);