Example #1
0
#pragma warning restore 67

        internal KeywordTagger(ITextBuffer buffer, KeywordTaggerProvider provider)
        {
            theBuffer        = buffer;
            this.aggregator  = provider.Aggregator.CreateTagAggregator <IClassificationTag>(buffer);
            this.langFactory = provider.LanguageFactory;

            keywordClassification      = provider.GetTag(Constants.KEYWORD_CLASSIF_NAME);
            linqClassification         = provider.GetTag(Constants.LINQ_CLASSIF_NAME);
            visClassification          = provider.GetTag(Constants.VISIBILITY_CLASSIF_NAME);
            stringEscapeClassification = provider.GetTag(Constants.STRING_ESCAPE_CLASSIF_NAME);
            formatSpecClassification   = provider.GetTag(Constants.FORMAT_SPECIFIER_NAME);

            this.settings = provider.Settings;
            this.settings.SettingsChanged += this.OnSettingsChanged;
        }
Example #2
0
#pragma warning restore 67

        internal KeywordTagger(ITextBuffer buffer, KeywordTaggerProvider provider)
        {
            theBuffer        = buffer;
            this.aggregator  = provider.Aggregator.CreateTagAggregator <IClassificationTag>(buffer);
            this.langFactory = provider.LanguageFactory;

            var registry = provider.ClassificationRegistry;

            keywordClassification =
                new KeywordTag(registry.GetClassificationType(Constants.KEYWORD_CLASSIF_NAME));
            linqClassification =
                new KeywordTag(registry.GetClassificationType(Constants.LINQ_CLASSIF_NAME));
            visClassification =
                new KeywordTag(registry.GetClassificationType(Constants.VISIBILITY_CLASSIF_NAME));
            stringEscapeClassification =
                new KeywordTag(registry.GetClassificationType(Constants.STRING_ESCAPE_CLASSIF_NAME));

            VsfSettings.SettingsUpdated += this.OnSettingsUpdated;
        }