public JadeTokenizer(JadeClassifierProvider provider) { this.CComments = false; this.MultilineCppComments = true; if (provider != null && provider.JsTaggerProvider != null) { this._jsBuffer = provider.BufferFactoryService.CreateTextBuffer(provider.JsContentType); this._jsTagger = provider.JsTaggerProvider.CreateTagger <ClassificationTag>(this._jsBuffer); } if (provider != null && provider.CssClassifierProvider != null) { this._cssBuffer = provider.BufferFactoryService.CreateTextBuffer(provider.CssContentType); this._cssClassifier = provider.CssClassifierProvider.GetClassifier(this._cssBuffer); } }
public JadeClassifier(ITextBuffer textBuffer, JadeClassifierProvider provider) : base(textBuffer, new JadeTokenizer(provider), new JadeClassificationNameProvider(provider.ClassificationRegistryService)) { this.LineBasedClassification = true; ServiceManager.AddService <JadeClassifier>(this, textBuffer); }