예제 #1
0
        public IntelliSenseManager(ICompletionBroker broker,
                                   SVsServiceProvider provider,
                                   IOleCommandTarget commandHandler,
                                   ITextView textView,
                                   IntelliSenseEventsHandlerProxy callbackContext)
        {
            _triggerTag        = 0;
            _sw                = new Stopwatch();
            _broker            = broker;
            NextCommandHandler = commandHandler;
            _textView          = textView;
            _textView.Closed  += TextView_Closed;
            _serviceProvider   = provider;
            _callbackContext   = callbackContext;
            _callbackContext.CompletionListUpdated += IntelliSenseManager_CompletionListUpdated;
            _currentActiveWindowId = this.GetHashCode();

            _statusBar = (IVsStatusbar)PowerShellToolsPackage.Instance.GetService(typeof(SVsStatusbar));
        }
예제 #2
0
        /// <summary>
        /// Attaches events for invoking Statement completion
        /// </summary>
        public IntellisenseController(IntellisenseControllerProvider provider, ITextView textView, IntelliSenseEventsHandlerProxy callbackContext)
        {
            _textView = textView;
            _provider = provider;
            textView.Properties.AddProperty(typeof(IntellisenseController), this);  // added so our key processors can get back to us

            _intelliSenseManager = new IntelliSenseManager(provider.CompletionBroker, provider.ServiceProvider, null, textView, callbackContext);
        }