AutoCorrectorBase Class
Provides an abstract base class for an IAutoCorrector whose AutoCorrect(TextSnapshotRange) method is called at appropriate times following text changes or caret moves.
public abstract class AutoCorrectorBase : IAutoCorrector, IEditorDocumentTextChangeEventSink, IEditorViewSelectionChangeEventSink
- Inheritance:
- object object
- Derived:
- AutoCaseCorrector
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
AutoCorrectorBase()
Initializes an instance of the class.
protected AutoCorrectorBase()
Methods
AutoCorrect(TextSnapshotRange)
Auto-corrects over the specified TextSnapshotRange.
public abstract void AutoCorrect(TextSnapshotRange snapshotRange)
Parameter | Type | Description |
---|---|---|
snapshotRange | TextSnapshotRange | The TextSnapshotRange to examine. |
OnDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)
Occurs after a text change occurs to an IEditorDocument that uses this language.
protected virtual void OnDocumentTextChanged(SyntaxEditor editor, EditorSnapshotChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
editor | SyntaxEditor | The SyntaxEditor whose IEditorDocument is changed. |
e | EditorSnapshotChangedEventArgs | The |
OnDocumentTextChanging(SyntaxEditor, EditorSnapshotChangingEventArgs)
Occurs before a text change occurs to an IEditorDocument that uses this language.
protected virtual void OnDocumentTextChanging(SyntaxEditor editor, EditorSnapshotChangingEventArgs e)
Parameter | Type | Description |
---|---|---|
editor | SyntaxEditor | The SyntaxEditor whose IEditorDocument is changed. |
e | EditorSnapshotChangingEventArgs | The |
OnViewSelectionChanged(IEditorView, EditorViewSelectionEventArgs)
Occurs when the selection is changed in the specified IEditorView.
protected virtual void OnViewSelectionChanged(IEditorView view, EditorViewSelectionEventArgs e)
Parameter | Type | Description |
---|---|---|
view | IEditorView | The IEditorView that received the event. |
e | EditorViewSelectionEventArgs | The |