It should be possible for assistants to easily register a listener on a specified text span and be informed if the span changes with regard to translation in the text. It should thus also be possible for the assistant to determine the current offset for a specific revision.
something like this should be possible
trait TextSpanUpdate {
val file: OpenedFile // with current revision
val offset: Int
val content: String
}
def watchSpan(file: OpenedFile, start: Int, length: Int): Observable[TextSpanUpdate]
Where the updates only fire if content has changed not if the offset or the revision changes!
this also requires the reactive extensions framework for the observables.
It should be possible for assistants to easily register a listener on a specified text span and be informed if the span changes with regard to translation in the text. It should thus also be possible for the assistant to determine the current offset for a specific revision.
something like this should be possible
Where the updates only fire if content has changed not if the offset or the revision changes!
this also requires the reactive extensions framework for the observables.