public void TextViewCreated(IWpfTextView textView) { var rainbowTags = RainbowColorTagger.GetRainbows( registryService, Rainbows.MaxDepth ); var formatMap = formatMapService.GetClassificationFormatMap(textView); textView.Set(new RainbowHighlight(textView, formatMap, rainbowTags)); }
public void TextViewCreated(IWpfTextView textView) { var rainbowTags = RainbowColorTagger.GetRainbows( registryService, Constants.MAX_RAINBOW_DEPTH ); var formatMap = formatMapService.GetClassificationFormatMap(textView); textView.Set(new RainbowHighlight(textView, formatMap, rainbowTags)); }
internal RainbowProvider( ITextBuffer buffer, RainbowTaggerProvider provider) { this.TextBuffer = buffer; this.Registry = provider.ClassificationRegistry; this.LanguageFactory = provider.LanguageFactory; this.Settings = provider.Settings; this.ColorTagger = new RainbowColorTagger(this); SetLanguage(buffer.CurrentSnapshot); this.updatePendingFrom = -1; this.TextBuffer.ChangedLowPriority += this.BufferChanged; this.TextBuffer.ContentTypeChanged += this.ContentTypeChanged; this.Dispatcher = Dispatcher.CurrentDispatcher; VsfSettingsEventManager.AddListener(this.Settings, this); UpdateBraceList(new SnapshotPoint(buffer.CurrentSnapshot, 0)); }
internal RainbowProvider( ITextView view, ITextBuffer buffer, RainbowTaggerProvider provider) { this.TextView = view; this.TextBuffer = buffer; this.Registry = provider.ClassificationRegistry; this.LanguageFactory = provider.LanguageFactory; this.ColorTagger = new RainbowColorTagger(this); SetLanguage(buffer.ContentType); this.updatePendingFrom = -1; this.TextView.Closed += OnViewClosed; this.TextBuffer.ChangedLowPriority += this.BufferChanged; this.TextBuffer.ContentTypeChanged += this.ContentTypeChanged; VsfSettings.SettingsUpdated += this.OnSettingsUpdated; this.Dispatcher = Dispatcher.CurrentDispatcher; UpdateBraceList(new SnapshotPoint(buffer.CurrentSnapshot, 0)); }
public IClassificationType[] GetRainbowTags() { return(RainbowColorTagger.GetRainbows( RegistryService, Rainbows.MaxDepth )); }