internal IEnumerable <ITextLineChecker> TextLineCheckers = null; // Set via MEF

        public IClassifier GetClassifier(ITextBuffer buffer)
        {
            // Ensure VS Package is loaded, as classifier implementation depends on services
            // and initialization code provider by the implementation.
            VsPackage.EnsureLoaded();

            return
                (buffer.Properties.GetOrCreateSingletonProperty <ChromiumStyleClassifier>(
                     () =>
                     new ChromiumStyleClassifier(ClassificationRegistry, TextLineCheckers,
                                                 ConfigurationFileLocator)));
        }
        public void Attach(IVsTextView textViewAdapter)
        {
            VsPackage.EnsureLoaded();

            // Ensure document is seen as loaded - This is necessary for the first
            // opened editor because the document is open before the package has a
            // chance to listen to TextDocumentFactoryService events.
            var textView = _adaptersFactoryService.GetWpfTextView(textViewAdapter);

            if (textView != null)
            {
                foreach (var buffer in textView.BufferGraph.GetTextBuffers(x => true))
                {
                    ITextDocument textDocument;
                    if (_textDocumentFactoryService.TryGetTextDocument(buffer, out textDocument))
                    {
                        _fileRegistrationRequestService.RegisterTextDocument(textDocument);
                    }
                }
            }
        }