File size: 772 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Collections.Generic;

using PlasticGui.WorkspaceWindow.Diff;

namespace Unity.PlasticSCM.Editor.Views.Diff
{
    internal static class DiffSelection
    {
        internal static List<ClientDiffInfo> GetSelectedDiffs(
            DiffTreeView treeView)
        {
            return treeView.GetSelectedDiffs(true);
        }

        internal static List<ClientDiffInfo> GetSelectedDiffsWithoutMeta(
            DiffTreeView treeView)
        {
            return treeView.GetSelectedDiffs(false);
        }

        internal static ClientDiffInfo GetSelectedDiff(
            DiffTreeView treeView)
        {
            if (!treeView.HasSelection())
                return null;

            return treeView.GetSelectedDiffs(false)[0];
        }
    }
}