Interface AstNodeService
- All Superinterfaces:
org.mule.dx.platform.api.component.ComponentLifecycle,LanguageServerLifecycle,WeaveService
DataWeave Service to retrieve
DWAstNode from a uri project file.-
Method Summary
Modifier and TypeMethodDescriptionOptional<org.mule.weave.v2.api.tooling.ast.DWAstNode>Given aStringthat references a project file URI and aRangefor the givenDWAstNodeKind, it parses the script and generates theDWAstNodefor the expected kind.org.eclipse.lsp4j.MarkupContenttoMarkupContent(String weaveDoc) Given a weaveDoc it creates aMarkupContentin mark down format.Methods inherited from interface org.mule.weave.extension.api.lifecycle.LanguageServerLifecycle
initialize, initialized, shutdownMethods 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 aStringthat references a project file URI and aRangefor the givenDWAstNodeKind, it parses the script and generates theDWAstNodefor 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
OptionalofDWAstNodeif there is a node at the given location.
-
toMarkupContent
Given a weaveDoc it creates aMarkupContentin mark down format.- Parameters:
weaveDoc- The weave documentation to transform.- Returns:
- The created
MarkupContentin mark down format.
-