Interface WeaveLanguageServerBuilder.TextDocumentTranslator

Enclosing interface:
WeaveLanguageServerBuilder

public static interface WeaveLanguageServerBuilder.TextDocumentTranslator
The Language Server would handle DataWeave files based on WeaveLanguageServerBuilder.fileScheme(String) so a WeaveLanguageServerBuilder.TextDocumentTranslator is responsible for translating the embedded URI format to a Location pointing to the file system textDocument file.
  • Method Summary

    Modifier and Type
    Method
    Description
    translate(String embeddedUri)
    For embedded URI (as String) it does the translation to the textDocument that holds this embedded uri.
    org.eclipse.lsp4j.Location
    translate(String embeddedUri, org.eclipse.lsp4j.Range range)
    For embedded URI (as String) and Range located related to the content of the script, it does the translation to the textDocument and the correct range coordinates.
  • Method Details

    • translate

      String translate(String embeddedUri)
      For embedded URI (as String) it does the translation to the textDocument that holds this embedded uri.
      Parameters:
      embeddedUri - an embedded URI.
      Returns:
      the URL of the textDocument.
    • translate

      org.eclipse.lsp4j.Location translate(String embeddedUri, org.eclipse.lsp4j.Range range)
      For embedded URI (as String) and Range located related to the content of the script, it does the translation to the textDocument and the correct range coordinates.
      Parameters:
      embeddedUri - an embedded URI.
      range - a range relative to the embedded URI.
      Returns:
      the container textDocument location.