public EditorCommandHandlerServiceFactory( [ImportMany] IEnumerable <Lazy <ICommandHandler, ICommandHandlerMetadata> > commandHandlers, [ImportMany] IEnumerable <Lazy <ICommandingTextBufferResolverProvider, IContentTypeMetadata> > bufferResolvers, IUIThreadOperationExecutor uiThreadOperationExecutor, JoinableTaskContext joinableTaskContext, IStatusBarService statusBar, IContentTypeRegistryService contentTypeRegistryService, IGuardedOperations guardedOperations, ILoggingServiceInternal loggingService) { UIThreadOperationExecutor = uiThreadOperationExecutor; JoinableTaskContext = joinableTaskContext; StatusBar = statusBar; GuardedOperations = guardedOperations; LoggingService = loggingService; _contentTypeRegistryService = contentTypeRegistryService; ContentTypeOrderer = new StableContentTypeOrderer <ICommandHandler, ICommandHandlerMetadata>(_contentTypeRegistryService); _commandHandlers = OrderCommandHandlers(commandHandlers); if (!bufferResolvers.Any()) { throw new ImportCardinalityMismatchException($"Expected to import at least one {typeof(ICommandingTextBufferResolver).Name}"); } _bufferResolverProviders = bufferResolvers.ToList(); }
public VisualStudioMoveStaticMembersOptionsService( IGlyphService glyphService, IUIThreadOperationExecutor uiThreadOperationExecutor) { _glyphService = glyphService; _uiThreadOperationExecutor = uiThreadOperationExecutor; }
public SyncNamespacesCommandHandler( IUIThreadOperationExecutor threadOperationExecutor, VisualStudioWorkspace workspace) { _threadOperationExecutor = threadOperationExecutor; _workspace = workspace; }
public ExtractClassViewModel( IUIThreadOperationExecutor uiThreadOperationExecutor, INotificationService notificationService, ImmutableArray <MemberSymbolViewModel> memberViewModels, ImmutableDictionary <ISymbol, Task <ImmutableArray <ISymbol> > > memberToDependentsMap, string defaultTypeName, string defaultNamespace, string languageName, string typeParameterSuffix, ImmutableArray <string> conflictingNames, ISyntaxFactsService syntaxFactsService) { _notificationService = notificationService; MemberSelectionViewModel = new MemberSelectionViewModel( uiThreadOperationExecutor, memberViewModels, memberToDependentsMap, destinationTypeKind: TypeKind.Class); DestinationViewModel = new NewTypeDestinationSelectionViewModel( defaultTypeName, languageName, defaultNamespace, typeParameterSuffix, conflictingNames, syntaxFactsService); }
public InheritanceGlyphManager( IWpfTextView textView, IThreadingContext threadingContext, IStreamingFindUsagesPresenter streamingFindUsagesPresenter, IClassificationFormatMap classificationFormatMap, ClassificationTypeMap classificationTypeMap, IUIThreadOperationExecutor operationExecutor, IEditorFormatMap editorFormatMap, IAsynchronousOperationListener listener, Canvas canvas, double heightAndWidthOfTheGlyph) : base(threadingContext) { _textView = textView; _threadingContext = threadingContext; _streamingFindUsagesPresenter = streamingFindUsagesPresenter; _classificationTypeMap = classificationTypeMap; _classificationFormatMap = classificationFormatMap; _operationExecutor = operationExecutor; _editorFormatMap = editorFormatMap; _glyphsContainer = canvas; _listener = listener; _heightAndWidthOfTheGlyph = heightAndWidthOfTheGlyph; _editorFormatMap.FormatMappingChanged += FormatMappingChanged; _glyphDataTree = new SimpleIntervalTree <GlyphData, GlyphDataIntrospector>(new GlyphDataIntrospector(), values: null); UpdateBackgroundColor(); }
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; }
public InheritanceMargin( IThreadingContext threadingContext, IStreamingFindUsagesPresenter streamingFindUsagesPresenter, ClassificationTypeMap classificationTypeMap, IClassificationFormatMap classificationFormatMap, IUIThreadOperationExecutor operationExecutor, InheritanceMarginTag tag, IWpfTextView textView, IAsynchronousOperationListener listener) { _threadingContext = threadingContext; _streamingFindUsagesPresenter = streamingFindUsagesPresenter; _workspace = tag.Workspace; _operationExecutor = operationExecutor; _textView = textView; _listener = listener; InitializeComponent(); var viewModel = InheritanceMarginViewModel.Create(classificationTypeMap, classificationFormatMap, tag, textView.ZoomLevel); DataContext = viewModel; ContextMenu.DataContext = viewModel; ToolTip = new ToolTip { Content = viewModel.ToolTipTextBlock, Style = (Style)FindResource("ToolTipStyle") }; }
public FindUsagesTableControlEventProcessorProvider( IUIThreadOperationExecutor operationExecutor, IAsynchronousOperationListenerProvider asyncProvider) { _operationExecutor = operationExecutor; _listener = asyncProvider.GetListener(FeatureAttribute.FindReferences); }
internal ExtractInterfaceDialogViewModel( ISyntaxFactsService syntaxFactsService, IUIThreadOperationExecutor uiThreadOperationExecutor, INotificationService notificationService, string defaultInterfaceName, List <string> conflictingTypeNames, ImmutableArray <LanguageServices.Utilities.MemberSymbolViewModel> memberViewModels, string defaultNamespace, string generatedNameTypeParameterSuffix, string languageName) { _notificationService = notificationService; MemberSelectionViewModel = new MemberSelectionViewModel( uiThreadOperationExecutor, memberViewModels, dependentsMap: null, destinationTypeKind: TypeKind.Interface, showDependentsButton: false, showPublicButton: false); DestinationViewModel = new NewTypeDestinationSelectionViewModel( defaultInterfaceName, languageName, defaultNamespace, generatedNameTypeParameterSuffix, conflictingTypeNames.ToImmutableArray(), syntaxFactsService); }
private RazorLanguageService CreateLanguageServiceWith( RazorBreakpointResolver breakpointResolver = null, RazorProximityExpressionResolver proximityExpressionResolver = null, IUIThreadOperationExecutor uiThreadOperationExecutor = null, IVsEditorAdaptersFactoryService editorAdaptersFactory = null) { if (breakpointResolver is null) { breakpointResolver = new Mock <RazorBreakpointResolver>(MockBehavior.Strict).Object; Mock.Get(breakpointResolver).Setup(r => r.TryResolveBreakpointRangeAsync(It.IsAny <ITextBuffer>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <CancellationToken>())).ReturnsAsync(value: null); } if (proximityExpressionResolver is null) { proximityExpressionResolver = new Mock <RazorProximityExpressionResolver>(MockBehavior.Strict).Object; Mock.Get(proximityExpressionResolver).Setup(r => r.TryResolveProximityExpressionsAsync(It.IsAny <ITextBuffer>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <CancellationToken>())).ReturnsAsync(value: null); } uiThreadOperationExecutor ??= new TestIUIThreadOperationExecutor(); editorAdaptersFactory ??= Mock.Of <IVsEditorAdaptersFactoryService>(service => service.GetDataBuffer(It.IsAny <IVsTextBuffer>()) == new TestTextBuffer(new StringTextSnapshot(Environment.NewLine)), MockBehavior.Strict); var languageService = new RazorLanguageService(breakpointResolver, proximityExpressionResolver, uiThreadOperationExecutor, editorAdaptersFactory, JoinableTaskFactory); return(languageService); }
public InheritanceMargin( IThreadingContext threadingContext, IStreamingFindUsagesPresenter streamingFindUsagesPresenter, ClassificationTypeMap classificationTypeMap, IClassificationFormatMap classificationFormatMap, IUIThreadOperationExecutor operationExecutor, InheritanceMarginTag tag, IWpfTextView textView) { _threadingContext = threadingContext; _streamingFindUsagesPresenter = streamingFindUsagesPresenter; _workspace = tag.Workspace; _operationExecutor = operationExecutor; _textView = textView; InitializeComponent(); // ZoomLevel of textView is percentage based. (e.g. 20 -> 400 means 20% -> 400%) // and the scaleFactor of CrispImage is 1 based. (e.g 1 means 100%) var scaleFactor = textView.ZoomLevel; var viewModel = InheritanceMarginViewModel.Create(classificationTypeMap, classificationFormatMap, tag, scaleFactor); DataContext = viewModel; ContextMenu.DataContext = viewModel; ToolTip = new ToolTip { Content = viewModel.ToolTipTextBlock, Style = (Style)FindResource("ToolTipStyle") }; }
public VisualStudioSuppressionFixService( SVsServiceProvider serviceProvider, VisualStudioWorkspaceImpl workspace, IDiagnosticAnalyzerService diagnosticService, ICodeFixService codeFixService, ICodeActionEditHandlerService editHandlerService, IVisualStudioDiagnosticListSuppressionStateService suppressionStateService, IUIThreadOperationExecutor uiThreadOperationExecutor, IVsHierarchyItemManager vsHierarchyItemManager, IAsynchronousOperationListenerProvider listenerProvider, IGlobalOptionService globalOptions) { _workspace = workspace; _diagnosticService = diagnosticService; _buildErrorDiagnosticService = workspace.ExternalErrorDiagnosticUpdateSource; _codeFixService = codeFixService; _suppressionStateService = (VisualStudioDiagnosticListSuppressionStateService)suppressionStateService; _editHandlerService = editHandlerService; _uiThreadOperationExecutor = uiThreadOperationExecutor; _vsHierarchyItemManager = vsHierarchyItemManager; _fixMultipleOccurencesService = workspace.Services.GetRequiredService <IFixMultipleOccurrencesService>(); _projectMap = workspace.Services.GetRequiredService <IHierarchyItemToProjectIdMap>(); var errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList; _tableControl = errorList?.TableControl; _listener = listenerProvider.GetListener(FeatureAttribute.ErrorList); _globalOptions = globalOptions; }
public CSharpTextStructureNavigatorProvider( ITextStructureNavigatorSelectorService selectorService, IContentTypeRegistryService contentTypeService, IUIThreadOperationExecutor uIThreadOperationExecutor) : base(selectorService, contentTypeService, uIThreadOperationExecutor) { }
public DocumentationCommentCommandHandler( IUIThreadOperationExecutor uiThreadOperationExecutor, ITextUndoHistoryRegistry undoHistoryRegistry, IEditorOperationsFactoryService editorOperationsFactoryService) : base(uiThreadOperationExecutor, undoHistoryRegistry, editorOperationsFactoryService) { }
public SyncNamespacesCommandHandler( IUIThreadOperationExecutor threadOperationExecutor, VisualStudioWorkspace workspace, IGlobalOptionService globalOptions) { _threadOperationExecutor = threadOperationExecutor; _workspace = workspace; _globalOptions = globalOptions; }
public NavigableSymbolSource( IThreadingContext threadingContext, IStreamingFindUsagesPresenter streamingPresenter, IUIThreadOperationExecutor uiThreadOperationExecutor) { _threadingContext = threadingContext; _presenter = streamingPresenter; _uiThreadOperationExecutor = uiThreadOperationExecutor; }
public PeekableItemSourceProvider( IPeekableItemFactory peekableItemFactory, IPeekResultFactory peekResultFactory, IUIThreadOperationExecutor uiThreadOperationExecutor) { _peekableItemFactory = peekableItemFactory; _peekResultFactory = peekResultFactory; _uiThreadOperationExecutor = uiThreadOperationExecutor; }
public NavigateToItemDisplayFactory( IThreadingContext threadingContext, IUIThreadOperationExecutor threadOperationExecutor, IAsynchronousOperationListener asyncListener) { _threadingContext = threadingContext; _threadOperationExecutor = threadOperationExecutor; _asyncListener = asyncListener; }
public NavigationBarControllerFactoryService( IThreadingContext threadingContext, IUIThreadOperationExecutor uIThreadOperationExecutor, IAsynchronousOperationListenerProvider listenerProvider) { _threadingContext = threadingContext; _uIThreadOperationExecutor = uIThreadOperationExecutor; _asyncListener = listenerProvider.GetListener(FeatureAttribute.NavigationBar); }
public VisualStudioExtractClassOptionsService( IThreadingContext threadingContext, IGlyphService glyphService, IUIThreadOperationExecutor uiThreadOperationExecutor) { _threadingContext = threadingContext; _glyphService = glyphService; _uiThreadOperationExecutor = uiThreadOperationExecutor; }
public StaticMemberSelectionViewModel( IUIThreadOperationExecutor uiThreadOperationExecutor, ImmutableArray <SymbolViewModel <ISymbol> > members, ImmutableDictionary <ISymbol, Task <ImmutableArray <ISymbol> > > dependentsMap) { _uiThreadOperationExecutor = uiThreadOperationExecutor; _members = members; _symbolToDependentsMap = dependentsMap; _symbolToMemberViewMap = members.ToImmutableDictionary(memberViewModel => memberViewModel.Symbol); }
public NavigationBarControllerFactoryService( IThreadingContext threadingContext, [Import(AllowDefault = true)] ITextBufferVisibilityTracker?visibilityTracker, IUIThreadOperationExecutor uIThreadOperationExecutor, IAsynchronousOperationListenerProvider listenerProvider) { _threadingContext = threadingContext; _visibilityTracker = visibilityTracker; _uIThreadOperationExecutor = uIThreadOperationExecutor; _asyncListener = listenerProvider.GetListener(FeatureAttribute.NavigationBar); }
public VisualStudioNavigateToItemProviderFactory( VisualStudioWorkspace workspace, IThreadingContext threadingContext, IUIThreadOperationExecutor threadOperationExecutor, IAsynchronousOperationListenerProvider listenerProvider) { _workspace = workspace; _threadingContext = threadingContext; _threadOperationExecutor = threadOperationExecutor; _asyncListener = listenerProvider.GetListener(FeatureAttribute.NavigateTo); }
public GoToBaseCommandHandler( IThreadingContext threadingContext, IStreamingFindUsagesPresenter streamingPresenter, IUIThreadOperationExecutor uiThreadOperationExecutor, IAsynchronousOperationListenerProvider listenerProvider) : base(threadingContext, streamingPresenter, uiThreadOperationExecutor, listenerProvider.GetListener(FeatureAttribute.GoToBase)) { }
public CompletionSourceProvider( IThreadingContext threadingContext, IUIThreadOperationExecutor operationExecutor, IAsynchronousOperationListenerProvider listenerProvider, Lazy <IStreamingFindUsagesPresenter> streamingPresenter) { _threadingContext = threadingContext; _operationExecutor = operationExecutor; _streamingPresenter = streamingPresenter; _listener = listenerProvider.GetListener(FeatureAttribute.CompletionSet); }
public NavigableSymbolSource( IThreadingContext threadingContext, IStreamingFindUsagesPresenter streamingPresenter, IUIThreadOperationExecutor uiThreadOperationExecutor, IAsynchronousOperationListenerProvider listenerProvider) { _threadingContext = threadingContext; _presenter = streamingPresenter; _uiThreadOperationExecutor = uiThreadOperationExecutor; _listenerProvider = listenerProvider; }
public NavigateToItemDisplay( IThreadingContext threadingContext, IUIThreadOperationExecutor threadOperationExecutor, IAsynchronousOperationListener asyncListener, INavigateToSearchResult searchResult) { _threadingContext = threadingContext; _threadOperationExecutor = threadOperationExecutor; _asyncListener = asyncListener; _searchResult = searchResult; }
public TestResetInteractive( IUIThreadOperationExecutor uiThreadOperationExecutor, EditorOptionsService editorOptionsService, Func <string, string> createReference, Func <string, string> createImport, bool buildSucceeds) : base(editorOptionsService, createReference, createImport) { _uiThreadOperationExecutor = uiThreadOperationExecutor; _buildSucceeds = buildSucceeds; }
public RemoveUnusedReferencesCommandHandler( RemoveUnusedReferencesDialogProvider unusedReferenceDialogProvider, IUIThreadOperationExecutor threadOperationExecutor, VisualStudioWorkspace workspace) { _unusedReferenceDialogProvider = unusedReferenceDialogProvider; _threadOperationExecutor = threadOperationExecutor; _workspace = workspace; _lazyReferenceCleanupService = new(() => workspace.Services.GetRequiredService <IReferenceCleanupService>()); }
public GoToDefinitionCommandHandler( IGlobalOptionService globalOptionService, IThreadingContext threadingContext, IUIThreadOperationExecutor executor, IAsynchronousOperationListenerProvider listenerProvider) { _globalOptionService = globalOptionService; _threadingContext = threadingContext; _executor = executor; _listener = listenerProvider.GetListener(FeatureAttribute.GoToDefinition); }