示例#1
0
        public static bool NavigateToTextView(IServiceContainer services, IVsTextView vsTextView, int start, int length)
        {
            var adapterService = ComponentLocator <IVsEditorAdaptersFactoryService> .Import(services.GetService <ICompositionService>());

            var textView = adapterService?.GetWpfTextView(vsTextView);

            return(textView != null && NavigateToTextView(services, textView, start, length));
        }
示例#2
0
        public static bool NavigateToTextView(IVsTextView vsTextView, int start, int length)
        {
            var adapterService = ComponentLocator <IVsEditorAdaptersFactoryService> .Import(VsAppShell.Current.GetService <ICompositionService>());

            if (adapterService != null)
            {
                var textView = adapterService.GetWpfTextView(vsTextView);
                if (textView != null)
                {
                    return(NavigateToTextView(textView, start, length));
                }
            }

            return(false);
        }
示例#3
0
        public static bool NavigateToTextView(IVsTextView vsTextView, int start, int length)
        {
            IVsEditorAdaptersFactoryService adapterService = ComponentLocator <IVsEditorAdaptersFactoryService> .Import();

            if (adapterService != null)
            {
                ITextView textView = adapterService.GetWpfTextView(vsTextView);

                if (textView != null)
                {
                    return(NavigateToTextView(textView, start, length));
                }
            }

            return(false);
        }
示例#4
0
        internal static void StaticFlushTaskList()
        {
            IEditorTaskList tasks = ComponentLocator <IEditorTaskList> .Import();

            tasks.FlushTaskList();
        }
示例#5
0
        internal static void StaticFlushTaskList()
        {
            IEditorTaskList tasks = ComponentLocator <IEditorTaskList> .Import(VsAppShell.Current.CompositionService);

            tasks.FlushTaskList();
        }