private void changeSelected(ChangeInfo changeInfo, final Project project) {
    final GerritSettings settings = GerritSettings.getInstance();
    final ChangeInfo changeDetails =
        GerritUtil.getChangeDetails(
            GerritApiUtil.getApiUrl(),
            settings.getLogin(),
            settings.getPassword(),
            changeInfo.getNumber());

    myDetailsPanel.setData(changeDetails);

    updateChangesBrowser(changeDetails, project);
  }
  private void handleComments(final DiffPanelImpl diffPanel, final String filePathString) {
    final FilePath filePath = new FilePathImpl(new File(filePathString), false);
    final String relativeFilePath =
        PathUtils.ensureSlashSeparators(getRelativeOrAbsolutePath(project, filePath.getPath()));

    addCommentAction(diffPanel, relativeFilePath, changeInfo);

    gerritUtil.getChangeDetails(
        changeInfo._number,
        project,
        new Consumer<ChangeInfo>() {
          @Override
          public void consume(ChangeInfo changeDetails) {
            gerritUtil.getComments(
                changeDetails.id,
                selectedRevisionId,
                project,
                true,
                true,
                new Consumer<Map<String, List<CommentInfo>>>() {
                  @Override
                  public void consume(Map<String, List<CommentInfo>> comments) {
                    List<CommentInfo> fileComments = comments.get(relativeFilePath);
                    if (fileComments != null) {
                      addCommentsGutter(
                          diffPanel.getEditor2(),
                          relativeFilePath,
                          selectedRevisionId,
                          Iterables.filter(fileComments, REVISION_COMMENT));
                      if (!baseRevision.isPresent()) {
                        addCommentsGutter(
                            diffPanel.getEditor1(),
                            relativeFilePath,
                            selectedRevisionId,
                            Iterables.filter(fileComments, Predicates.not(REVISION_COMMENT)));
                      }
                    }
                  }
                });

            if (baseRevision.isPresent()) {
              gerritUtil.getComments(
                  changeDetails.id,
                  baseRevision.get().getFirst(),
                  project,
                  true,
                  true,
                  new Consumer<Map<String, List<CommentInfo>>>() {
                    @Override
                    public void consume(Map<String, List<CommentInfo>> comments) {
                      List<CommentInfo> fileComments = comments.get(relativeFilePath);
                      if (fileComments != null) {
                        Collections.sort(fileComments, COMMENT_ORDERING);
                        addCommentsGutter(
                            diffPanel.getEditor1(),
                            relativeFilePath,
                            baseRevision.get().getFirst(),
                            Iterables.filter(fileComments, REVISION_COMMENT));
                      }
                    }
                  });
            }

            gerritUtil.setReviewed(changeDetails.id, selectedRevisionId, relativeFilePath, project);
          }
        });
  }