Beispiel #1
0
 public static void Show(VersionControlItemList items)
 {
     foreach (VersionControlItem item in items)
     {
         var document = IdeApp.Workbench.OpenDocument(item.Path, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);
         DiffView.AttachViewContents(document, item);
         document.Window.SwitchView(document.Window.FindView(typeof(BlameView)));
     }
 }
Beispiel #2
0
 public static void Show(VersionControlItemList items)
 {
     foreach (VersionControlItem item in items)
     {
         var document = IdeApp.Workbench.OpenDocument(item.Path);
         DiffView.AttachViewContents(document, item);
         document.Window.SwitchView(5);
     }
 }
Beispiel #3
0
 public static void Show(VersionControlItemList items, Revision since)
 {
     foreach (VersionControlItem item in items)
     {
         if (!item.IsDirectory)
         {
             var document = IdeApp.Workbench.OpenDocument(item.Path);
             DiffView.AttachViewContents(document, item);
             document.Window.SwitchView(document.Window.FindView(typeof(LogView)));
         }
         else if (item.VersionInfo.CanLog)
         {
             new Worker(item.Repository, item.Path, item.IsDirectory, since).Start();
         }
     }
 }
Beispiel #4
0
        void HandleDocumentOpened(object sender, Ide.Gui.DocumentEventArgs e)
        {
            if (e.Document.Project == null)
            {
                return;
            }
            var repo = VersionControlService.GetRepository(e.Document.Project);

            if (repo == null)
            {
                return;
            }
            if (!e.Document.IsFile || !repo.GetVersionInfo(e.Document.FileName).IsVersioned)
            {
                return;
            }
            var item = new VersionControlItem(repo, e.Document.Project, e.Document.FileName, false, null);

            DiffView.AttachViewContents(e.Document, item);
        }