Possibly move one or more carets to new position or change their selections
by using methods in the given context.
The method will be called with a document lock acquired.
The method is allowed to make document mutations in case the caller
acquired document write-lock.
To prevent deadlocks the method should not acquire any additional locks.
The method is not allowed to call methods of EditorCaret that mutate its state
and do nested calls to EditorCaret.moveCarets().
context - non-null context containing the manipulation methods.