[file-history] fix regression: sort old history by author or message

Broken in 6c160fd223, where VcsColumnInfo was dropped.
IDEA-183047
This commit is contained in:
Julia Beliaeva
2017-12-01 19:18:35 +03:00
parent 38fea88a97
commit 0c8b87bcea
@@ -648,7 +648,8 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton impleme
@Override
public TableCellRenderer getCustomizedRenderer(TreeNodeOnVcsRevision revision, @Nullable TableCellRenderer renderer) {
if (renderer instanceof BaseHistoryCellRenderer) {
((BaseHistoryCellRenderer)renderer).setCurrentRevision(myHistorySession.isCurrentRevision(revision.getRevision().getRevisionNumber()));
((BaseHistoryCellRenderer)renderer)
.setCurrentRevision(myHistorySession.isCurrentRevision(revision.getRevision().getRevisionNumber()));
}
return renderer;
}
@@ -821,6 +822,12 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton impleme
public String getPreferredStringValue() {
return StringUtil.repeatSymbol('m', 14);
}
@Nullable
@Override
public Comparator<VcsFileRevision> getComparator() {
return comparing(revision -> valueOf(revision));
}
}
public static class MessageColumnInfo extends ColumnInfo<VcsFileRevision, String> {
@@ -867,6 +874,12 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton impleme
public TableCellRenderer getRenderer(VcsFileRevision revision) {
return myRenderer;
}
@Nullable
@Override
public Comparator<VcsFileRevision> getComparator() {
return comparing(revision -> valueOf(revision));
}
}
private static class LoadedContentRevision implements ByteBackedContentRevision {