Class WordTaggerBase
Base tagger class for classification of words.
Inherited Members
Namespace: Telerik.WinForms.Controls.SyntaxEditor.Taggers
Assembly: Telerik.WinControls.SyntaxEditor.dll
Syntax
public abstract class WordTaggerBase : TaggerBase<ClassificationTag>, ITagger<ClassificationTag>
Constructors
WordTaggerBase(RadSyntaxEditorElement)
Initializes a new instance of the Word
Declaration
protected WordTaggerBase(RadSyntaxEditorElement editor)
Parameters
Rad The editor. |
Properties
EnableMultilineTags
Gets or sets a value indicating whether multiline tags are collected by this tagger instance.
The method Rebuild
Declaration
public bool EnableMultilineTags { get; set; }
Property Value
System.
|
MultilineTags
The list of multiline Classification
Declaration
protected IList<TagSpan<ClassificationTag>> MultilineTags { get; }
Property Value
System.
|
StringMatchingRegex
Gets or sets the regex pattern used to match strings in the documents which this tagger recognizes.
Declaration
protected virtual string StringMatchingRegex { get; set; }
Property Value
System.
|
Methods
AddWord(String, ClassificationType)
Adds a new word-type pair in the dictionary.
Declaration
public void AddWord(string word, ClassificationType classificationType)
Parameters
System.
|
Classification
|
GetCharType(Char)
Declaration
protected virtual int GetCharType(char character)
Parameters
System.
|
Returns
System.
|
GetTags(NormalizedSnapshotSpanCollection)
Gets the tags.
Declaration
public override IEnumerable<TagSpan<ClassificationTag>> GetTags(NormalizedSnapshotSpanCollection spans)
Parameters
Returns
System.
|
Overrides
GetWordsToClassificationTypes()
Gets the words to classification types.
Declaration
protected abstract Dictionary<string, ClassificationType> GetWordsToClassificationTypes()
Returns
System. Dictionary<System.String, ClassificationType>. |
InvalidateMultilineTags()
Clears all multiline tags and rebuilds them.
Declaration
protected virtual void InvalidateMultilineTags()
OnWordSplit(Int32, String)
Called when a word is split during processing of a line string.
Declaration
protected virtual void OnWordSplit(int wordCharType, string word)
Parameters
System.
|
System.
|
RebuildMultilineTags()
Rebuilds the MultilineTags collection.
Declaration
protected virtual void RebuildMultilineTags()
SkipWord(String, Nullable<Char>)
Checks if the split word should be skipped.
Declaration
protected virtual bool SkipWord(string word, char? nextChar = default(char? ))
Parameters
System. The split word. |
System. The next char. |
Returns
System.
|
SplitIntoWords(String)
Splits the given string into collection of words.
Declaration
protected virtual IList<string> SplitIntoWords(string value)
Parameters
System. The given string to split. |
Returns
System. List of the words. |
TryGetClassificationType(String, out ClassificationType)
Tries to get the classification type for the given string word.
Declaration
protected virtual bool TryGetClassificationType(string word, out ClassificationType classificationType)
Parameters
System. The string word. |
Classification The result classification type. |
Returns
System. Returns true if classification type is found, otherwise - false. |
TryRemoveWord(String)
Tries to removes a given word from the dictionary.
Declaration
public bool TryRemoveWord(string word)
Parameters
System.
|
Returns
System.
|