static void ClientDiffTreeViewItemGUI( Rect rowRect, float rowHeight, UnityDiffTree diffTree, ClientDiffTreeViewItem item, bool isSelected, bool isFocused) { string label = ClientDiffView.GetColumnText( item.Difference.DiffWithMount.Mount.RepSpec, item.Difference.DiffWithMount.Difference, PlasticLocalization.GetString(PlasticLocalization.Name.PathColumn)); if (diffTree.HasMeta(item.Difference)) { label = string.Concat(label, UnityConstants.TREEVIEW_META_LABEL); } Texture icon = GetClientDiffIcon( item.Difference.DiffWithMount.Difference.IsDirectory, label); DrawTreeViewItem.ForItemCell( rowRect, rowHeight, item.depth, icon, null, label, isSelected, isFocused, false); }
static void RegenerateRows( UnityDiffTree diffTree, TreeViewItemIds <IDiffCategory, ITreeViewNode> treeViewItemIds, TreeView treeView, TreeViewItem rootItem, List <TreeViewItem> rows, bool expandCategories) { ClearRows(rootItem, rows); List <IDiffCategory> categories = diffTree.GetNodes(); if (categories == null) { return; } foreach (IDiffCategory category in categories) { if (category is MergeCategory) { AddMergeCategory( rootItem, category, rows, treeViewItemIds, treeView, expandCategories); } if (category is ChangeCategory) { AddChangeCategory( rootItem, category, rows, treeViewItemIds, treeView, expandCategories); } } if (!expandCategories) { return; } treeView.state.expandedIDs = treeViewItemIds.GetCategoryIds(); }
internal void ClearModel() { mTreeViewItemIds.Clear(); mDiffTree = new UnityDiffTree(); }