AutoCaseCorrector Class
Provides a default implementation of an IAutoCorrector that examines tokens for case-insensitive matches and auto-corrects them to proper case.
public class AutoCaseCorrector : AutoCorrectorBase, IAutoCorrector, IEditorDocumentTextChangeEventSink, IEditorViewSelectionChangeEventSink
- Inheritance:
- object AutoCorrectorBase object
- Derived:
- VBAutoCaseCorrector
Remarks
Instances of this object can be registered with an ISyntaxLanguage using the RegisterService(object, object) method. Once an instance is registered with the language for the IAutoCorrector interface type, its features can be used by the language.
Constructors
AutoCaseCorrector()
Initializes an instance of the class.
public AutoCaseCorrector()
Methods
AutoCorrect(TextSnapshotRange)
Auto-corrects over the specified TextSnapshotRange.
public override void AutoCorrect(TextSnapshotRange snapshotRange)
Parameter | Type | Description |
---|---|---|
snapshotRange | TextSnapshotRange | The TextSnapshotRange to examine. |
GetCaseCorrectText(ITextSnapshot, IToken)
Returns the case-corrected text for the specified IToken.
protected virtual string GetCaseCorrectText(ITextSnapshot snapshot, IToken token)
Parameter | Type | Description |
---|---|---|
snapshot | ITextSnapshot | The source ITextSnapshot. |
token | IToken | The IToken to examine. |
Returns
Inherited Members
- AutoCorrectorBase.OnDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)
- AutoCorrectorBase.OnDocumentTextChanging(SyntaxEditor, EditorSnapshotChangingEventArgs)
- AutoCorrectorBase.OnViewSelectionChanged(IEditorView, EditorViewSelectionEventArgs)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()