Exemplo n.º 1
0
        public bool Register(EnvDTE.DTE dte, GanjiContext context)
        {
            // Register events for running document table.
            m_RDT = (IVsRunningDocumentTable)Package.GetGlobalService(typeof(SVsRunningDocumentTable));
            m_RDT.AdviseRunningDocTableEvents(this, out m_rdtCookie);

            provider = new GitProviderLibGit2Sharp();
            provider.ContextRepository = context.RepositoryPath;
            provider.SolutionBaseDirectory = context.SolutionPath;
            provider.Open(context.RepositoryPath);

            // I: test if this table is from multiple instances routed here...
            return true;
        }
Exemplo n.º 2
0
        public bool Register(EnvDTE.DTE dte, GanjiContext context)
        {
            table = (IVsRunningDocumentTable)Package.GetGlobalService(typeof(SVsRunningDocumentTable));
            // Listen to show/hide events of docs to register activate/deactivate cursor listeners.
            table.AdviseRunningDocTableEvents(this, out m_rdtCookie);
            // In turn, cursor events will register a IVsTextViewEvents indexed by the IVsTextView.

            provider = new GitProviderLibGit2Sharp();
            provider.ContextRepository = context.RepositoryPath;
            provider.SolutionBaseDirectory = context.SolutionPath;
            provider.Open(context.RepositoryPath);

            // Mixing in Find events with click events.
            m_dte = dte;
            m_findEvents = dte.Events.FindEvents;
            m_findEvents.FindDone += new EnvDTE._dispFindEvents_FindDoneEventHandler(m_findEvents_FindDone);

            return true;
        }