VcsTreeModelData (VcsLogChangesBrowser changesBrowser) { boolean hasSelection = changesBrowser.getViewer().getSelectionModel().getSelectionCount() != 0; return hasSelection ? VcsTreeModelData.selected(changesBrowser.getViewer()) : VcsTreeModelData.all(changesBrowser.getViewer()); }