InspectDocumentSelection extension

on

Methods

doesSelectionContainPosition(DocumentSelection selection, DocumentPosition position) bool
Returns true if, and only if, the given position sits within the given selection in this Document.
getNodesInContentOrder(DocumentSelection selection) List<DocumentNode>
Returns a list of all the DocumentNodes within the given selection, ordered from upstream to downstream.
selectDownstreamPosition(DocumentPosition docPosition1, DocumentPosition docPosition2) DocumentPosition
Given docPosition1 and docPosition2, returns the DocumentPosition that appears last in the document.
selectUpstreamPosition(DocumentPosition docPosition1, DocumentPosition docPosition2) DocumentPosition
Given docPosition1 and docPosition2, returns the DocumentPosition that appears first in the document.