Skip to content

Support simple observation of text-range changes #26

@martinring

Description

@martinring

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions