Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        void HandleDocumentOpened(object sender, Ide.Gui.DocumentEventArgs e)
        {
            if (!e.Document.IsFile || e.Document.Project == null)
            {
                return;
            }

            var repo = VersionControlService.GetRepository(e.Document.Project);

            if (repo == null || !repo.GetVersionInfo(e.Document.FileName).IsVersioned)
            {
                return;
            }

            var item = new VersionControlItem(repo, e.Document.Project, e.Document.FileName, false, null);

            TryAttachView <IDiffView> (e.Document, item, DiffCommand.DiffViewHandlers);
            TryAttachView <IBlameView> (e.Document, item, BlameCommand.BlameViewHandlers);
            TryAttachView <ILogView> (e.Document, item, LogCommand.LogViewHandlers);
            TryAttachView <IMergeView> (e.Document, item, MergeCommand.MergeViewHandlers);
        }
 void HandleDocumentOpened(object sender, Ide.Gui.DocumentEventArgs e)
 {
     AttachViewContents(e.Document);
 }