コード例 #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));
        }
コード例 #2
0
ファイル: RainbowHighlight.cs プロジェクト: xwiz/viasfora
        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));
        }
コード例 #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));
        }
コード例 #4
0
ファイル: RainbowProvider.cs プロジェクト: xwiz/viasfora
        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));
        }
コード例 #5
0
 public IClassificationType[] GetRainbowTags()
 {
     return(RainbowColorTagger.GetRainbows(
                RegistryService, Rainbows.MaxDepth
                ));
 }