public SnippetCommandHandler( IThreadingContext threadingContext, IExpansionServiceProvider expansionServiceProvider, IExpansionManager expansionManager ) : base(threadingContext, expansionServiceProvider, expansionManager) { }
public SnippetCommandHandler( IThreadingContext threadingContext, IExpansionServiceProvider expansionServiceProvider, IExpansionManager expansionManager, EditorOptionsService editorOptionsService) : base(threadingContext, expansionServiceProvider, expansionManager, editorOptionsService) { }
public AbstractSnippetCommandHandler( IThreadingContext threadingContext, IExpansionServiceProvider expansionServiceProvider, IExpansionManager expansionManager ) : base(threadingContext) { this.ExpansionServiceProvider = expansionServiceProvider; this.ExpansionManager = expansionManager; }
public AbstractSnippetCommandHandler( IThreadingContext threadingContext, IExpansionServiceProvider expansionServiceProvider, IExpansionManager expansionManager, IGlobalOptionService globalOptions) { ThreadingContext = threadingContext; ExpansionServiceProvider = expansionServiceProvider; ExpansionManager = expansionManager; GlobalOptions = globalOptions; }
public PythonSnippetManager( [Import(typeof(SVsServiceProvider))] IServiceProvider site, [Import] IVsEditorAdaptersFactoryService editorAdaptersFactoryService ) { _site = site ?? throw new ArgumentNullException(nameof(site)); _editorAdaptersFactoryService = editorAdaptersFactoryService ?? throw new ArgumentNullException(nameof(editorAdaptersFactoryService)); _textManager = site.GetService <SVsTextManager, IVsTextManager2>(); _textManager.GetExpansionManager(out _vsExpansionMgr); _expansionMgr = _vsExpansionMgr as IExpansionManager; }
public AbstractSnippetCommandHandler( IThreadingContext threadingContext, IExpansionServiceProvider expansionServiceProvider, IExpansionManager expansionManager, EditorOptionsService editorOptionsService) { ThreadingContext = threadingContext; ExpansionServiceProvider = expansionServiceProvider; ExpansionManager = expansionManager; EditorOptionsService = editorOptionsService; }
private async Task PopulateSnippetCacheAsync(IExpansionManager expansionManager) { AssertIsBackground(); var expansionEnumerator = await expansionManager.EnumerateExpansionsAsync( _languageGuidForSnippets, 0, // shortCutOnly Array.Empty <string>(), // types 0, // countTypes 1, // includeNULLTypes 1 // includeDulicates: Allows snippets with the same title but different shortcuts ).ConfigureAwait(false); // The rest of the process requires being on the UI thread, see the explanation on // PopulateSnippetCacheFromExpansionEnumeration for details await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(); PopulateSnippetCacheFromExpansionEnumeration(expansionEnumerator); }
private async Task PopulateSnippetCacheAsync(IExpansionManager expansionManager) { AssertIsBackground(); var expansionEnumerator = await expansionManager.EnumerateExpansionsAsync( _languageGuidForSnippets, 0, // shortCutOnly Array.Empty <string>(), // types 0, // countTypes 1, // includeNULLTypes 1 // includeDulicates: Allows snippets with the same title but different shortcuts ).ConfigureAwait(false); // The rest of the process requires being on the UI thread, see the explanation on // PopulateSnippetCacheFromExpansionEnumeration for details await Task.Factory.StartNew(() => PopulateSnippetCacheFromExpansionEnumeration(expansionEnumerator), CancellationToken.None, TaskCreationOptions.None, ForegroundTaskScheduler).ConfigureAwait(false); }
private async Task PopulateSnippetCacheAsync(IExpansionManager expansionManager) { AssertIsBackground(); var expansionEnumerator = await expansionManager.EnumerateExpansionsAsync( _languageGuidForSnippets, 0, // shortCutOnly Array.Empty<string>(), // types 0, // countTypes 1, // includeNULLTypes 1 // includeDulicates: Allows snippets with the same title but different shortcuts ).ConfigureAwait(false); // The rest of the process requires being on the UI thread, see the explanation on // PopulateSnippetCacheFromExpansionEnumeration for details await Task.Factory.StartNew(() => PopulateSnippetCacheFromExpansionEnumeration(expansionEnumerator), CancellationToken.None, TaskCreationOptions.None, ForegroundTaskScheduler).ConfigureAwait(false); }