Ejemplo n.º 1
0
        internal VariableClassifier(IClassificationTypeRegistryService registry, ITextBuffer buffer)
        {
            _registry = registry;
            _buffer   = buffer;
            _variableClassification = _registry.GetClassificationType(VariableClassificationType.Name);

            _tree               = CssTreeWatcher.ForBuffer(_buffer);
            _tree.TreeUpdated  += TreeUpdated;
            _tree.ItemsChanged += TreeItemsChanged;
            UpdateCache(_tree.StyleSheet);
        }
        internal VariableClassifier(IClassificationTypeRegistryService registry, ITextBuffer buffer)
        {
            _registry = registry;
            _buffer = buffer;
            _variableClassification = _registry.GetClassificationType(VariableClassificationType.Name);

            _tree = CssTreeWatcher.ForBuffer(_buffer);
            _tree.TreeUpdated += TreeUpdated;
            _tree.ItemsChanged += TreeItemsChanged;
            UpdateCache(_tree.StyleSheet);
        }
        internal VendorClassifier(IClassificationTypeRegistryService registry, ITextBuffer buffer)
        {
            _registry = registry;
            _buffer = buffer;
            _decClassification = _registry.GetClassificationType(VendorClassificationTypes.Declaration);
            _valClassification = _registry.GetClassificationType(VendorClassificationTypes.Value);

            _tree = CssTreeWatcher.ForBuffer(_buffer);
            _tree.TreeUpdated += TreeUpdated;
            _tree.ItemsChanged += TreeItemsChanged;
            UpdateDeclarationCache(_tree.StyleSheet);

        }