WordTaggerBase
Base tagger class for classification of words.
Definition
Namespace:Telerik.Windows.Controls.SyntaxEditor.Tagging.Taggers
Assembly:Telerik.Windows.Controls.SyntaxEditor.dll
Syntax:
public abstract class WordTaggerBase : TaggerBase<ClassificationTag>, ITagger<ClassificationTag>
Inheritance: objectTaggerBase<ClassificationTag>WordTaggerBase
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the WordTaggerBase class.
Properties
Gets or sets a value indicating whether multiline tags are collected by this tagger instance. The method RebuildMultilineTags() process all document and collects Multiline tags in the MultilineTags property.
public bool EnableMultilineTags { get; set; }
MultilineTags
IList<TagSpan<ClassificationTag>>
The list of multiline ClassificationTags wrapped in TagSpans.
protected IList<TagSpan<ClassificationTag>> MultilineTags { get; }
Gets or sets the regex pattern used to match strings in the documents which this tagger recognizes.
protected virtual string StringMatchingRegex { get; set; }
Methods
Adds a new word-type pair in the dictionary.
public void AddWord(string word, ClassificationType classificationType)
Gets the tags.
public override IEnumerable<TagSpan<ClassificationTag>> GetTags(NormalizedSnapshotSpanCollection spans)
IEnumerable<TagSpan<ClassificationTag>>
Overrides:
Gets the words to classification types.
protected abstract Dictionary<string, ClassificationType> GetWordsToClassificationTypes()
Dictionary<string, ClassificationType>
Dictionary<System.String, ClassificationType>.
Clears all multiline tags and rebuilds them.
protected virtual void InvalidateMultilineTags()
Rebuilds the MultilineTags collection.
protected virtual void RebuildMultilineTags()
Tries to get the classification type for the given string word.
protected virtual bool TryGetClassificationType(string word, out ClassificationType classificationType)
The string word.
classificationTypeClassificationTypeThe result classification type.
Returns:Returns true if classification type is found, otherwise - false.