use of com.google.gwtexpui.safehtml.client.SafeHtml 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);
}
}
use of com.google.gwtexpui.safehtml.client.SafeHtml in project gerrit by GerritCodeReview.
the class Unified method setLineNumber.
private void setLineNumber(DisplaySide side, int cmLine, Integer line, String styleName) {
SafeHtml html = SafeHtml.asis(line != null ? line.toString() : " ");
InlineHTML gutter = new InlineHTML(html);
diffTable.add(gutter);
gutter.setStyleName(styleName);
cm.setGutterMarker(cmLine, side == DisplaySide.A ? UnifiedTable.style.lineNumbersLeft() : UnifiedTable.style.lineNumbersRight(), gutter.getElement());
}
Aggregations