use of com.google.gerrit.client.info.AccountInfo in project gerrit by GerritCodeReview.
the class Reviewers method display.
private void display(ChangeInfo info) {
Map<ReviewerState, List<AccountInfo>> reviewers = info.reviewers();
Map<Integer, AccountInfo> r = byAccount(reviewers, ReviewerState.REVIEWER);
Map<Integer, AccountInfo> cc = byAccount(reviewers, ReviewerState.CC);
for (Integer i : r.keySet()) {
cc.remove(i);
}
cc.remove(info.owner()._accountId());
Set<Integer> removable = info.removableReviewerIds();
Map<Integer, VotableInfo> votable = votable(info);
SafeHtml rHtml = Labels.formatUserList(style, r.values(), removable, null, votable);
SafeHtml ccHtml = Labels.formatUserList(style, cc.values(), removable, null, votable);
reviewersText.setInnerSafeHtml(rHtml);
ccText.setInnerSafeHtml(ccHtml);
if (Gerrit.isSignedIn()) {
int currentUser = Gerrit.getUserAccount()._accountId();
boolean showAddMeButton = info.owner()._accountId() != currentUser && !cc.containsKey(currentUser) && !r.containsKey(currentUser);
addMe.setVisible(showAddMeButton);
}
}
Aggregations