A contiguous region of change in a TreeChangedEvent
.
The delta may be reporting changes in the underlying text content, in
which case the replacedText
and insertedText
members are defined
and textChanged()
returns true. Or it may only be reporting node
structural changes (such as those generated by the Classification process) in which case those members are not defined
and textChanged
returns false.
Members
- location :Number
- replacedText :String
- insertedText :String
- fromLineCh :LineChar
- toLineCh :LineChar
- updatedNode :Node
- removedNodes :Array.<Node>
- insertedNodes :Array.<Node>
Methods
- textChanged() → Boolean
- changeInTextLength() → Number
- changeInLinesLength() → Number
Member Details
-
location :Number
-
Text offset location where this delta starts.
Type:
- Number
-
replacedText :String
-
Text replaced by this delta. May be undefined if delta is only reporting node structural change.
Type:
- String
-
insertedText :String
-
Text inserted by this delta. May be undefined if delta is only reporting node structural change.
Type:
- String
-
fromLineCh :LineChar
-
LineChar location where this delta starts.
Type:
-
toLineCh :LineChar
-
LineCh location where this delta ends.
Type:
-
updatedNode :module:ft/core/node.Node
-
Node updated by this delta. May be undefined if no node was updated. For example it could be that nodes were only inserted or removed.
Type:
-
removedNodes :Array.<module:ft/core/node.Node>
-
Nodes removed by this delta change. It may be that a single node is in both removed and inserted in the same delta. For example this could happen if a node is restructed by the Classification process.
Type:
- Array.<module:ft/core/node.Node>
-
insertedNodes :Array.<module:ft/core/node.Node>
-
Nodes inserted by this delta change. It may be that a single node is in both removed and inserted in the same delta. For example this could happen if a node is restructed by the Classification process.
Type:
- Array.<module:ft/core/node.Node>
Method Details
-
textChanged() → {Boolean}
-
Return true if this delta represents text change.
Returns:
- Type
- Boolean
-
changeInTextLength() → {Number}
-
The change in text length represented by this delta.
Returns:
- Type
- Number
-
changeInLinesLength() → {Number}
-
The change in lines length represented by this delta.
Returns:
- Type
- Number