C# Class AvalonStudio.TextEditor.Document.DocumentLine

Represents a line inside a TextDocument.

The TextDocument.Lines collection contains one DocumentLine instance for every line in the document. This collection is read-only to user code and is automatically updated to reflect the current document content.

Internally, the DocumentLine instances are arranged in a binary tree that allows for both efficient updates and lookup. Converting between offset and line number is possible in O(lg N) time, and the data structure also updates all offsets in O(lg N) whenever a line is inserted or removed.

Inheritance: IDocumentLine
Mostrar archivo Open project: VitalElement/AvalonStudio Class Usage Examples

Private Properties

Property Type Description
DebugVerifyAccess void
DocumentLine System
InitLineNode DocumentLine
ResetLine void

Public Methods

Method Description
ToString ( ) : string

Gets a string with debug output showing the line number and offset. Does not include the line's text.

Private Methods

Method Description
DebugVerifyAccess ( ) : void
DocumentLine ( TextDocument document ) : System
InitLineNode ( ) : DocumentLine
ResetLine ( ) : void

Resets the line to enable its reuse after a document rebuild.

Method Details

ToString() public method

Gets a string with debug output showing the line number and offset. Does not include the line's text.
public ToString ( ) : string
return string