use of com.google.gerrit.client.DiffWebLinkInfo in project gerrit by GerritCodeReview.
the class DiffInfo method filterWebLinks.
private List<WebLinkInfo> filterWebLinks(DiffView diffView) {
List<WebLinkInfo> filteredDiffWebLinks = new ArrayList<>();
List<DiffWebLinkInfo> allDiffWebLinks = Natives.asList(webLinks());
if (allDiffWebLinks != null) {
for (DiffWebLinkInfo webLink : allDiffWebLinks) {
if (diffView == DiffView.SIDE_BY_SIDE && webLink.showOnSideBySideDiffView()) {
filteredDiffWebLinks.add(webLink);
}
if (diffView == DiffView.UNIFIED_DIFF && webLink.showOnUnifiedDiffView()) {
filteredDiffWebLinks.add(webLink);
}
}
}
return filteredDiffWebLinks;
}
Aggregations