EditorDocument Class
Represents a text document that can be used in an editor.
public class EditorDocument : CodeDocument, IEditorDocument, ICodeDocument, IParseTarget, ITextDocument
- Inheritance:
- object ObservableObjectBase TextDocumentBase CodeDocument object
- Implements:
- IEditorDocument ICodeDocument IParseTarget ITextDocument
Constructors
EditorDocument()
Initializes an instance of the class.
public EditorDocument()
Properties
IndicatorManager
The IIndicatorManager that manages indicators for the document.
LineNumberOrigin
The origin line number to use as the base for the first view line.
OutliningManager
The IOutliningManager that manages outlining nodes for the document.
OutliningMode
The outlining mode for the document that determines what type of code outlining (folding) is supported.
public OutliningMode OutliningMode { get; set; }
Property Value
- OutliningMode:
The default value is Default.
Text
The text in the document.
public string Text { get; set; }
Property Value
Remarks
This property is only intended to be used when deserializing text content from XAML.
WhitespaceTrimModes
The modes in which whitespace should be automatically trimmed.
public WhitespaceTrimModes WhitespaceTrimModes { get; set; }
Property Value
- WhitespaceTrimModes:
The default value is None.
Methods
GetTextReplacementInsertText(ITextChangeOperation)
Returns the scrubbed text that should be inserted for an entire text replacement ITextChangeOperation.
protected override string? GetTextReplacementInsertText(ITextChangeOperation operation)
| Parameter | Type | Description |
|---|---|---|
| operation | ITextChangeOperation | The ITextChangeOperation containing default text to insert. |
Returns
Remarks
This method can be overridden to scrub the text to insert, such as remove trailing whitespace, etc.
By default it returns a null, meaning to use the unscrubbed InsertedText value.
Inherited Members
- CodeDocument.AddLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)
- CodeDocument.CreateParseRequest()
- CodeDocument.CreateTagAggregator<T>()
- CodeDocument.GetReadOnlyRegions(TextRange)
- CodeDocument.GetServices<TService>()
- CodeDocument.NotifyParseComplete(IParseRequest, IParseData)
- CodeDocument.OnFileNameChanged(StringPropertyChangedEventArgs)
- CodeDocument.OnLanguageChanged(SyntaxLanguageChangedEventArgs)
- CodeDocument.OnParseDataChanged(ParseDataPropertyChangedEventArgs)
- CodeDocument.OnTextChanged(TextSnapshotChangedEventArgs)
- CodeDocument.QueueParseRequest()
- CodeDocument.RemoveLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)
- CodeDocument.Language
- CodeDocument.LanguageData
- CodeDocument.ParseData
- CodeDocument.Properties
- CodeDocument.LanguageChanged
- CodeDocument.ParseDataChanged
- TextDocumentBase.DefaultTabSize
- TextDocumentBase.IsTextRangeReadOnly(TextRange)
- TextDocumentBase.OnIsModifiedChanged(EventArgs)
- TextDocumentBase.OnIsReadOnlyChanged(EventArgs)
- TextDocumentBase.OnTabSizeChanged(EventArgs)
- TextDocumentBase.ReplaceAll(ISearchOptions)
- TextDocumentBase.ReplaceAll(ISearchOptions, params TextRange[])
- TextDocumentBase.ReplaceNext(ISearchOptions, int, bool)
- TextDocumentBase.ReplaceNext(ISearchOptions, int, bool, TextRange)
- TextDocumentBase.AddTextChangedEventHandler(EventHandler<TextSnapshotChangedEventArgs>, EventHandlerPriority)
- TextDocumentBase.AddTextChangingEventHandler(EventHandler<TextSnapshotChangingEventArgs>, EventHandlerPriority)
- TextDocumentBase.AppendText(ITextChangeType, string, ITextChangeOptions)
- TextDocumentBase.CreateTextChange(ITextChangeType, ITextChangeOptions)
- TextDocumentBase.DeleteText(ITextChangeType, TextRange, ITextChangeOptions)
- TextDocumentBase.DeleteText(ITextChangeType, int, int, ITextChangeOptions)
- TextDocumentBase.InsertText(ITextChangeType, int, string, ITextChangeOptions)
- TextDocumentBase.NormalizeLineTerminators(LineTerminator, ITextChangeOptions)
- TextDocumentBase.OnTextChanging(TextSnapshotChangingEventArgs)
- TextDocumentBase.RemoveTextChangedEventHandler(EventHandler<TextSnapshotChangedEventArgs>, EventHandlerPriority)
- TextDocumentBase.RemoveTextChangingEventHandler(EventHandler<TextSnapshotChangingEventArgs>, EventHandlerPriority)
- TextDocumentBase.ReplaceText(ITextChangeType, TextRange, string, ITextChangeOptions)
- TextDocumentBase.ReplaceText(ITextChangeType, int, int, string, ITextChangeOptions)
- TextDocumentBase.SetHeaderAndFooterText(string, string)
- TextDocumentBase.SetText(string)
- TextDocumentBase.SetText(ITextChangeType, string, ITextChangeOptions)
- TextDocumentBase.LoadFile(string, Encoding)
- TextDocumentBase.LoadFile(Stream, Encoding)
- TextDocumentBase.SaveFile(string, Encoding, LineTerminator?)
- TextDocumentBase.SaveFile(Stream, Encoding, LineTerminator?)
- TextDocumentBase.AutoCharacterCasing
- TextDocumentBase.AutoConvertTabsToSpaces
- TextDocumentBase.IsModified
- TextDocumentBase.IsReadOnly
- TextDocumentBase.TabSize
- TextDocumentBase.UndoHistory
- TextDocumentBase.CurrentSnapshot
- TextDocumentBase.FileName
- TextDocumentBase.IsModifiedChanged
- TextDocumentBase.IsReadOnlyChanged
- TextDocumentBase.TabSizeChanged
- TextDocumentBase.TextChanged
- TextDocumentBase.TextChanging
- TextDocumentBase.FileNameChanged
- ObservableObjectBase.NotifyPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()