class OverviewScreenPresenter {

    public void addComment() {
        final String commentText = view.getCommentText();

        if (isInvalidContent(commentText)) {
            view.setCommentInputError(ts.getTranslation(LibraryConstants.MissingCommentText));
        } else {
            changeRequestService.call(v -> {
                this.view.clearCommentInputError();
                this.view.clearCommentInputField();
            }).addComment(workspaceProject.getSpace().getName(),
                                workspaceProject.getRepository().getAlias(),
                                currentChangeRequestId,
                                commentText);
        }
    }

    @Inject public  OverviewScreenPresenter(final View view,
                                   final TranslationService ts,
                                   final ManagedInstance<CommentItemPresenter> commentItemPresenterInstances,
                                   final Caller<ChangeRequestService> changeRequestService,
                                   final LibraryPlaces libraryPlaces,
                                   final ChangeRequestUtils changeRequestUtils,
                                   final SessionInfo sessionInfo);

}