EditorViewTextChangeOptions Class
Represents options that are applied to an ITextChange, and are created from an IEditorView.
public class EditorViewTextChangeOptions : TextChangeOptions, IEditorViewTextChangeOptions, ITextChangeOptions
- Inheritance:
- object TextChangeOptions object
- Implements:
- IEditorViewTextChangeOptions ITextChangeOptions
Constructors
EditorViewTextChangeOptions()
Initializes an instance of the class.
public EditorViewTextChangeOptions()
EditorViewTextChangeOptions(object?)
Initializes an instance of the class.
public EditorViewTextChangeOptions(object? source)
| Parameter | Type | Description |
|---|---|---|
| source | object | The optional source of the text change, which is most often a editor view if specified. |
Properties
BlockEditRangeAdjustFunc
A function that can adjust a block selection line's character Range prior to modification.
public Func<ITextViewLine, Range, Range>? BlockEditRangeAdjustFunc { get; set; }
Property Value
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?). This property is generally used to handle zero-width character Range scenarios during block edits.
CanApplyToBlockEdit
Indicates whether the text change can apply to each line in a block edit when applicable.
public bool CanApplyToBlockEdit { get; set; }
Property Value
- bool:
trueif the text change can apply to each line in a block edit when applicable; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
CanApplyToMultipleSelections
Indicates whether the text change can apply to multiple selections.
public bool CanApplyToMultipleSelections { get; set; }
Property Value
- bool:
trueif the text change can apply to multiple selections; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
When false, the text change will only apply to the primary selection when there are multiple selections.
IsBlock
Indicates whether the text change is a block change.
public bool IsBlock { get; set; }
Property Value
- bool:
trueif the text change is a block change; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
SelectInsertedText
Indicates whether to select the text that is inserted into the document.
public bool SelectInsertedText { get; set; }
Property Value
- bool:
trueif the inserted text should be selected; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
VirtualCharacterFill
Indicates whether when at a virtual character position, the text change will insert whitespace into the document to fill up to the insertion point's TextPosition.
public bool VirtualCharacterFill { get; set; }
Property Value
- bool:
trueif whitespace will be inserted; otherwise,false. The default value istrue.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?). It is generally used by text changes such as line feed insertion or open line actions.
ZeroLengthEditRangeAdjustFunc
A function that can adjust a zero-width selection's position range prior to modification.
public Func<TextPosition, TextPositionRange>? ZeroLengthEditRangeAdjustFunc { get; set; }
Property Value
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
Inherited Members
- TextChangeOptions.CanMergeIntoPreviousChange
- TextChangeOptions.CustomData
- TextChangeOptions.CheckReadOnly
- TextChangeOptions.RetainSelection
- TextChangeOptions.OffsetDelta
- TextChangeOptions.Source
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()