public SyntaxQuickinfoBuilderService(IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistryService) { _classificationFormatMapService = classificationFormatMapService; _classificationMap = ClassificationTypeDefinitions.GetSyntaxTokenClassificationMap(classificationTypeRegistryService); }
public FindResultsClassifier( IVscSettingsService settingsService, IVisualStudioEventsService vsEventsService, IClassificationTypeRegistryService typeRegistryService, IClassificationFormatMapService formatMapService, IVsFontAndColorStorage fontAndColorStorageService, DTE2 dte) : base(settingsService, vsEventsService, typeRegistryService, formatMapService, fontAndColorStorageService, "find results") { this.Dte = dte; IsEnabled = true; AddClassificationType(ClassificationNames.FindResultsOutputMatch); OutputWindowTextClassificationOverride = ClassificationNames.OutputText; ShouldOverrideOutputWindowTextClassification = true; RefreshClassifications(); }
internal BlockCaretFactoryService(IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService formatMapService, IControlCharUtil controlCharUtil, IVimProtectedOperations protectedOperations) { _classificationFormatMapService = classificationFormatMapService; _formatMapService = formatMapService; _controlCharUtil = controlCharUtil; _protectedOperations = protectedOperations; }
BreakpointsVM(IDecompilerService decompilerService, IDebuggerSettings debuggerSettings, ITheDebugger theDebugger, IBreakpointService breakpointService, IBreakpointSettings breakpointSettings, Lazy<IModuleLoader> moduleLoader, IInMemoryModuleService inMemoryModuleService, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); breakpointContext = new BreakpointContext(moduleLoader, classificationFormatMap, textElementProvider) { Decompiler = decompilerService.Decompiler, SyntaxHighlight = debuggerSettings.SyntaxHighlightBreakpoints, UseHexadecimal = debuggerSettings.UseHexadecimal, ShowTokens = breakpointSettings.ShowTokens, ShowModuleNames = breakpointSettings.ShowModuleNames, ShowParameterTypes = breakpointSettings.ShowParameterTypes, ShowParameterNames = breakpointSettings.ShowParameterNames, ShowOwnerTypes = breakpointSettings.ShowOwnerTypes, ShowReturnTypes = breakpointSettings.ShowReturnTypes, ShowNamespaces = breakpointSettings.ShowNamespaces, ShowTypeKeywords = breakpointSettings.ShowTypeKeywords, }; this.breakpointService = breakpointService; this.theDebugger = theDebugger; breakpointList = new ObservableCollection<BreakpointVM>(); breakpointSettings.PropertyChanged += BreakpointSettings_PropertyChanged; breakpointService.BreakpointsAdded += BreakpointService_BreakpointsAdded; breakpointService.BreakpointsRemoved += BreakpointService_BreakpointsRemoved; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; decompilerService.DecompilerChanged += DecompilerService_DecompilerChanged; inMemoryModuleService.DynamicModulesLoaded += InMemoryModuleService_DynamicModulesLoaded; foreach (var bp in breakpointService.GetBreakpoints()) AddBreakpoint(bp); }
public ClassificationColorManager(ThemeManager themeManager, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistryService) { _themeManager = themeManager; _classificationFormatMapService = classificationFormatMapService; _classificationTypeRegistryService = classificationTypeRegistryService; _themeColors = new Dictionary<VisualStudioTheme, IDictionary<string, Color>>(); _lastTheme = VisualStudioTheme.Unknown; // Light / Blue theme colors var lightAndBlueColors = new Dictionary<string, Color> { { SemanticClassificationMetadata.PunctuationClassificationTypeName, Colors.Black }, { SemanticClassificationMetadata.SemanticClassificationTypeName, Color.FromRgb(85, 107, 47) }, { SemanticClassificationMetadata.PackOffsetClassificationTypeName, Colors.Purple }, { SemanticClassificationMetadata.RegisterLocationClassificationTypeName, Colors.LightCoral }, { SemanticClassificationMetadata.NamespaceClassificationTypeName, Colors.Black }, { SemanticClassificationMetadata.GlobalVariableClassificationTypeName, Color.FromRgb(72, 61, 139) }, { SemanticClassificationMetadata.FieldIdentifierClassificationTypeName, Color.FromRgb(139, 0, 139) }, { SemanticClassificationMetadata.LocalVariableClassificationTypeName, Colors.Black }, { SemanticClassificationMetadata.ConstantBufferVariableClassificationTypeName, Color.FromRgb(72, 61, 139) }, { SemanticClassificationMetadata.ParameterClassificationTypeName, Colors.Black }, { SemanticClassificationMetadata.FunctionClassificationTypeName, Color.FromRgb(0, 139, 139) }, { SemanticClassificationMetadata.MethodClassificationTypeName, Color.FromRgb(0, 139, 139) }, { SemanticClassificationMetadata.ClassIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) }, { SemanticClassificationMetadata.StructIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) }, { SemanticClassificationMetadata.InterfaceIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) }, { SemanticClassificationMetadata.ConstantBufferIdentifierClassificationTypeName, Color.FromRgb(0, 0, 139) } }; _themeColors.Add(VisualStudioTheme.Blue, lightAndBlueColors); _themeColors.Add(VisualStudioTheme.Light, lightAndBlueColors); _themeColors.Add(VisualStudioTheme.Unknown, lightAndBlueColors); // Dark theme colors var darkColors = new Dictionary<string, Color> { { SemanticClassificationMetadata.PunctuationClassificationTypeName, Colors.White }, { SemanticClassificationMetadata.SemanticClassificationTypeName, Color.FromRgb(144, 238, 144) }, { SemanticClassificationMetadata.PackOffsetClassificationTypeName, Colors.Pink }, { SemanticClassificationMetadata.RegisterLocationClassificationTypeName, Colors.LightCoral }, { SemanticClassificationMetadata.NamespaceClassificationTypeName, Colors.White }, { SemanticClassificationMetadata.GlobalVariableClassificationTypeName, Color.FromRgb(173, 216, 230) }, { SemanticClassificationMetadata.FieldIdentifierClassificationTypeName, Color.FromRgb(221, 160, 221) }, { SemanticClassificationMetadata.LocalVariableClassificationTypeName, Color.FromRgb(220, 220, 220) }, { SemanticClassificationMetadata.ConstantBufferVariableClassificationTypeName, Color.FromRgb(173, 216, 230) }, { SemanticClassificationMetadata.ParameterClassificationTypeName, Color.FromRgb(220, 220, 220) }, { SemanticClassificationMetadata.FunctionClassificationTypeName, Color.FromRgb(0, 255, 255) }, { SemanticClassificationMetadata.MethodClassificationTypeName, Color.FromRgb(0, 255, 255) }, { SemanticClassificationMetadata.ClassIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) }, { SemanticClassificationMetadata.StructIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) }, { SemanticClassificationMetadata.InterfaceIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) }, { SemanticClassificationMetadata.ConstantBufferIdentifierClassificationTypeName, Color.FromRgb(173, 216, 230) } }; _themeColors.Add(VisualStudioTheme.Dark, darkColors); }
public VignetteCodeColorBuilder( IRInteractiveWorkflowProvider workflowProvider, IClassificationFormatMapService cfms, IClassificationTypeRegistryService ctrs) { _workflowProvider = workflowProvider; _formatMapService = cfms; _classificationRegistryService = ctrs; }
public SymbolQuickInfoSourceProvider(ITextStructureNavigatorSelectorService navigatorService, ITextBufferFactoryService textBufferFactoryService, CodeContentControlProvider codeContentControlProvider, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistryService) { SyntaxQuickinfoBuilderService = new SyntaxQuickinfoBuilderService(classificationFormatMapService, classificationTypeRegistryService); }
GoToDefinitionAdorner(IWpfTextView textTextView, IComponentModel componentModel) { _textView = textTextView; _classicationFormatMapService = componentModel.GetService<IClassificationFormatMapService>(); _classifier = componentModel.GetService<IViewClassifierAggregatorService>().GetClassifier(textTextView); _adornmentLayer = textTextView.GetAdornmentLayer(AdornerName); _textView.Closed += OnTextViewClosed; }
internal CommandMarginProvider( IVim vim, IEditorFormatMapService editorFormatMapService, IClassificationFormatMapService classificationFormatMapService) { _vim = vim; _editorFormatMapService = editorFormatMapService; _classificationFormatMapService = classificationFormatMapService; }
public QuickInfoSource( IClassificationFormatMapService classificationFormatMapService, HlslClassificationService classificationService, DispatcherGlyphService dispatcherGlyphService) { _classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("text"); _tooltipClassificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("tooltip"); _classificationService = classificationService; _dispatcherGlyphService = dispatcherGlyphService; }
AppSettingsService(IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider, IAppWindow appWindow, ITreeViewService treeViewService, ITreeViewNodeTextElementProvider treeViewNodeTextElementProvider, [ImportMany] IEnumerable<Lazy<IAppSettingsPageContainer, IAppSettingsPageContainerMetadata>> appSettingsPageContainers, [ImportMany] IEnumerable<Lazy<IAppSettingsPageProvider>> appSettingsPageProviders, [ImportMany] IEnumerable<Lazy<IAppSettingsModifiedListener, IAppSettingsModifiedListenerMetadata>> appSettingsModifiedListeners) { classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.textElementProvider = textElementProvider; this.appWindow = appWindow; this.treeViewService = treeViewService; this.treeViewNodeTextElementProvider = treeViewNodeTextElementProvider; this.appSettingsPageContainers = appSettingsPageContainers.OrderBy(a => a.Metadata.Order).ToArray(); this.appSettingsPageProviders = appSettingsPageProviders.ToArray(); this.appSettingsModifiedListeners = appSettingsModifiedListeners.OrderBy(a => a.Metadata.Order).ToArray(); }
public RegistryQuickInfoSource( ITextBuffer buffer, IGlyphService glyphService, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationRegistry ) { _buffer = buffer; _glyphService = glyphService; _classificationFormatMapService = classificationFormatMapService; _classificationRegistry = classificationRegistry; }
private HACK_ThemeColorFixer( IClassificationTypeRegistryService classificationTypeRegistryService, IClassificationFormatMapService classificationFormatMapService) { _classificationTypeRegistryService = classificationTypeRegistryService; _classificationFormatMapService = classificationFormatMapService; // Note: We never unsubscribe from this event. This service lives for the lifetime of VS. _classificationFormatMapService.GetClassificationFormatMap("text").ClassificationFormatMappingChanged += TextFormatMap_ClassificationFormatMappingChanged; // make this to run on UI thread when there is no work for the application VsTaskLibraryHelper.CreateAndStartTask(VsTaskLibraryHelper.ServiceInstance, VsTaskRunContext.UIThreadIdlePriority, RefreshThemeColors); }
public TextInformationManager(IServiceProvider serviceProvider, IComponentModel componentModel) { this.serviceProvider = serviceProvider; this.componentModel = componentModel; fontAndColorStorage = (IVsFontAndColorStorage) serviceProvider.GetService(typeof (SVsFontAndColorStorage)); fontAndColorUtilities = fontAndColorStorage as IVsFontAndColorUtilities; fontAndColorCache = (IVsFontAndColorCacheManager)serviceProvider.GetService(typeof(SVsFontAndColorCacheManager)); textManager = (IVsTextManager) serviceProvider.GetService(typeof (SVsTextManager)); editorAdaptersFactoryService = componentModel.GetService<IVsEditorAdaptersFactoryService>(); textStructureNavigatorSelectorService = componentModel.GetService<ITextStructureNavigatorSelectorService>(); classicationFormatMapService = componentModel.GetService<IClassificationFormatMapService>(); classificationAggregatorService = componentModel.GetService<IClassifierAggregatorService>(); }
public NitraEditorClassifier(IClassificationTypeRegistryService registry, IClassificationFormatMapService formatMapService, ITextBuffer buffer) { var currentSnapshot = buffer.CurrentSnapshot; _registry = registry; _classificationFormatMapService = formatMapService; _buffer = buffer; _classificationType = registry.GetClassificationType("EditorClassifier"); for (int i = 0; i < _spanInfos.Length; i++) { _spanInfos[i] = ImmutableArray<SpanInfo>.Empty; _snapshots[i] = currentSnapshot; } }
ModulesVM(ITheDebugger theDebugger, IDebuggerSettings debuggerSettings, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.theDebugger = theDebugger; moduleContext = new ModuleContext(theDebugger, classificationFormatMap, textElementProvider) { SyntaxHighlight = debuggerSettings.SyntaxHighlightModules, UseHexadecimal = debuggerSettings.UseHexadecimal, }; modulesList = new ObservableCollection<ModuleVM>(); theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; if (theDebugger.ProcessState != DebuggerProcessState.Terminated) InstallDebuggerHooks(theDebugger.Debugger); }
public OutputWindowPaneClassifier( IVscSettingsService settingsService, IVisualStudioEventsService vsEventsService, IClassificationTypeRegistryService typeRegistryService, IClassificationFormatMapService formatMapService, IVsFontAndColorStorage fontAndColorStorageService, string classificationMapName) : base(settingsService, vsEventsService, typeRegistryService, formatMapService, fontAndColorStorageService, classificationMapName) { }
public MainWindow() { InitializeComponent(); #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif _vimComponentHost = new VimComponentHost(); _vimComponentHost.CompositionContainer.GetExportedValue<VimAppHost>().MainWindow = this; _classificationFormatMapService = _vimComponentHost.CompositionContainer.GetExportedValue<IClassificationFormatMapService>(); // Create the initial view to display AddNewTab("Empty Doc"); }
ThreadsVM(ITheDebugger theDebugger, IStackFrameService stackFrameService, IDebuggerSettings debuggerSettings, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { this.theDebugger = theDebugger; this.stackFrameService = stackFrameService; var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); threadContext = new ThreadContext(theDebugger, debuggerSettings, classificationFormatMap, textElementProvider) { SyntaxHighlight = debuggerSettings.SyntaxHighlightThreads, UseHexadecimal = debuggerSettings.UseHexadecimal, }; threadsList = new ObservableCollection<ThreadVM>(); stackFrameService.StackFramesUpdated += StackFrameService_StackFramesUpdated; stackFrameService.PropertyChanged += StackFrameService_PropertyChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; }
private HACK_ThemeColorFixer( SVsServiceProvider serviceProvider, IClassificationTypeRegistryService classificationTypeRegistryService, IClassificationFormatMapService classificationFormatMapService) : base(assertIsForeground: true) { _classificationTypeRegistryService = classificationTypeRegistryService; _classificationFormatMapService = classificationFormatMapService; var shell = serviceProvider.GetService(typeof(SVsShell)) as IVsShell; // Note: We never unhook this event sink. It lives for the lifetime of VS. uint cookie; shell.AdviseBroadcastMessages(this, out cookie); // make this to run on UI thread when there is no work for the application VsTaskLibraryHelper.CreateAndStartTask(VsTaskLibraryHelper.ServiceInstance, VsTaskRunContext.UIThreadIdlePriority, RefreshThemeColors); }
public MainWindow() { InitializeComponent(); #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif _vimComponentHost = new VimComponentHost(); _vimComponentHost.CompositionContainer.GetExportedValue<DefaultVimHost>().MainWindow = this; _classificationFormatMapService = _vimComponentHost.CompositionContainer.GetExportedValue<IClassificationFormatMapService>(); _textBuffer = _vimComponentHost.TextBufferFactoryService.CreateTextBuffer(); var textViewHost = CreateTextViewHost(); _textViewHostList.Add(textViewHost); m_dockPanel.Children.Add(textViewHost.HostControl); }
public MarginCore(IWpfTextView textView, IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService) { _textView = textView; _classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(textView); _editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView); _editorFormatMap.FormatMappingChanged += HandleFormatMappingChanged; _textView.Options.OptionChanged += HandleOptionChanged; _textView.Closed += (sender, e) => { _editorFormatMap.FormatMappingChanged -= HandleFormatMappingChanged; }; UpdateBrushes(); }
public VisualStudioEventsService( IVscUIService uiService, IServiceProvider serviceProvider, IClassificationFormatMapService classificationFormatMapService) { this.UIService = uiService; this.ServiceProvider = serviceProvider; this.ClassificationFormatMapService = classificationFormatMapService; TextClassificationFormatMap = ClassificationFormatMapService.GetClassificationFormatMap("text"); TextClassificationFormatMap.ClassificationFormatMappingChanged += (s, e) => RaiseAfterTextColorSettingsChanged(); VsShellPropertyEvents = new VsShellPropertyEventsHandler(serviceProvider); VsShellPropertyEvents.AfterShellPropertyChanged += VsShellPropertyEvents_AfterShellPropertyChanged; BroadsMessagesEvents = new BroadcastMessagesEventsHandler(serviceProvider); BroadsMessagesEvents.AfterMessageBroadcast += BroadsMessagesEvents_AfterMessageBroadcast; }
public VscClassifier( IVscSettingsService settingsService, IVisualStudioEventsService vsEventsService, IClassificationTypeRegistryService typeRegistryService, IClassificationFormatMapService formatMapService, IVsFontAndColorStorage fontAndColorStorageService, string mapName) { this.SettingsService = settingsService; this.VisualStudioEventsService = vsEventsService; this.ClassificationTypeRegistryService = typeRegistryService; this.ClassificationFormatMapService = formatMapService; this.FontAndColorStorageService = fontAndColorStorageService; this.ClassificationMapName = mapName; vsEventsService.AfterVisualStudioThemeChanged += (s, e) => RefreshClassifications(); vsEventsService.AfterTextColorSettingsChanged += (s, e) => RefreshClassifications(); vsEventsService.AfterVSCommandsColorSettingsChanged += (s, e) => RefreshClassifications(); }
public void Initialize(IClassificationTypeRegistryService registry, IClassificationFormatMapService formatMapService) { if (Interlocked.CompareExchange(ref _initialized, 1, 0) == 1) return; try { _classificationTypeRegistry = registry; _formatMapService = formatMapService; Settings.SettingsUpdated += (sender, args) => { UpdateClassifiers(); UpdateFormatMap(); }; } catch (Exception ex) { Log.LogError(ex.ToString()); throw; } }
public OutputWindowColoringClasifierProvider( IServiceProvider serviceProvider, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistryService ) { this.SettingsService = VscServices.Instance.Container.Resolve<IVscSettingsService>(); this.VisualStudioEventsService = VscServices.Instance.Container.Resolve<IVisualStudioEventsService>(); this.ClassificationFormatMapService = classificationFormatMapService; this.ClassificationTypeRegistryService = classificationTypeRegistryService; var fontAndColorStorageService = serviceProvider.GetService(typeof(SVsFontAndColorStorage)) as IVsFontAndColorStorage; Classifier = new OutputClassifier( SettingsService, VisualStudioEventsService, ClassificationTypeRegistryService, ClassificationFormatMapService, fontAndColorStorageService); }
internal ClassificationTypeMap( IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService registryService) { this.ClassificationFormatMapService = classificationFormatMapService; _registryService = registryService; // Prepopulate the identity map with the constant string values from ClassificationTypeNames var fields = typeof(ClassificationTypeNames).GetFields(); _identityMap = new Dictionary<string, IClassificationType>(fields.Length, ReferenceEqualityComparer.Instance); foreach (var field in fields) { var value = (string)field.GetValue(null); // The strings returned from reflection do not have reference-identity // with the string constants used by the compiler. Fortunately, a call // to string.Intern fixes them. value = string.Intern(value); _identityMap.Add(value, registryService.GetClassificationType(value)); } }
protected ClassificationColorManagerBase(ThemeManager themeManager, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistryService) { _themeManager = themeManager; _classificationFormatMapService = classificationFormatMapService; _classificationTypeRegistryService = classificationTypeRegistryService; _themeColors = new Dictionary<VisualStudioTheme, IDictionary<string, Color>>(); _lastTheme = VisualStudioTheme.Unknown; // Light / Blue theme colors var lightAndBlueColors = CreateLightAndBlueColors(); _themeColors.Add(VisualStudioTheme.Blue, lightAndBlueColors); _themeColors.Add(VisualStudioTheme.Light, lightAndBlueColors); _themeColors.Add(VisualStudioTheme.Unknown, lightAndBlueColors); // Dark theme colors var darkColors = CreateDarkColors(); _themeColors.Add(VisualStudioTheme.Dark, darkColors); }
public CodeBackgroundTextAdornment(IWpfTextView view, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistry) { _view = view; _layer = view.GetAdornmentLayer("CodeBackgroundTextAdornment"); _classificationTypeRegistry = classificationTypeRegistry; _classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(view); // Advise to events _classificationFormatMap.ClassificationFormatMappingChanged += OnClassificationFormatMappingChanged; _view.LayoutChanged += OnLayoutChanged; _view.Closed += OnClosed; var projectionBufferManager = ServiceManager.GetService<IProjectionBufferManager>(view.TextBuffer); if (projectionBufferManager != null) { projectionBufferManager.MappingsChanged += OnMappingsChanged; _contanedLanguageHandler = ServiceManager.GetService<IContainedLanguageHandler>(projectionBufferManager.DiskBuffer); } FetchColors(); }
public OutputClassifier( IVscSettingsService settingsService, IVisualStudioEventsService vsEventsService, IClassificationTypeRegistryService typeRegistryService, IClassificationFormatMapService formatMapService, IVsFontAndColorStorage fontAndColorStorageService) : base(settingsService, vsEventsService, typeRegistryService, formatMapService, fontAndColorStorageService, "output") { IsEnabled = true; // TODO: get from actual configuration and react to any changes var Config = new Configuration(); AddClassificationType(ClassificationNames.OutputError, Config.OutputErrorClassificationPattern); AddClassificationType(ClassificationNames.OutputWarning, Config.OutputWarningClassificationPattern); AddClassificationType(ClassificationNames.OutputInformation, Config.OutputInformationClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputBuildSummarySuccess, Config.BuildOutputBuildSummarySuccessClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputBuildSummaryFailed, Config.BuildOutputBuildSummaryFailedClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputCodeContractsInformation, Config.BuildOutputCodeContractsInformationClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputProjectBuildStart, Config.BuildOutputProjectBuildStartClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputBuildSummary, Config.BuildOutputBuildSummaryClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputBuildSummaryTotal, Config.BuildOutputBuildSummaryTotalClassificationPattern); AddClassificationType(ClassificationNames.BuildOutputProjectBuildSkipped, Config.BuildOutputProjectBuildSkippedClassificationPattern); AddClassificationType(ClassificationNames.TfsOutputError, Config.TfsOutputErrorClassificationPattern); AddClassificationType(ClassificationNames.TfsOutputWarning, Config.TfsOutputWarningClassificationPattern); AddClassificationType(ClassificationNames.TfsOutputSuccess, Config.TfsOutputSuccessClassificationPattern); OutputWindowTextClassificationOverride = ClassificationNames.OutputText; ShouldOverrideOutputWindowTextClassification = true; RefreshClassifications(); }
public DocumentationCommentDeferredContentConverter(ClassificationTypeMap typeMap, IClassificationFormatMapService classificationFormatMapService) { _typeMap = typeMap; _classificationFormatMapService = classificationFormatMapService; }
TaggedTextElementProviderService(ITextClassifierAggregatorService textClassifierAggregatorService, IClassificationFormatMapService classificationFormatMapService) { this.textClassifierAggregatorService = textClassifierAggregatorService; this.classificationFormatMapService = classificationFormatMapService; }
ThreadsVM(ITheDebugger theDebugger, IStackFrameService stackFrameService, IDebuggerSettings debuggerSettings, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { this.theDebugger = theDebugger; this.stackFrameService = stackFrameService; var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.ThreadsWindow); this.threadContext = new ThreadContext(theDebugger, debuggerSettings, classificationFormatMap, textElementProvider) { SyntaxHighlight = debuggerSettings.SyntaxHighlightThreads, UseHexadecimal = debuggerSettings.UseHexadecimal, }; this.threadsList = new ObservableCollection <ThreadVM>(); stackFrameService.StackFramesUpdated += StackFrameService_StackFramesUpdated; stackFrameService.PropertyChanged += StackFrameService_PropertyChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; }
CompletionTextElementProviderService(Lazy <ICompletionClassifierAggregatorService> completionClassifierAggregatorService, IClassificationFormatMapService classificationFormatMapService) { this.completionClassifierAggregatorService = completionClassifierAggregatorService; this.classificationFormatMapService = classificationFormatMapService; }
public LineNumberMargin(IWpfTextViewHost wpfTextViewHost, IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypes themeClassificationTypes, ITextFormatterProvider textFormatterProvider) : base(PredefinedMarginNames.LineNumber, wpfTextViewHost, classificationFormatMapService, textFormatterProvider) { this.lineNumberClassificationType = themeClassificationTypes.GetClassificationType(TextColor.LineNumber); }
CallStackVM(IDebuggerSettings debuggerSettings, ICallStackSettings callStackSettings, IStackFrameService stackFrameService, ITheDebugger theDebugger, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.CallStackWindow); this.debuggerSettings = debuggerSettings; this.callStackSettings = callStackSettings; this.theDebugger = theDebugger; this.stackFrameService = stackFrameService; this.framesList = new ObservableCollection <ICallStackFrameVM>(); this.callStackFrameContext = new CallStackFrameContext(classificationFormatMap, textElementProvider) { TypePrinterFlags = TypePrinterFlags, SyntaxHighlight = debuggerSettings.SyntaxHighlightCallStack, }; stackFrameService.StackFramesUpdated += StackFrameService_StackFramesUpdated; stackFrameService.PropertyChanged += StackFrameService_PropertyChanged; callStackSettings.PropertyChanged += CallStackSettings_PropertyChanged; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; }
BreakpointsVM(IDecompilerService decompilerService, IDebuggerSettings debuggerSettings, ITheDebugger theDebugger, IBreakpointService breakpointService, IBreakpointSettings breakpointSettings, Lazy <IModuleLoader> moduleLoader, IInMemoryModuleService inMemoryModuleService, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); breakpointContext = new BreakpointContext(moduleLoader, classificationFormatMap, textElementProvider) { Decompiler = decompilerService.Decompiler, SyntaxHighlight = debuggerSettings.SyntaxHighlightBreakpoints, UseHexadecimal = debuggerSettings.UseHexadecimal, ShowTokens = breakpointSettings.ShowTokens, ShowModuleNames = breakpointSettings.ShowModuleNames, ShowParameterTypes = breakpointSettings.ShowParameterTypes, ShowParameterNames = breakpointSettings.ShowParameterNames, ShowOwnerTypes = breakpointSettings.ShowOwnerTypes, ShowReturnTypes = breakpointSettings.ShowReturnTypes, ShowNamespaces = breakpointSettings.ShowNamespaces, ShowTypeKeywords = breakpointSettings.ShowTypeKeywords, }; this.breakpointService = breakpointService; this.theDebugger = theDebugger; breakpointList = new ObservableCollection <BreakpointVM>(); breakpointSettings.PropertyChanged += BreakpointSettings_PropertyChanged; breakpointService.BreakpointsAdded += BreakpointService_BreakpointsAdded; breakpointService.BreakpointsRemoved += BreakpointService_BreakpointsRemoved; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; decompilerService.DecompilerChanged += DecompilerService_DecompilerChanged; inMemoryModuleService.DynamicModulesLoaded += InMemoryModuleService_DynamicModulesLoaded; foreach (var bp in breakpointService.GetBreakpoints()) { AddBreakpoint(bp); } }
public ClassificationColorManager(ThemeManager themeManager, IClassificationFormatMapService classificationFormatMapService, IClassificationTypeRegistryService classificationTypeRegistryService) : base(themeManager, classificationFormatMapService, classificationTypeRegistryService) { }
CompletionTextElementProviderService(Lazy <ITextClassifierAggregatorService> textClassifierAggregatorService, IClassificationFormatMapService classificationFormatMapService, IContentTypeRegistryService contentTypeRegistryService) { this.textClassifierAggregatorService = textClassifierAggregatorService; this.classificationFormatMapService = classificationFormatMapService; this.contentTypeRegistryService = contentTypeRegistryService; }
protected LineNumberMarginBase(string marginName, IWpfTextViewHost wpfTextViewHost, IClassificationFormatMapService classificationFormatMapService, ITextFormatterProvider textFormatterProvider) { if (classificationFormatMapService is null) { throw new ArgumentNullException(nameof(classificationFormatMapService)); } identityTagToLine = new Dictionary <object, Line>(); this.marginName = marginName ?? throw new ArgumentNullException(nameof(marginName)); this.wpfTextViewHost = wpfTextViewHost ?? throw new ArgumentNullException(nameof(wpfTextViewHost)); classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(wpfTextViewHost.TextView); textLayer = new Layer(); this.textFormatterProvider = textFormatterProvider ?? throw new ArgumentNullException(nameof(textFormatterProvider)); Children.Add(textLayer); wpfTextViewHost.TextView.Options.OptionChanged += Options_OptionChanged; IsVisibleChanged += LineNumberMargin_IsVisibleChanged; ClipToBounds = true; IsHitTestVisible = false; UpdateVisibility(); }
Loader(IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.TextEditor); CilObjectConverter.textElementProvider = textElementProvider; }
public XSharpQuickInfoSource(XSharpQuickInfoSourceProvider provider, ITextBuffer subjectBuffer, IClassificationFormatMapService formatMap, IClassificationTypeRegistryService registry) { _provider = provider; _subjectBuffer = subjectBuffer; _file = _subjectBuffer.GetFile(); _formatMap = formatMap; _registry = registry; var package = XSharpProjectPackage.Instance; _optionsPage = package.GetIntellisenseOptionsPage(); }
SignatureHelpPresenterProvider(ITextBufferFactoryService textBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, IClassifierAggregatorService classifierAggregatorService, IClassificationFormatMapService classificationFormatMapService) { this.textBufferFactoryService = textBufferFactoryService; this.contentTypeRegistryService = contentTypeRegistryService; this.classifierAggregatorService = classifierAggregatorService; this.classificationFormatMapService = classificationFormatMapService; }
private static void IncreaseCommentFormatTypesPrioirity(IClassificationTypeRegistryService registry, IClassificationFormatMapService formatMapService, IClassificationType highestPriorityType) { bool lockTaken = false; Monitor.TryEnter(_syncRoot, ref lockTaken); if (lockTaken) { try { if (!_isPriorityIncreased) { _isPriorityIncreased = true; IClassificationFormatMap formatMap = formatMapService.GetClassificationFormatMap(category: TextCategory); IncreaseServiceFormatPriority(formatMap, registry, PredefinedClassificationTypeNames.ExcludedCode, highestPriorityType); IncreaseServiceFormatPriority(formatMap, registry, PredefinedClassificationTypeNames.Comment, highestPriorityType); } } finally { Monitor.Exit(_syncRoot); } } }
public VignetteCodeColorBuilder(ICoreShell shell) { _workflowProvider = shell.GetService <IRInteractiveWorkflowVisualProvider>(); _formatMapService = shell.GetService <IClassificationFormatMapService>(); _classificationRegistryService = shell.GetService <IClassificationTypeRegistryService>(); }
TextEditorFactoryService(ITextBufferFactoryService textBufferFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, ICommandService commandService, ISmartIndentationService smartIndentationService, [ImportMany] IEnumerable <Lazy <IWpfTextViewCreationListener, IDeferrableContentTypeAndTextViewRoleMetadata> > wpfTextViewCreationListeners, IFormattedTextSourceFactoryService formattedTextSourceFactoryService, IViewClassifierAggregatorService viewClassifierAggregatorService, ITextAndAdornmentSequencerFactoryService textAndAdornmentSequencerFactoryService, IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, IAdornmentLayerDefinitionService adornmentLayerDefinitionService, ILineTransformProviderService lineTransformProviderService, IWpfTextViewMarginProviderCollectionProvider wpfTextViewMarginProviderCollectionProvider, IMenuService menuService, IEditorOperationsFactoryService editorOperationsFactoryService, ISpaceReservationStackProvider spaceReservationStackProvider, IWpfTextViewConnectionListenerServiceProvider wpfTextViewConnectionListenerServiceProvider, IBufferGraphFactoryService bufferGraphFactoryService, [ImportMany] IEnumerable <Lazy <ITextViewModelProvider, IContentTypeAndTextViewRoleMetadata> > textViewModelProviders, IContentTypeRegistryService contentTypeRegistryService, Lazy <ITextViewUndoManagerProvider> textViewUndoManagerProvider) { this.textBufferFactoryService = textBufferFactoryService; this.editorOptionsFactoryService = editorOptionsFactoryService; this.commandService = commandService; this.smartIndentationService = smartIndentationService; this.wpfTextViewCreationListeners = wpfTextViewCreationListeners.ToArray(); this.formattedTextSourceFactoryService = formattedTextSourceFactoryService; this.viewClassifierAggregatorService = viewClassifierAggregatorService; this.textAndAdornmentSequencerFactoryService = textAndAdornmentSequencerFactoryService; this.classificationFormatMapService = classificationFormatMapService; this.editorFormatMapService = editorFormatMapService; this.adornmentLayerDefinitionService = adornmentLayerDefinitionService; this.lineTransformProviderService = lineTransformProviderService; this.wpfTextViewMarginProviderCollectionProvider = wpfTextViewMarginProviderCollectionProvider; this.menuService = menuService; this.editorOperationsFactoryService = editorOperationsFactoryService; this.spaceReservationStackProvider = spaceReservationStackProvider; this.wpfTextViewConnectionListenerServiceProvider = wpfTextViewConnectionListenerServiceProvider; this.bufferGraphFactoryService = bufferGraphFactoryService; this.textViewModelProviders = textViewModelProviders.ToArray(); this.contentTypeRegistryService = contentTypeRegistryService; this.textViewUndoManagerProvider = textViewUndoManagerProvider; }
public VisualStudioChangeSignatureOptionsService(IClassificationFormatMapService classificationFormatMapService, ClassificationTypeMap classificationTypeMap) { _classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("tooltip"); _classificationTypeMap = classificationTypeMap; }
public CustomLineNumberMarginImpl(IWpfTextViewHost wpfTextViewHost, IClassificationFormatMapService classificationFormatMapService, ITextFormatterProvider textFormatterProvider) : base(PredefinedDsMarginNames.CustomLineNumber, wpfTextViewHost, classificationFormatMapService, textFormatterProvider) { CustomLineNumberMargin.SetMargin(wpfTextViewHost.TextView, this); }
ExceptionsVM(IDebuggerSettings debuggerSettings, IExceptionService exceptionService, IExceptionListSettings exceptionListSettings, IGetNewExceptionName getNewExceptionName, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.debuggerSettings = debuggerSettings; this.exceptionService = exceptionService; this.exceptionListSettings = exceptionListSettings; this.getNewExceptionName = getNewExceptionName; exceptionContext = new ExceptionContext(exceptionService, classificationFormatMap, textElementProvider) { SyntaxHighlight = debuggerSettings.SyntaxHighlightExceptions, }; exceptionsList = new ObservableCollection <ExceptionVM>(); CollectionView = CollectionViewSource.GetDefaultView(exceptionsList); debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; exceptionService.Changed += ExceptionService_Changed; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; InitializeDefaultExceptions(); }
CustomLineNumberMarginProvider(IClassificationFormatMapService classificationFormatMapService, ITextFormatterProvider textFormatterProvider) { this.classificationFormatMapService = classificationFormatMapService; this.textFormatterProvider = textFormatterProvider; }
SpacerMarginProvider(IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService, ITextFormatterProvider textFormatterProvider) { this.classificationFormatMapService = classificationFormatMapService; this.themeClassificationTypeService = themeClassificationTypeService; this.textFormatterProvider = textFormatterProvider; }
public EnvironmentService(IClassificationFormatMapService classificationFormatMapService) { this.classificationFormatMapService = classificationFormatMapService; }
OpenListCommand(IAppWindow appWindow, IDocumentListLoader documentListLoader, DocumentListService documentListService, IMessageBoxService messageBoxService, IDsDocumentService documentService, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { this.appWindow = appWindow; this.documentListLoader = documentListLoader; this.documentListService = documentListService; this.messageBoxService = messageBoxService; this.documentService = documentService; classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.textElementProvider = textElementProvider; }
DocumentSearcherProvider(IDotNetImageService dotNetImageService, IDecompilerService decompilerService, ITextElementProvider textElementProvider, IClassificationFormatMapService classificationFormatMapService) { this.dotNetImageService = dotNetImageService; this.decompilerService = decompilerService; this.textElementProvider = textElementProvider; classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); }
LineNumberMarginProvider(IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypes themeClassificationTypes, ITextFormatterProvider textFormatterProvider) { this.classificationFormatMapService = classificationFormatMapService; this.themeClassificationTypes = themeClassificationTypes; this.textFormatterProvider = textFormatterProvider; }
AllTabsMenuItemCommand(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings, IAppWindow appWindow, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) : base(documentTabService) { this.saveService = saveService; this.tabsVMSettings = tabsVMSettings; this.appWindow = appWindow; classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.textElementProvider = textElementProvider; }
public void Initialize(IClassificationTypeRegistryService classificationRegistry, IClassificationFormatMapService formatMapService) { if (Interlocked.CompareExchange(ref _initialized, 1, 0) == 1) { return; } try { _classificationRegistry = classificationRegistry; _formatMapService = formatMapService; Settings.SettingsUpdated += (sender, args) => { _settingsLoaded = false; UpdateFormatMap(); }; } catch (Exception ex) { Log.LogError(ex.ToString()); throw; } }
public MarginCore(IWpfTextView textView, string originalPath, ITextDocumentFactoryService textDocumentFactoryService, IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, IGitCommands gitCommands) { _textView = textView; _classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(textView); _editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView); _editorFormatMap.FormatMappingChanged += HandleFormatMappingChanged; _gitCommands = gitCommands; _parser = new DiffUpdateBackgroundParser(textView.TextBuffer, textView.TextDataModel.DocumentBuffer, originalPath, TaskScheduler.Default, textDocumentFactoryService, GitCommands); _parser.ParseComplete += HandleParseComplete; _parser.RequestParse(false); _textView.Closed += (sender, e) => { _editorFormatMap.FormatMappingChanged -= HandleFormatMappingChanged; _parser.ParseComplete -= HandleParseComplete; }; UpdateBrushes(); }
ValueNodesVMFactoryImpl(UIDispatcher uiDispatcher, ITreeViewService treeViewService, LanguageEditValueProviderFactory languageEditValueProviderFactory, DbgValueNodeImageReferenceService dbgValueNodeImageReferenceService, DebuggerSettings debuggerSettings, DbgEvalFormatterSettings dbgEvalFormatterSettings, DbgObjectIdService dbgObjectIdService, IClassificationFormatMapService classificationFormatMapService, ITextBlockContentInfoFactory textBlockContentInfoFactory, IMenuService menuService, IWpfCommandService wpfCommandService) { uiDispatcher.VerifyAccess(); this.uiDispatcher = uiDispatcher; this.treeViewService = treeViewService; this.languageEditValueProviderFactory = languageEditValueProviderFactory; this.dbgValueNodeImageReferenceService = dbgValueNodeImageReferenceService; this.debuggerSettings = debuggerSettings; this.dbgEvalFormatterSettings = dbgEvalFormatterSettings; this.dbgObjectIdService = dbgObjectIdService; this.classificationFormatMapService = classificationFormatMapService; this.textBlockContentInfoFactory = textBlockContentInfoFactory; this.menuService = menuService; this.wpfCommandService = wpfCommandService; allValueNodesVMs = new List <ValueNodesVM>(); }
public TreeViewImpl(ITreeViewServiceImpl treeViewService, IThemeService themeService, IClassificationFormatMapService classificationFormatMapService, Guid guid, TreeViewOptions options) { Guid = guid; this.treeViewService = treeViewService; treeViewListener = options.TreeViewListener; classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; foregroundBrushResourceKey = options.ForegroundBrushResourceKey ?? "TreeViewForeground"; sharpTreeView = new SharpTreeView(); sharpTreeView.SelectionChanged += SharpTreeView_SelectionChanged; sharpTreeView.CanDragAndDrop = options.CanDragAndDrop; sharpTreeView.AllowDrop = options.AllowDrop; sharpTreeView.AllowDropOrder = options.AllowDrop; VirtualizingPanel.SetIsVirtualizing(sharpTreeView, options.IsVirtualizing); VirtualizingPanel.SetVirtualizationMode(sharpTreeView, options.VirtualizationMode); AutomationPeerMemoryLeakWorkaround.SetInitialize(sharpTreeView, true); sharpTreeView.SelectionMode = options.SelectionMode; sharpTreeView.BorderThickness = new Thickness(0); sharpTreeView.ShowRoot = false; sharpTreeView.ShowLines = false; if (options.IsGridView) { sharpTreeView.SetResourceReference(ItemsControl.ItemContainerStyleProperty, SharpGridView.ItemContainerStyleKey); sharpTreeView.SetResourceReference(FrameworkElement.StyleProperty, "SharpTreeViewGridViewStyle"); } else { // Clear the value set by the constructor. This is required or our style won't be used. sharpTreeView.ClearValue(ItemsControl.ItemContainerStyleProperty); sharpTreeView.SetResourceReference(FrameworkElement.StyleProperty, typeof(SharpTreeView)); } sharpTreeView.GetPreviewInsideTextBackground = () => themeService.Theme.GetColor(ColorType.SystemColorsHighlight).Background; sharpTreeView.GetPreviewInsideForeground = () => themeService.Theme.GetColor(ColorType.SystemColorsHighlightText).Foreground; // Add the root at the end since Create() requires some stuff to have been initialized root = Create(options.RootNode ?? new TreeNodeDataImpl(new Guid(DocumentTreeViewConstants.ROOT_NODE_GUID))); sharpTreeView.Root = root.Node; }