public ITagger <T> CreateTagger <T>(ITextBuffer buffer) where T : ITag
        {
            if (!_languagePackageLoaded)
            {
                var languagePackage = GlobalServiceProvider.GetShell().LoadPackage <HlslPackage>();
                _languagePackageLoaded = languagePackage != null;
            }

            var syntaxTagger = AsyncTaggerUtility.CreateTagger <SyntaxTagger, T>(buffer,
                                                                                 () => new SyntaxTagger(ClassificationService, buffer.GetBackgroundParser()));

            return(syntaxTagger);
        }
Exemplo n.º 2
0
 private IVsPackage EnsurePackageLoaded()
 {
     return(GlobalServiceProvider.GetShell().LoadPackage <VSPackage>());
 }