コード例 #1
0
        public static bool Show(VersionControlItemList items, bool test)
        {
            if (test)
            {
                return(items.All(CanShow));
            }

            foreach (var item in items)
            {
                Document document = null;
                if (!item.IsDirectory)
                {
                    document = IdeApp.Workbench.OpenDocument(item.Path, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);
                }

                if (document != null)
                {
                    document.Window.SwitchView(document.Window.FindView <ILogView> ());
                }
                else
                {
                    VersionControlDocumentInfo info = new VersionControlDocumentInfo(null, item, item.Repository);
                    LogView logView = new LogView(info);
                    info.Document = IdeApp.Workbench.OpenDocument(logView, true).PrimaryView;
                    logView.Selected();
                }
            }

            return(true);
        }