public VenusCommandFilter( TLanguageService languageService, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, ITextBuffer subjectBuffer, IOleCommandTarget nextCommandTarget, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(languageService, wpfTextView, editorAdaptersFactoryService, commandHandlerServiceFactory) { Contract.ThrowIfNull(wpfTextView); Contract.ThrowIfNull(subjectBuffer); Contract.ThrowIfNull(nextCommandTarget); _subjectBuffer = subjectBuffer; CurrentHandlers = commandHandlerServiceFactory.GetService(subjectBuffer); // Setup all command handlers migrated to the modern editor commandig to be execited next var componentModel = Shell.ServiceProvider.GlobalProvider.GetService(typeof(SComponentModel)) as IComponentModel; var vsCommandHandlerServiceAdapterFactory = componentModel?.GetService <IVsCommandHandlerServiceAdapterFactory>(); if (vsCommandHandlerServiceAdapterFactory != null) { var vsCommandHandlerServiceAdapter = vsCommandHandlerServiceAdapterFactory.Create(wpfTextView, _subjectBuffer, nextCommandTarget); NextCommandTarget = vsCommandHandlerServiceAdapter; } else { NextCommandTarget = nextCommandTarget; } }
public AbstractVsTextViewFilter( IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IServiceProvider systemServiceProvider) : base(wpfTextView, commandHandlerServiceFactory, editorAdaptersFactoryService, systemServiceProvider) { }
public AbstractVsTextViewFilter( IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IServiceProvider systemServiceProvider) : base(wpfTextView, commandHandlerServiceFactory, editorAdaptersFactoryService, systemServiceProvider) { }
public CSharpVsInteractiveWindowCommandProvider( ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, SVsServiceProvider serviceProvider) { _commandHandlerServiceFactory = commandHandlerServiceFactory; _editorAdaptersFactory = editorAdaptersFactoryService; _serviceProvider = serviceProvider; }
public CSharpVsInteractiveWindowCommandProvider( ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, SVsServiceProvider serviceProvider) { _commandHandlerServiceFactory = commandHandlerServiceFactory; _editorAdaptersFactory = editorAdaptersFactoryService; _serviceProvider = serviceProvider; }
protected AbstractVsTextViewFilter( AbstractLanguageService <TPackage, TLanguageService> languageService, IWpfTextView wpfTextView, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ICommandHandlerServiceFactory commandHandlerServiceFactory) : base(wpfTextView, commandHandlerServiceFactory, editorAdaptersFactoryService, languageService.SystemServiceProvider) { LanguageService = languageService; }
public SaveEventsService( IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ICommandHandlerServiceFactory commandHandlerServiceFactory, SVsServiceProvider serviceProvider) { _editorAdaptersFactoryService = editorAdaptersFactoryService; _commandHandlerServiceFactory = commandHandlerServiceFactory; _runningDocumentTable = (IVsRunningDocumentTable)serviceProvider.GetService(typeof(SVsRunningDocumentTable)); _textManager = (IVsTextManager)serviceProvider.GetService(typeof(SVsTextManager)); }
public SaveEventsService( IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ICommandHandlerServiceFactory commandHandlerServiceFactory, SVsServiceProvider serviceProvider) { _editorAdaptersFactoryService = editorAdaptersFactoryService; _commandHandlerServiceFactory = commandHandlerServiceFactory; _runningDocumentTable = (IVsRunningDocumentTable)serviceProvider.GetService(typeof(SVsRunningDocumentTable)); _textManager = (IVsTextManager)serviceProvider.GetService(typeof(SVsTextManager)); }
public VenusCommandFilter( TLanguageService languageService, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, ITextBuffer subjectBuffer, IOleCommandTarget nextCommandTarget, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : this(languageService, wpfTextView, subjectBuffer, nextCommandTarget, editorAdaptersFactoryService) { }
public DebuggerIntelliSenseFilter( AbstractLanguageService <TPackage, TLanguageService, TProject> languageService, IWpfTextView wpfTextView, IVsEditorAdaptersFactoryService adapterFactory, ICommandHandlerServiceFactory commandFactory) : base(languageService, wpfTextView, adapterFactory, commandFactory) { _wpfTextView = wpfTextView; _commandFactory = commandFactory; }
public VenusCommandFilter( TLanguageService languageService, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, ITextBuffer subjectBuffer, IOleCommandTarget nextCommandTarget, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(wpfTextView, subjectBuffer, nextCommandTarget, languageService.Package.ComponentModel) { }
internal XamlOleCommandTarget( IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactory, IServiceProvider serviceProvider) : base(wpfTextView, commandHandlerServiceFactory, editorAdaptersFactory, serviceProvider) { wpfTextView.Closed += OnTextViewClosed; wpfTextView.BufferGraph.GraphBufferContentTypeChanged += OnGraphBuffersChanged; wpfTextView.BufferGraph.GraphBuffersChanged += OnGraphBuffersChanged; }
internal XamlOleCommandTarget( IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactory, IServiceProvider serviceProvider) : base(wpfTextView, commandHandlerServiceFactory, editorAdaptersFactory, serviceProvider) { wpfTextView.Closed += OnTextViewClosed; wpfTextView.BufferGraph.GraphBufferContentTypeChanged += OnGraphBuffersChanged; wpfTextView.BufferGraph.GraphBuffersChanged += OnGraphBuffersChanged; }
/// <summary> /// Creates a new command handler that is attached to an IVsTextView. /// </summary> /// <param name="wpfTextView">The IWpfTextView of the view.</param> /// <param name="commandHandlerServiceFactory">The MEF imported ICommandHandlerServiceFactory.</param> /// <param name="editorAdaptersFactoryService">The editor adapter</param> /// <param name="languageService">The language service</param> internal StandaloneCommandFilter( IServiceProvider serviceProvider, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(wpfTextView, commandHandlerServiceFactory, editorAdaptersFactoryService, serviceProvider) { wpfTextView.Closed += OnTextViewClosed; wpfTextView.BufferGraph.GraphBufferContentTypeChanged += OnGraphBuffersChanged; wpfTextView.BufferGraph.GraphBuffersChanged += OnGraphBuffersChanged; RefreshCommandFilters(); }
/// <summary> /// Creates a new command handler that is attached to an IVsTextView. /// </summary> /// <param name="wpfTextView">The IWpfTextView of the view.</param> /// <param name="commandHandlerServiceFactory">The MEF imported ICommandHandlerServiceFactory.</param> /// <param name="editorAdaptersFactoryService">The editor adapter</param> /// <param name="languageService">The language service</param> internal StandaloneCommandFilter( TLanguageService languageService, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(languageService, wpfTextView, editorAdaptersFactoryService, commandHandlerServiceFactory) { wpfTextView.Closed += OnTextViewClosed; wpfTextView.BufferGraph.GraphBufferContentTypeChanged += OnGraphBuffersChanged; wpfTextView.BufferGraph.GraphBuffersChanged += OnGraphBuffersChanged; RefreshCommandFilters(); }
private RoslynCommandTarget(ITextView textView, ITextBuffer languageBuffer) { ICommandHandlerServiceFactory commandHandlerServiceFactory = CompositionManager.GetExportedValue <ICommandHandlerServiceFactory>(); if (commandHandlerServiceFactory != null) { commandHandlerServiceFactory.Initialize(languageBuffer.ContentType.TypeName); CurrentHandlers = commandHandlerServiceFactory.GetService(languageBuffer); } _languageBuffer = languageBuffer; _textView = textView; }
public AbstractOleCommandTarget( IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactory, System.IServiceProvider serviceProvider) { Contract.ThrowIfNull(wpfTextView); Contract.ThrowIfNull(commandHandlerServiceFactory); Contract.ThrowIfNull(editorAdaptersFactory); Contract.ThrowIfNull(serviceProvider); _wpfTextView = wpfTextView; _commandHandlerServiceFactory = commandHandlerServiceFactory; _editorAdaptersFactory = editorAdaptersFactory; _serviceProvider = serviceProvider; }
public AbstractOleCommandTarget( IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactory, System.IServiceProvider serviceProvider) { Contract.ThrowIfNull(wpfTextView); Contract.ThrowIfNull(commandHandlerServiceFactory); Contract.ThrowIfNull(editorAdaptersFactory); Contract.ThrowIfNull(serviceProvider); _wpfTextView = wpfTextView; _commandHandlerServiceFactory = commandHandlerServiceFactory; _editorAdaptersFactory = editorAdaptersFactory; _serviceProvider = serviceProvider; }
public VenusCommandFilter( TLanguageService languageService, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, ITextBuffer subjectBuffer, IOleCommandTarget nextCommandTarget, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(languageService, wpfTextView, editorAdaptersFactoryService, commandHandlerServiceFactory) { Contract.ThrowIfNull(wpfTextView); Contract.ThrowIfNull(subjectBuffer); Contract.ThrowIfNull(nextCommandTarget); _subjectBuffer = subjectBuffer; CurrentHandlers = commandHandlerServiceFactory.GetService(subjectBuffer); NextCommandTarget = nextCommandTarget; }
public XamlTextViewCreationListener( [Import(typeof(SVsServiceProvider))] System.IServiceProvider services, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IXamlDocumentAnalyzerService analyzerService, VisualStudioWorkspaceImpl vsWorkspace) { _serviceProvider = services; _commandHandlerService = commandHandlerServiceFactory; _editorAdaptersFactory = editorAdaptersFactoryService; _vsWorkspace = vsWorkspace; _rdt = new Lazy <RunningDocumentTable>(() => new RunningDocumentTable(_serviceProvider)); _vsSolution = (IVsSolution)_serviceProvider.GetService(typeof(SVsSolution)); AnalyzerService = analyzerService; if (ErrorHandler.Succeeded(_vsSolution.AdviseSolutionEvents(this, out var solutionEventsCookie))) { _solutionEventsCookie = solutionEventsCookie; } }
public XamlTextViewCreationListener( [Import(typeof(SVsServiceProvider))] System.IServiceProvider services, ICommandHandlerServiceFactory commandHandlerServiceFactory, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IXamlDocumentAnalyzerService analyzerService, VisualStudioWorkspaceImpl vsWorkspace) { _serviceProvider = services; _commandHandlerService = commandHandlerServiceFactory; _editorAdaptersFactory = editorAdaptersFactoryService; _vsWorkspace = vsWorkspace; _rdt = new Lazy<RunningDocumentTable>(() => new RunningDocumentTable(_serviceProvider)); _vsSolution = (IVsSolution)_serviceProvider.GetService(typeof(SVsSolution)); AnalyzerService = analyzerService; uint solutionEventsCookie; if (ErrorHandler.Succeeded(_vsSolution.AdviseSolutionEvents(this, out solutionEventsCookie))) { _solutionEventsCookie = solutionEventsCookie; } }
public VenusCommandFilter( TLanguageService languageService, IWpfTextView wpfTextView, ICommandHandlerServiceFactory commandHandlerServiceFactory, ITextBuffer subjectBuffer, IOleCommandTarget nextCommandTarget, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(languageService, wpfTextView, editorAdaptersFactoryService, commandHandlerServiceFactory) { Contract.ThrowIfNull(wpfTextView); Contract.ThrowIfNull(subjectBuffer); Contract.ThrowIfNull(nextCommandTarget); _subjectBuffer = subjectBuffer; CurrentHandlers = commandHandlerServiceFactory.GetService(subjectBuffer); // Chain in editor command handler service. It will execute all our command handlers migrated to the modern editor commanding. var componentModel = (IComponentModel)languageService.SystemServiceProvider.GetService(typeof(SComponentModel)); var vsCommandHandlerServiceAdapterFactory = componentModel.GetService <IVsCommandHandlerServiceAdapterFactory>(); var vsCommandHandlerServiceAdapter = vsCommandHandlerServiceAdapterFactory.Create(wpfTextView, _subjectBuffer, nextCommandTarget); NextCommandTarget = vsCommandHandlerServiceAdapter; }