internal override IChainedCommandHandler <AutomaticLineEnderCommandArgs> CreateCommandHandler( ITextUndoHistoryRegistry undoRegistry, IEditorOperationsFactoryService editorOperations, IAsyncCompletionBroker asyncCompletionBroker) { return(new AutomaticLineEnderCommandHandler(undoRegistry, editorOperations, asyncCompletionBroker)); }
internal VimWordCompletionUtil( Lazy <IVimHost> vimHost, IAsyncCompletionBroker asyncCompletionBroker, ICompletionBroker completionBroker, #if VS_SPECIFIC_2019 IIntellisenseSessionStackMapService intellisenseSessionStackMapService, [Import(AllowDefault = true)] IVsEditorAdaptersFactoryService vsEditorAdapterFactoryService = null)
public AsyncCompletionSource( ITextView textView, ITextStructureNavigatorSelectorService navigatorService, IAsyncCompletionBroker editorCompletionBroker, PythonLanguageClient languageClient) { Requires.NotNull(textView, nameof(textView)); Requires.NotNull(navigatorService, nameof(navigatorService)); this.textView = textView; this.editorCompletionBroker = editorCompletionBroker; this.navigatorService = navigatorService; this.languageClient = languageClient; Requires.NotNull(this.navigatorService, nameof(this.navigatorService)); // Cancel requests which are no longer needed and send telemetry this.textView.Closed += this.OnTextViewClosed; // Trigger characters actually come from Pylance but we know what they are. this.triggerCharacters = new char[] { '.', '[' }; // Pylance does not support commit characters this.serverCommitCharacters = new char[] { }.ToImmutableHashSet(); }
public AutomaticLineEnderCommandHandler( ITextUndoHistoryRegistry undoRegistry, IEditorOperationsFactoryService editorOperations, IAsyncCompletionBroker asyncCompletionBroker) : base(undoRegistry, editorOperations, asyncCompletionBroker) { }
public RazorDirectiveAttributeCompletionSourceProvider( ForegroundDispatcher foregroundDispatcher, RazorCompletionFactsService completionFactsService, IAsyncCompletionBroker asyncCoompletionBroker, ICompletionBroker completionBroker, VisualStudioDescriptionFactory descriptionFactory) { if (foregroundDispatcher == null) { throw new ArgumentNullException(nameof(foregroundDispatcher)); } if (completionFactsService == null) { throw new ArgumentNullException(nameof(completionFactsService)); } if (asyncCoompletionBroker is null) { throw new ArgumentNullException(nameof(asyncCoompletionBroker)); } if (descriptionFactory == null) { throw new ArgumentNullException(nameof(descriptionFactory)); } _foregroundDispatcher = foregroundDispatcher; _completionFactsService = completionFactsService; _completionBroker = completionBroker; _descriptionFactory = descriptionFactory; }
public RazorDirectiveCompletionProvider( [Import(typeof(RazorCodeDocumentProvider))] Lazy <RazorCodeDocumentProvider> codeDocumentProvider, [Import(typeof(RazorCompletionFactsService))] Lazy <RazorCompletionFactsService> completionFactsService, IAsyncCompletionBroker asyncCompletionBroker, RazorTextBufferProvider textBufferProvider) { if (codeDocumentProvider == null) { throw new ArgumentNullException(nameof(codeDocumentProvider)); } if (completionFactsService == null) { throw new ArgumentNullException(nameof(completionFactsService)); } if (asyncCompletionBroker == null) { throw new ArgumentNullException(nameof(asyncCompletionBroker)); } if (textBufferProvider == null) { throw new ArgumentNullException(nameof(textBufferProvider)); } _codeDocumentProvider = codeDocumentProvider; _completionFactsService = completionFactsService; _asyncCompletionBroker = asyncCompletionBroker; _textBufferProvider = textBufferProvider; }
internal WordAsyncCompletionSessionFactory( IAsyncCompletionBroker asyncCompletionBroker, IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService = null) { _asyncCompletionBroker = asyncCompletionBroker; _vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService; }
public AbstractAutomaticLineEnderCommandHandler( ITextUndoHistoryRegistry undoRegistry, IEditorOperationsFactoryService editorOperationsFactoryService, IAsyncCompletionBroker asyncCompletionBroker) { _undoRegistry = undoRegistry; _editorOperationsFactoryService = editorOperationsFactoryService; _asyncCompletionBroker = asyncCompletionBroker; }
public FailOnGetCompletionsProvider( Lazy <RazorCodeDocumentProvider> codeDocumentProvider, IAsyncCompletionBroker asyncCompletionBroker, RazorTextBufferProvider textBufferProvider, bool canGetSnapshotPoint = true) : base(codeDocumentProvider, new Lazy <RazorCompletionFactsService>(() => new DefaultRazorCompletionFactsService()), asyncCompletionBroker, textBufferProvider) { _canGetSnapshotPoint = canGetSnapshotPoint; }
public AsyncCompletionTracker( IAsynchronousOperationListenerProvider asynchronousOperationListenerProvider, IAsyncCompletionBroker asyncCompletionBroker) { // Store the listener provider, but delay accessing the listener itself since tracking could still be // disabled during the initialization sequence for integration tests. _asynchronousOperationListenerProvider = asynchronousOperationListenerProvider; _asyncCompletionBroker = asyncCompletionBroker; }
public SignatureHelpBeforeCompletionCommandHandler( IThreadingContext threadingContext, [ImportMany] IEnumerable <Lazy <ISignatureHelpProvider, OrderableLanguageMetadata> > signatureHelpProviders, [ImportMany] IEnumerable <Lazy <IIntelliSensePresenter <ISignatureHelpPresenterSession, ISignatureHelpSession>, OrderableMetadata> > signatureHelpPresenters, IAsyncCompletionBroker completionBroker, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext, signatureHelpProviders, signatureHelpPresenters, completionBroker, listenerProvider) { }
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); }
public AbstractSignatureHelpCommandHandler( IThreadingContext threadingContext, IEnumerable <Lazy <ISignatureHelpProvider, OrderableLanguageMetadata> > signatureHelpProviders, IEnumerable <Lazy <IIntelliSensePresenter <ISignatureHelpPresenterSession, ISignatureHelpSession>, OrderableMetadata> > signatureHelpPresenters, IAsyncCompletionBroker completionBroker, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext) { _signatureHelpProviders = ExtensionOrderer.Order(signatureHelpProviders); _listener = listenerProvider.GetListener(FeatureAttribute.SignatureHelp); _signatureHelpPresenter = ExtensionOrderer.Order(signatureHelpPresenters).Select(lazy => lazy.Value).FirstOrDefault(); _completionBroker = completionBroker; }
// For testing purposes. internal Controller( IThreadingContext threadingContext, ITextView textView, ITextBuffer subjectBuffer, IIntelliSensePresenter <ISignatureHelpPresenterSession, ISignatureHelpSession> presenter, IAsynchronousOperationListener asyncListener, IDocumentProvider documentProvider, IList <ISignatureHelpProvider> providers, IAsyncCompletionBroker completionBroker) : base(threadingContext, textView, subjectBuffer, presenter, asyncListener, documentProvider, "SignatureHelp") { _providers = providers.ToImmutableArray(); _completionBroker = completionBroker; }
public Controller( IThreadingContext threadingContext, ITextView textView, ITextBuffer subjectBuffer, IIntelliSensePresenter <ISignatureHelpPresenterSession, ISignatureHelpSession> presenter, IAsynchronousOperationListener asyncListener, IDocumentProvider documentProvider, IList <Lazy <ISignatureHelpProvider, OrderableLanguageMetadata> > allProviders, IAsyncCompletionBroker completionBroker) : base(threadingContext, textView, subjectBuffer, presenter, asyncListener, documentProvider, "SignatureHelp") { _completionBroker = completionBroker; _allProviders = allProviders; }
public DefaultCompletionProviderDependencies( RazorCompletionFactsService completionFactsService, IAsyncCompletionBroker asyncCompletionBroker) { if (completionFactsService == null) { throw new ArgumentNullException(nameof(completionFactsService)); } if (asyncCompletionBroker == null) { throw new ArgumentNullException(nameof(asyncCompletionBroker)); } CompletionFactsService = completionFactsService; AsyncCompletionBroker = asyncCompletionBroker; }
internal static Controller GetInstance( IThreadingContext threadingContext, EditorCommandArgs args, IIntelliSensePresenter <ISignatureHelpPresenterSession, ISignatureHelpSession> presenter, IAsynchronousOperationListener asyncListener, IList <Lazy <ISignatureHelpProvider, OrderableLanguageMetadata> > allProviders, IAsyncCompletionBroker completionBroker) { var textView = args.TextView; var subjectBuffer = args.SubjectBuffer; return(textView.GetOrCreatePerSubjectBufferProperty(subjectBuffer, s_controllerPropertyKey, (v, b) => new Controller(threadingContext, v, b, presenter, asyncListener, new DocumentProvider(threadingContext), allProviders, completionBroker))); }
public RazorDirectiveAttributeCompletionSourceProvider( ProjectSnapshotManagerDispatcher projectSnapshotManagerDispatcher, RazorCompletionFactsService completionFactsService, IAsyncCompletionBroker asyncCoompletionBroker, ICompletionBroker completionBroker, VisualStudioDescriptionFactory descriptionFactory, JoinableTaskContext joinableTaskContext) { if (projectSnapshotManagerDispatcher == null) { throw new ArgumentNullException(nameof(projectSnapshotManagerDispatcher)); } if (completionFactsService == null) { throw new ArgumentNullException(nameof(completionFactsService)); } if (asyncCoompletionBroker is null) { throw new ArgumentNullException(nameof(asyncCoompletionBroker)); } if (descriptionFactory == null) { throw new ArgumentNullException(nameof(descriptionFactory)); } if (joinableTaskContext is null) { throw new ArgumentNullException(nameof(joinableTaskContext)); } _projectSnapshotManagerDispatcher = projectSnapshotManagerDispatcher; _completionFactsService = completionFactsService; _completionBroker = completionBroker; _descriptionFactory = descriptionFactory; _joinableTaskContext = joinableTaskContext; }
public DefaultLSPEditorService( JoinableTaskContext joinableTaskContext, SVsServiceProvider serviceProvider, ITextBufferUndoManagerProvider undoManagerProvider, IAsyncCompletionBroker completionBroker, IVsEditorAdaptersFactoryService adaptersFactoryService) { if (joinableTaskContext is null) { throw new ArgumentNullException(nameof(joinableTaskContext)); } if (serviceProvider is null) { throw new ArgumentNullException(nameof(serviceProvider)); } if (undoManagerProvider is null) { throw new ArgumentNullException(nameof(undoManagerProvider)); } if (completionBroker is null) { throw new ArgumentNullException(nameof(completionBroker)); } if (adaptersFactoryService is null) { throw new ArgumentNullException(nameof(adaptersFactoryService)); } _joinableTaskFactory = joinableTaskContext.Factory; _serviceProvider = serviceProvider; _undoManagerProvider = undoManagerProvider; _completionBroker = completionBroker; _adaptersFactoryService = adaptersFactoryService; }
internal WordAsyncCompletionSessionFactory( IAsyncCompletionBroker asyncCompletionBroker) { _asyncCompletionBroker = asyncCompletionBroker; }
internal abstract IChainedCommandHandler <AutomaticLineEnderCommandArgs> CreateCommandHandler( ITextUndoHistoryRegistry undoRegistry, IEditorOperationsFactoryService editorOperations, IAsyncCompletionBroker asyncCompletionBroker);