示例#1
0
        private EditFilter(
            IVsTextView vsTextView,
            ITextView textView,
            IEditorOperations editorOps,
            IServiceProvider serviceProvider,
            IComponentModel model,
            IOleCommandTarget next
            )
        {
            _vsTextView          = vsTextView;
            _textView            = textView;
            _editorOps           = editorOps;
            _serviceProvider     = serviceProvider;
            _componentModel      = model;
            _pyService           = _serviceProvider.GetPythonToolsService();
            _entryService        = _componentModel.GetService <AnalysisEntryService>();
            _undoManagerProvider = _componentModel.GetService <ITextBufferUndoManagerProvider>();
            _next = next;

            BraceMatcher.WatchBraceHighlights(textView, _componentModel);

            if (_next == null)
            {
                ErrorHandler.ThrowOnFailure(vsTextView.AddCommandFilter(this, out _next));
            }
        }
示例#2
0
        public void VsTextViewCreated(VisualStudio.TextManager.Interop.IVsTextView textViewAdapter)
        {
            ITextView textView = AdapterService.GetWpfTextView(textViewAdapter);

            if (textView != null)
            {
                BraceMatcher.WatchBraceHighlights(textView, IronRubyToolsPackage.ComponentModel);
            }
        }
示例#3
0
文件: EditFilter.cs 项目: krus/PTVS
        public EditFilter(ITextView textView, IEditorOperations editorOps, IServiceProvider serviceProvider) {
            _textView = textView;
            _textView.Properties[typeof(EditFilter)] = this;
            _editorOps = editorOps;
            _serviceProvider = serviceProvider;
            _componentModel = _serviceProvider.GetComponentModel();
            _pyService = _serviceProvider.GetPythonToolsService();

            BraceMatcher.WatchBraceHighlights(textView, _componentModel);
        }
示例#4
0
        public EditFilter(ITextView textView, IEditorOperations editorOps, System.IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
            _textView        = textView;
            _editorOps       = editorOps;

            Genero4glClassifier classifier;

            if (_textView.TextBuffer.Properties.TryGetProperty(typeof(Genero4glClassifier), out classifier))
            {
                _functionProvider    = classifier.Provider._PublicFunctionProvider;
                _databaseProvider    = classifier.Provider._DatabaseInfoProvider;
                _programFileProvider = classifier.Provider._ProgramFileProvider;
            }

            BraceMatcher.WatchBraceHighlights(textView, VSGeneroPackage.ComponentModel);
        }
示例#5
0
        private EditFilter(
            PythonEditorServices editorServices,
            IVsTextView vsTextView,
            ITextView textView,
            IOleCommandTarget next
            )
        {
            _editorServices = editorServices;
            _vsTextView     = vsTextView;
            _textView       = textView;
            _next           = next;

            BraceMatcher.WatchBraceHighlights(_editorServices, textView);

            if (_next == null)
            {
                ErrorHandler.ThrowOnFailure(vsTextView.AddCommandFilter(this, out _next));
            }
        }