private ContextMenuDiffToolInfo GetContextMenuDiffToolInfo() { bool firstIsParent = _gitRevisionTester.AllFirstAreParentsToSelected(DiffFiles.SelectedItemParents, DiffFiles.Revision); bool localExists = _gitRevisionTester.AnyLocalFileExists(DiffFiles.SelectedItemsWithParent.Select(i => i.Item)); IEnumerable <string> selectedItemParentRevs = DiffFiles.SelectedItemParents.Select(i => i.Guid); bool allAreNew = DiffFiles.SelectedItemsWithParent.All(i => i.Item.IsNew); bool allAreDeleted = DiffFiles.SelectedItemsWithParent.All(i => i.Item.IsDeleted); return(new ContextMenuDiffToolInfo( DiffFiles.Revision, selectedItemParentRevs, allAreNew: allAreNew, allAreDeleted: allAreDeleted, firstIsParent: firstIsParent, firstParentsValid: _revisionGrid.IsFirstParentValid(), localExists: localExists)); }