mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[file-history] use method references
This commit is contained in:
@@ -865,9 +865,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
|
||||
int selectionSize = sel.size();
|
||||
if (selectionSize > 1) {
|
||||
List<VcsFileRevision> selectedRevisions =
|
||||
ContainerUtil.sorted(ContainerUtil.map(sel, treeNode -> {
|
||||
return treeNode.getRevision();
|
||||
}), myRevisionsInOrderComparator);
|
||||
ContainerUtil.sorted(ContainerUtil.map(sel, TreeNodeOnVcsRevision::getRevision), myRevisionsInOrderComparator);
|
||||
VcsFileRevision olderRevision = selectedRevisions.get(0);
|
||||
VcsFileRevision newestRevision = selectedRevisions.get(sel.size() - 1);
|
||||
myDiffHandler.showDiffForTwo(e.getRequiredData(CommonDataKeys.PROJECT), myFilePath, olderRevision, newestRevision);
|
||||
@@ -950,7 +948,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
|
||||
final LocalHistoryAction action = startLocalHistoryAction(revision);
|
||||
final VirtualFile vp = getVirtualParent();
|
||||
if (vp != null) {
|
||||
refresh = () -> vp.refresh(false, true, () -> action.finish());
|
||||
refresh = () -> vp.refresh(false, true, action::finish);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user