Example #1
0
        public static async Task <bool> ResolveConflicts(VersionControlItemList list, bool test)
        {
            if (test)
            {
                return(list.All(s => (s.VersionInfo.Status & VersionStatus.Conflicted) == VersionStatus.Conflicted));
            }

            foreach (var item in list.Where(s => (s.VersionInfo.Status & VersionStatus.Conflicted) == VersionStatus.Conflicted))
            {
                var doc = await IdeApp.Workbench.OpenDocument(item.Path, item.ContainerProject, true);

                doc?.GetContent <VersionControlDocumentController> ()?.ShowMergeView();
            }
            return(true);
        }
        public static bool ResolveConflicts(VersionControlItemList list, bool test)
        {
            if (test)
            {
                return(list.All(s => (s.VersionInfo.Status & VersionStatus.Conflicted) == VersionStatus.Conflicted));
            }

            foreach (var item in list.Where(s => (s.VersionInfo.Status & VersionStatus.Conflicted) == VersionStatus.Conflicted))
            {
                Document doc = IdeApp.Workbench.OpenDocument(item.Path, item.ContainerProject, true);
                foreach (var view in doc.Views)
                {
                    if (view.GetContent <MergeView> () != null)
                    {
                        view.Select();
                    }
                }
            }
            return(true);
        }