Ejemplo n.º 1
0
 public HlslKeyProcessor(ITextView textView, IIntellisenseSessionStackMapService intellisenseSessionStackMapService, CompletionModelManager completionModelManager, SignatureHelpManager signatureHelpManager)
 {
     _textView = textView;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
     _completionModelManager = completionModelManager;
     _signatureHelpManager = signatureHelpManager;
 }
Ejemplo n.º 2
0
        public InteractiveWindow(
            IInteractiveWindowEditorFactoryService host,
            IContentTypeRegistryService contentTypeRegistry,
            ITextBufferFactoryService bufferFactory,
            IProjectionBufferFactoryService projectionBufferFactory,
            IEditorOperationsFactoryService editorOperationsFactory,
            ITextEditorFactoryService editorFactory,
            IRtfBuilderService rtfBuilderService,
            IIntellisenseSessionStackMapService intellisenseSessionStackMap,
            ISmartIndentationService smartIndenterService,
            IInteractiveEvaluator evaluator)
        {
            if (evaluator == null)
            {
                throw new ArgumentNullException(nameof(evaluator));
            }

            _uiOnly = new UIThreadOnly(
                this,
                host,
                contentTypeRegistry,
                bufferFactory,
                projectionBufferFactory,
                editorOperationsFactory,
                editorFactory,
                rtfBuilderService,
                intellisenseSessionStackMap,
                smartIndenterService,
                evaluator);

            evaluator.CurrentWindow = this;

            RequiresUIThread();
        }
 public InteractiveWindowProvider(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService bufferFactory,
     IProjectionBufferFactoryService projectionBufferFactory,
     IEditorOperationsFactoryService editorOperationsFactory,
     ITextBufferUndoManagerProvider textBufferUndoManagerProvider,
     ITextEditorFactoryService editorFactory,
     IRtfBuilderService rtfBuilderService,
     IIntellisenseSessionStackMapService intellisenseSessionStackMap,
     ISmartIndentationService smartIndenterService,
     IInteractiveWindowEditorFactoryService windowFactoryService,
     IUIThreadOperationExecutor uiThreadOperationExecutor)
 {
     _contentTypeRegistry           = contentTypeRegistry;
     _bufferFactory                 = bufferFactory;
     _projectionBufferFactory       = projectionBufferFactory;
     _editorOperationsFactory       = editorOperationsFactory;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _editorFactory                 = editorFactory;
     _rtfBuilderService             = rtfBuilderService;
     _intellisenseSessionStackMap   = intellisenseSessionStackMap;
     _smartIndenterService          = smartIndenterService;
     _windowFactoryService          = windowFactoryService;
     _uiThreadOperationExecutor     = uiThreadOperationExecutor;
 }
Ejemplo n.º 4
0
        internal VimWordCompletionUtil(
            Lazy <IVimHost> vimHost,
            IAsyncCompletionBroker asyncCompletionBroker,
            ICompletionBroker completionBroker,
#if VS_SPECIFIC_2019
            IIntellisenseSessionStackMapService intellisenseSessionStackMapService,
            [Import(AllowDefault = true)] IVsEditorAdaptersFactoryService vsEditorAdapterFactoryService = null)
Ejemplo n.º 5
0
 public InteractiveWindowProvider(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService bufferFactory,
     IProjectionBufferFactoryService projectionBufferFactory,
     IEditorOperationsFactoryService editorOperationsFactory,
     ITextBufferUndoManagerProvider textBufferUndoManagerProvider,
     ITextEditorFactoryService editorFactory,
     IRtfBuilderService rtfBuilderService,
     IIntellisenseSessionStackMapService intellisenseSessionStackMap,
     ISmartIndentationService smartIndenterService,
     IInteractiveWindowEditorFactoryService windowFactoryService,
     IWaitIndicator waitIndicator)
 {
     _contentTypeRegistry = contentTypeRegistry;
     _bufferFactory = bufferFactory;
     _projectionBufferFactory = projectionBufferFactory;
     _editorOperationsFactory = editorOperationsFactory;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _editorFactory = editorFactory;
     _rtfBuilderService = rtfBuilderService;
     _intellisenseSessionStackMap = intellisenseSessionStackMap;
     _smartIndenterService = smartIndenterService;
     _windowFactoryService = windowFactoryService;
     _waitIndicator = waitIndicator;
 }
Ejemplo n.º 6
0
 internal VimWordCompletionUtil(
     Lazy <IVimHost> vimHost,
     ICompletionBroker completionBroker,
     IIntellisenseSessionStackMapService intellisenseSessionStackMapService)
     : base(vimHost)
 {
     _legacyFactory = new WordLegacyCompletionSessionFactory(completionBroker, intellisenseSessionStackMapService);
 }
Ejemplo n.º 7
0
 public NQueryKeyProcessor(ITextView textView, IIntellisenseSessionStackMapService intellisenseSessionStackMapService, ICompletionModelManager completionModelManager, ISignatureHelpManager signatureHelpManager, IHighlightingNavigationManager highlightingNavigationManager, ICodeActionGlyphBroker codeActionGlyphBroker, ICommentOperations commentOperations)
 {
     _textView = textView;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
     _completionModelManager             = completionModelManager;
     _signatureHelpManager          = signatureHelpManager;
     _highlightingNavigationManager = highlightingNavigationManager;
     _codeActionGlyphBroker         = codeActionGlyphBroker;
     _commentOperations             = commentOperations;
 }
Ejemplo n.º 8
0
 internal VimWordCompletionUtil(
     Lazy <IVimHost> vimHost,
     IAsyncCompletionBroker asyncCompletionBroker,
     ICompletionBroker completionBroker,
     IIntellisenseSessionStackMapService intellisenseSessionStackMapService,
     [Import(AllowDefault = true)] IVsEditorAdaptersFactoryService vsEditorAdapterFactoryService = null)
     : base(vimHost)
 {
     _asyncCompletionBroker = asyncCompletionBroker;
     _asyncFactory          = new WordAsyncCompletionSessionFactory(asyncCompletionBroker, vsEditorAdapterFactoryService);
     _legacyFactory         = new WordLegacyCompletionSessionFactory(completionBroker, intellisenseSessionStackMapService);
 }
Ejemplo n.º 9
0
 public InteractiveWindowProvider(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService bufferFactory,
     IProjectionBufferFactoryService projectionBufferFactory,
     IEditorOperationsFactoryService editorOperationsFactory,
     ITextEditorFactoryService editorFactory,
     IIntellisenseSessionStackMapService intellisenseSessionStackMap,
     ISmartIndentationService smartIndenterService,
     IInteractiveWindowEditorFactoryService windowFactoryService)
 {
     _contentTypeRegistry = contentTypeRegistry;
     _bufferFactory = bufferFactory;
     _projectionBufferFactory = projectionBufferFactory;
     _editorOperationsFactory = editorOperationsFactory;
     _editorFactory = editorFactory;
     _intellisenseSessionStackMap = intellisenseSessionStackMap;
     _smartIndenterService = smartIndenterService;
     _windowFactoryService = windowFactoryService;
 }
Ejemplo n.º 10
0
 public InteractiveWindowProvider(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService bufferFactory,
     IProjectionBufferFactoryService projectionBufferFactory,
     IEditorOperationsFactoryService editorOperationsFactory,
     ITextEditorFactoryService editorFactory,
     IIntellisenseSessionStackMapService intellisenseSessionStackMap,
     ISmartIndentationService smartIndenterService,
     IInteractiveWindowEditorFactoryService windowFactoryService)
 {
     this.contentTypeRegistry         = contentTypeRegistry;
     this.bufferFactory               = bufferFactory;
     this.projectionBufferFactory     = projectionBufferFactory;
     this.editorOperationsFactory     = editorOperationsFactory;
     this.editorFactory               = editorFactory;
     this.intellisenseSessionStackMap = intellisenseSessionStackMap;
     this.smartIndenterService        = smartIndenterService;
     this.windowFactoryService        = windowFactoryService;
 }
Ejemplo n.º 11
0
 public InteractiveWindowProvider(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService bufferFactory,
     IProjectionBufferFactoryService projectionBufferFactory,
     IEditorOperationsFactoryService editorOperationsFactory,
     ITextEditorFactoryService editorFactory,
     IRtfBuilderService rtfBuilderService,
     IIntellisenseSessionStackMapService intellisenseSessionStackMap,
     ISmartIndentationService smartIndenterService,
     IInteractiveWindowEditorFactoryService windowFactoryService,
     IWaitIndicator waitIndicator)
 {
     _contentTypeRegistry         = contentTypeRegistry;
     _bufferFactory               = bufferFactory;
     _projectionBufferFactory     = projectionBufferFactory;
     _editorOperationsFactory     = editorOperationsFactory;
     _editorFactory               = editorFactory;
     _rtfBuilderService           = rtfBuilderService;
     _intellisenseSessionStackMap = intellisenseSessionStackMap;
     _smartIndenterService        = smartIndenterService;
     _windowFactoryService        = windowFactoryService;
     _waitIndicator               = waitIndicator;
 }
Ejemplo n.º 12
0
        public InteractiveWindow(
            IInteractiveWindowEditorFactoryService host,
            IContentTypeRegistryService contentTypeRegistry,
            ITextBufferFactoryService bufferFactory,
            IProjectionBufferFactoryService projectionBufferFactory,
            IEditorOperationsFactoryService editorOperationsFactory,
            ITextEditorFactoryService editorFactory,
            IRtfBuilderService rtfBuilderService,
            IIntellisenseSessionStackMapService intellisenseSessionStackMap,
            ISmartIndentationService smartIndenterService,
            IInteractiveEvaluator evaluator)
        {
            if (evaluator == null)
            {
                throw new ArgumentNullException(nameof(evaluator));
            }

            _dangerous_uiOnly = new UIThreadOnly(this, host);

            this.Properties = new PropertyCollection();
            _history        = new History();

            _intellisenseSessionStackMap = intellisenseSessionStackMap;
            _smartIndenterService        = smartIndenterService;

            var replContentType       = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveContentTypeName);
            var replOutputContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveOutputContentTypeName);

            _outputBuffer              = bufferFactory.CreateTextBuffer(replOutputContentType);
            _standardInputBuffer       = bufferFactory.CreateTextBuffer();
            _promptBuffer              = bufferFactory.CreateTextBuffer();
            _secondaryPromptBuffer     = bufferFactory.CreateTextBuffer();
            _standardInputPromptBuffer = bufferFactory.CreateTextBuffer();
            _outputLineBreakBuffer     = bufferFactory.CreateTextBuffer();

            var projBuffer = projectionBufferFactory.CreateProjectionBuffer(
                new EditResolver(this),
                Array.Empty <object>(),
                ProjectionBufferOptions.None,
                replContentType);

            projBuffer.Properties.AddProperty(typeof(InteractiveWindow), this);

            _projectionBuffer = projBuffer;
            _dangerous_uiOnly.AppendNewOutputProjectionBuffer(); // Constructor runs on UI thread.
            projBuffer.Changed += new EventHandler <TextContentChangedEventArgs>(ProjectionBufferChanged);

            var roleSet = editorFactory.CreateTextViewRoleSet(
                PredefinedTextViewRoles.Analyzable,
                PredefinedTextViewRoles.Editable,
                PredefinedTextViewRoles.Interactive,
                PredefinedTextViewRoles.Zoomable,
                PredefinedInteractiveTextViewRoles.InteractiveTextViewRole);

            _textView = host.CreateTextView(this, projBuffer, roleSet);

            _textView.Caret.PositionChanged += CaretPositionChanged;

            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.HorizontalScrollBarId, false);
            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, false);
            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.OutliningMarginId, false);
            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.GlyphMarginId, false);
            _textView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.WordWrap);

            _lineBreakString = _textView.Options.GetNewLineCharacter();
            _dangerous_uiOnly.EditorOperations = editorOperationsFactory.GetEditorOperations(_textView); // Constructor runs on UI thread.

            _buffer       = new OutputBuffer(this);
            _outputWriter = new InteractiveWindowWriter(this, spans: null);

            SortedSpans errorSpans = new SortedSpans();

            _errorOutputWriter = new InteractiveWindowWriter(this, errorSpans);
            OutputClassifierProvider.AttachToBuffer(_outputBuffer, errorSpans);

            _rtfBuilderService = rtfBuilderService;

            RequiresUIThread();
            evaluator.CurrentWindow = this;
            _evaluator = evaluator;
        }
 internal WordCompletionSessionFactoryService(ICompletionBroker completionBroker, IIntellisenseSessionStackMapService intellisenseSessionStackMapService)
 {
     _completionBroker = completionBroker;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
 }
Ejemplo n.º 14
0
 public MockCompletionBroker(IIntellisenseSessionStackMapService stackMap, [ImportMany] IEnumerable <Lazy <ICompletionSourceProvider, IContentTypeMetadata> > completionProviders)
 {
     _stackMap            = stackMap;
     _completionProviders = completionProviders;
 }
            public UIThreadOnly(
                InteractiveWindow window,
                IInteractiveWindowEditorFactoryService factory,
                IContentTypeRegistryService contentTypeRegistry,
                ITextBufferFactoryService bufferFactory,
                IProjectionBufferFactoryService projectionBufferFactory,
                IEditorOperationsFactoryService editorOperationsFactory,
                ITextEditorFactoryService editorFactory,
                IRtfBuilderService rtfBuilderService,
                IIntellisenseSessionStackMapService intellisenseSessionStackMap,
                ISmartIndentationService smartIndenterService,
                IInteractiveEvaluator evaluator,
                IWaitIndicator waitIndicator)
            {
                _window = window;
                _factory = factory;
                _rtfBuilderService = (IRtfBuilderService2)rtfBuilderService;
                _intellisenseSessionStackMap = intellisenseSessionStackMap;
                _smartIndenterService = smartIndenterService;
                _waitIndicator = waitIndicator;
                Evaluator = evaluator;

                var replContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveContentTypeName);
                var replOutputContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveOutputContentTypeName);

                OutputBuffer = bufferFactory.CreateTextBuffer(replOutputContentType);
                StandardInputBuffer = bufferFactory.CreateTextBuffer();
                _inertType = bufferFactory.InertContentType;

                _projectionBuffer = projectionBufferFactory.CreateProjectionBuffer(
                    new EditResolver(window),
                    Array.Empty<object>(),
                    ProjectionBufferOptions.None,
                    replContentType);

                _projectionBuffer.Properties.AddProperty(typeof(InteractiveWindow), window);

                AppendNewOutputProjectionBuffer();
                _projectionBuffer.Changed += new EventHandler<TextContentChangedEventArgs>(ProjectionBufferChanged);

                var roleSet = editorFactory.CreateTextViewRoleSet(
                    PredefinedTextViewRoles.Analyzable,
                    PredefinedTextViewRoles.Editable,
                    PredefinedTextViewRoles.Interactive,
                    PredefinedTextViewRoles.Zoomable,
                    PredefinedInteractiveTextViewRoles.InteractiveTextViewRole);

                TextView = factory.CreateTextView(window, _projectionBuffer, roleSet);
                TextView.Caret.PositionChanged += CaretPositionChanged;

                var options = TextView.Options;
                options.SetOptionValue(DefaultTextViewHostOptions.HorizontalScrollBarId, true);
                options.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, false);
                options.SetOptionValue(DefaultTextViewHostOptions.OutliningMarginId, false);
                options.SetOptionValue(DefaultTextViewHostOptions.GlyphMarginId, false);
                options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.None);

                _lineBreakString = options.GetNewLineCharacter();
                EditorOperations = editorOperationsFactory.GetEditorOperations(TextView);

                _buffer = new OutputBuffer(window);
                OutputWriter = new InteractiveWindowWriter(window, spans: null);

                SortedSpans errorSpans = new SortedSpans();
                ErrorOutputWriter = new InteractiveWindowWriter(window, errorSpans);
                OutputClassifierProvider.AttachToBuffer(OutputBuffer, errorSpans);
            }
Ejemplo n.º 16
0
 PresenterMouseProcessorProvider(IIntellisenseSessionStackMapService intellisenseSessionStackMapService) => this.intellisenseSessionStackMapService = intellisenseSessionStackMapService;
Ejemplo n.º 17
0
 public MockSignatureHelpBroker(IIntellisenseSessionStackMapService stackMap, [ImportMany] IEnumerable <Lazy <ISignatureHelpSourceProvider, IContentTypeMetadata> > sigProviders)
 {
     _stackMap     = stackMap;
     _sigProviders = sigProviders;
 }
Ejemplo n.º 18
0
 public HlslKeyProcessor(ITextView textView, IIntellisenseSessionStackMapService intellisenseSessionStackMapService, CompletionModelManager completionModelManager)
 {
     _textView = textView;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
     _completionModelManager             = completionModelManager;
 }
Ejemplo n.º 19
0
		PresenterMouseProcessorProvider(IIntellisenseSessionStackMapService intellisenseSessionStackMapService) {
			this.intellisenseSessionStackMapService = intellisenseSessionStackMapService;
		}
Ejemplo n.º 20
0
 public HlslKeyProcessor(ITextView textView, IIntellisenseSessionStackMapService intellisenseSessionStackMapService)
 {
     _textView = textView;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
 }
 internal WordCompletionSessionFactoryService(ICompletionBroker completionBroker, IIntellisenseSessionStackMapService intellisenseSessionStackMapService)
 {
     _completionBroker = completionBroker;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
 }
Ejemplo n.º 22
0
 public MockSignatureHelpBroker(IIntellisenseSessionStackMapService stackMap, [ImportMany]IEnumerable<Lazy<ISignatureHelpSourceProvider, IContentTypeMetadata>> sigProviders) {
     _stackMap = stackMap;
     _sigProviders = sigProviders;
 }
Ejemplo n.º 23
0
 public MockCompletionBroker(IIntellisenseSessionStackMapService stackMap, [ImportMany]IEnumerable<Lazy<ICompletionSourceProvider, IContentTypeMetadata>> completionProviders) {
     _stackMap = stackMap;
     _completionProviders = completionProviders;
 }
        public InteractiveWindow(
            IInteractiveWindowEditorFactoryService host,
            IContentTypeRegistryService contentTypeRegistry,
            ITextBufferFactoryService bufferFactory,
            IProjectionBufferFactoryService projectionBufferFactory,
            IEditorOperationsFactoryService editorOperationsFactory,
            ITextEditorFactoryService editorFactory,
            IIntellisenseSessionStackMapService intellisenseSessionStackMap,
            ISmartIndentationService smartIndenterService,
            IInteractiveEvaluator evaluator)
        {
            if (evaluator == null)
            {
                throw new ArgumentNullException(nameof(evaluator));
            }

            _dangerous_uiOnly = new UIThreadOnly(this, host);

            this.Properties = new PropertyCollection();
            _history = new History();

            _intellisenseSessionStackMap = intellisenseSessionStackMap;
            _smartIndenterService = smartIndenterService;

            var textContentType = contentTypeRegistry.GetContentType("text");
            var replContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveContentTypeName);
            var replOutputContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveContentTypes.InteractiveOutputContentTypeName);

            _outputBuffer = bufferFactory.CreateTextBuffer(replOutputContentType);
            _standardInputBuffer = bufferFactory.CreateTextBuffer();

            var projBuffer = projectionBufferFactory.CreateProjectionBuffer(
                new EditResolver(this),
                Array.Empty<object>(),
                ProjectionBufferOptions.None,
                replContentType);

            // we need to set IReplPromptProvider property before TextViewHost is instantiated so that ReplPromptTaggerProvider can bind to it 
            projBuffer.Properties.AddProperty(typeof(InteractiveWindow), this);

            _projectionBuffer = projBuffer;
            _dangerous_uiOnly.AppendNewOutputProjectionBuffer(); // Constructor runs on UI thread.
            projBuffer.Changed += new EventHandler<TextContentChangedEventArgs>(ProjectionBufferChanged);

            var roleSet = editorFactory.CreateTextViewRoleSet(
                PredefinedTextViewRoles.Analyzable,
                PredefinedTextViewRoles.Editable,
                PredefinedTextViewRoles.Interactive,
                PredefinedTextViewRoles.Zoomable,
                PredefinedInteractiveTextViewRoles.InteractiveTextViewRole);

            _textView = host.CreateTextView(this, projBuffer, roleSet);

            _textView.Caret.PositionChanged += CaretPositionChanged;

            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.HorizontalScrollBarId, false);
            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, false);
            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.OutliningMarginId, false);
            _textView.Options.SetOptionValue(DefaultTextViewHostOptions.GlyphMarginId, false);
            _textView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.WordWrap);

            _lineBreakString = _textView.Options.GetNewLineCharacter();
            _dangerous_uiOnly.EditorOperations = editorOperationsFactory.GetEditorOperations(_textView); // Constructor runs on UI thread.

            _buffer = new OutputBuffer(this);
            _outputWriter = new InteractiveWindowWriter(this, spans: null);

            SortedSpans errorSpans = new SortedSpans();
            _errorOutputWriter = new InteractiveWindowWriter(this, errorSpans);
            OutputClassifierProvider.AttachToBuffer(_outputBuffer, errorSpans);

            RequiresUIThread();
            evaluator.CurrentWindow = this;
            _evaluator = evaluator;
        }
Ejemplo n.º 25
0
 public HlslKeyProcessor(ITextView textView, IIntellisenseSessionStackMapService intellisenseSessionStackMapService)
 {
     _textView = textView;
     _intellisenseSessionStackMapService = intellisenseSessionStackMapService;
 }