Skip to content

Commit

Permalink
Merge pull request #43547 from LakshanWeerasinghe/resource-path-visib…
Browse files Browse the repository at this point in the history
…le-eps

Add resource calls to visible endpoints
  • Loading branch information
hasithaa authored Nov 4, 2024
2 parents 413e1ba + 70af8c8 commit 5c65767
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import io.ballerina.compiler.syntax.tree.ChildNodeEntry;
import io.ballerina.compiler.syntax.tree.ChildNodeList;
import io.ballerina.compiler.syntax.tree.ClassDefinitionNode;
import io.ballerina.compiler.syntax.tree.ClientResourceAccessActionNode;
import io.ballerina.compiler.syntax.tree.Minutiae;
import io.ballerina.compiler.syntax.tree.MinutiaeList;
import io.ballerina.compiler.syntax.tree.ModulePartNode;
Expand Down Expand Up @@ -302,6 +303,16 @@ protected JsonElement transformSyntaxNode(Node node) {
markVisibleEp(variableSymbol, symbolJson, remoteMethodCallActionNode.expression(), true);
}
}
} else if (node.kind() == SyntaxKind.CLIENT_RESOURCE_ACCESS_ACTION) {
ClientResourceAccessActionNode resourceCallActionNode = (ClientResourceAccessActionNode) node;
if (semanticModel != null) {
Optional<Symbol> expressionSymbol = this.semanticModel.symbol(
resourceCallActionNode.expression());
if (expressionSymbol.isPresent() &&
expressionSymbol.get() instanceof VariableSymbol variableSymbol) {
markVisibleEp(variableSymbol, symbolJson, resourceCallActionNode.expression(), true);
}
}
}

nodeJson.add("typeData", symbolJson);
Expand Down

0 comments on commit 5c65767

Please sign in to comment.