Exemplo n.º 1
0
        public void TextViewCreated(IWpfTextView textView)
        {
            var rainbowTags = RainbowColorTagger.GetRainbows(
                registryService, Rainbows.MaxDepth
                );
            var formatMap = formatMapService.GetClassificationFormatMap(textView);

            textView.Set(new RainbowHighlight(textView, formatMap, rainbowTags));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
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));
        }
Exemplo n.º 5
0
 public IClassificationType[] GetRainbowTags()
 {
     return(RainbowColorTagger.GetRainbows(
                RegistryService, Rainbows.MaxDepth
                ));
 }