static void ExtractMetaToCache(
                IncomingChangeCategory category,
                Dictionary <string, IncomingChangeInfo> cache)
            {
                List <IncomingChangeInfo> changes = category.GetChanges();

                HashSet <string> indexedKeys = BuildIndexedKeys(
                    changes);

                for (int i = changes.Count - 1; i >= 0; i--)
                {
                    IncomingChangeInfo currentChange = changes[i];

                    string path = currentChange.GetPath();

                    if (!MetaPath.IsMetaPath(path))
                    {
                        continue;
                    }

                    string realPath = MetaPath.GetPathFromMetaPath(path);

                    if (!indexedKeys.Contains(BuildKey.BuildCacheKey(
                                                  currentChange.CategoryType, realPath)))
                    {
                        continue;
                    }

                    // found foo.c and foo.c.meta - move .meta to cache
                    cache.Add(BuildKey.ForChange(currentChange), currentChange);
                    changes.RemoveAt(i);
                }
            }
        static GUIStyle GetCategoryStyle(
            IncomingChangeCategory category,
            int solvedConflictsCount,
            bool isSelected)
        {
            if (isSelected)
            {
                return(UnityStyles.Tree.Label);
            }

            if (category.CategoryType != IncomingChangeCategory.Type.Conflicted)
            {
                return(UnityStyles.Tree.Label);
            }

            return(category.GetChildrenCount() > solvedConflictsCount ?
                   UnityStyles.Tree.RedLabel : UnityStyles.Tree.GreenLabel);
        }
 internal ChangeCategoryTreeViewItem(int id, IncomingChangeCategory category)
     : base(id, 0)
 {
     Category = category;
 }