Interface AstNodeService

All Superinterfaces:
org.mule.dx.platform.api.component.ComponentLifecycle, LanguageServerLifecycle, WeaveService

public interface AstNodeService extends WeaveService
DataWeave Service to retrieve DWAstNode from a uri project file.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.mule.weave.v2.api.tooling.ast.DWAstNode>
    nodeAt(String uri, org.eclipse.lsp4j.Range range)
    Given a String that references a project file URI and a Range for the given DWAstNodeKind, it parses the script and generates the DWAstNode for the expected kind.
    org.eclipse.lsp4j.MarkupContent
    Given a weaveDoc it creates a MarkupContent in mark down format.

    Methods inherited from interface org.mule.weave.extension.api.lifecycle.LanguageServerLifecycle

    initialize, initialized, shutdown

    Methods inherited from interface org.mule.weave.extension.api.services.WeaveService

    start, stop
  • Method Details

    • nodeAt

      Optional<org.mule.weave.v2.api.tooling.ast.DWAstNode> nodeAt(String uri, org.eclipse.lsp4j.Range range)
      Given a String that references a project file URI and a Range for the given DWAstNodeKind, it parses the script and generates the DWAstNode for the expected kind. This method will apply the scope or type checking phases.
      Parameters:
      uri - file URI to be parsed.
      range - The range.
      Returns:
      an Optional of DWAstNode if there is a node at the given location.
    • toMarkupContent

      org.eclipse.lsp4j.MarkupContent toMarkupContent(String weaveDoc)
      Given a weaveDoc it creates a MarkupContent in mark down format.
      Parameters:
      weaveDoc - The weave documentation to transform.
      Returns:
      The created MarkupContent in mark down format.