Skip to content

Commit

Permalink
Merge pull request #432 from nipunayf/fix-start-linerange
Browse files Browse the repository at this point in the history
Adjust the line range of the start node
  • Loading branch information
hasithaa authored Oct 11, 2024
2 parents dcfdd7b + 1ceade7 commit 79c3c98
Show file tree
Hide file tree
Showing 122 changed files with 246 additions and 322 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ public void visit(FunctionDefinitionNode functionDefinitionNode) {
return;
}

startNode(NodeKind.EVENT_START);
endNode(functionDefinitionNode);
startNode(NodeKind.EVENT_START).codedata()
.lineRange(functionDefinitionNode.functionBody().lineRange())
.sourceCode(functionDefinitionNode.toSourceCode().strip());
endNode();
super.visit(functionDefinitionNode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "http_get_node.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "http_get_node.bal",
"nodes": [
{
"id": "45234",
"id": "47001",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "http_get_node.bal",
"startLine": {
"line": 13,
"offset": 4
"offset": 61
},
"endLine": {
"line": 28,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "http_get_node.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "http_get_node.bal",
"nodes": [
{
"id": "61726",
"id": "62656",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "http_get_node.bal",
"startLine": {
"line": 30,
"offset": 4
"offset": 34
},
"endLine": {
"line": 33,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "http_get_node.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "http_get_node.bal",
"nodes": [
{
"id": "66655",
"id": "68577",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "http_get_node.bal",
"startLine": {
"line": 35,
"offset": 4
"offset": 66
},
"endLine": {
"line": 37,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fileName": "http_get_node.bal",
"nodes": [
{
"id": "70654",
"id": "72638",
"metadata": {
"label": "Start"
},
Expand All @@ -23,7 +23,7 @@
"fileName": "http_get_node.bal",
"startLine": {
"line": 39,
"offset": 4
"offset": 68
},
"endLine": {
"line": 42,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "http_post_node.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "http_post_node.bal",
"nodes": [
{
"id": "45172",
"id": "46970",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "http_post_node.bal",
"startLine": {
"line": 13,
"offset": 4
"offset": 62
},
"endLine": {
"line": 26,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "http_post_node.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "http_post_node.bal",
"nodes": [
{
"id": "59742",
"id": "60703",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "http_post_node.bal",
"startLine": {
"line": 28,
"offset": 4
"offset": 35
},
"endLine": {
"line": 31,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "http_post_node.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "http_post_node.bal",
"nodes": [
{
"id": "64671",
"id": "66624",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "http_post_node.bal",
"startLine": {
"line": 33,
"offset": 4
"offset": 67
},
"endLine": {
"line": 35,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fileName": "http_post_node.bal",
"nodes": [
{
"id": "68670",
"id": "70685",
"metadata": {
"label": "Start"
},
Expand All @@ -23,7 +23,7 @@
"fileName": "http_post_node.bal",
"startLine": {
"line": 37,
"offset": 4
"offset": 69
},
"endLine": {
"line": 40,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "update_data.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "update_data.bal",
"nodes": [
{
"id": "31869",
"id": "32582",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "update_data.bal",
"startLine": {
"line": 0,
"offset": 0
"offset": 23
},
"endLine": {
"line": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "update_data.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "update_data.bal",
"nodes": [
{
"id": "37790",
"id": "38689",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "update_data.bal",
"startLine": {
"line": 6,
"offset": 0
"offset": 29
},
"endLine": {
"line": 9,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fileName": "update_data.bal",
"nodes": [
{
"id": "42750",
"id": "43587",
"metadata": {
"label": "Start"
},
Expand All @@ -23,7 +23,7 @@
"fileName": "update_data.bal",
"startLine": {
"line": 11,
"offset": 0
"offset": 27
},
"endLine": {
"line": 14,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fileName": "update_data.bal",
"nodes": [
{
"id": "47710",
"id": "48516",
"metadata": {
"label": "Start"
},
Expand All @@ -23,7 +23,7 @@
"fileName": "update_data.bal",
"startLine": {
"line": 16,
"offset": 0
"offset": 26
},
"endLine": {
"line": 19,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fileName": "update_data.bal",
"nodes": [
{
"id": "52732",
"id": "54375",
"metadata": {
"label": "Start"
},
Expand All @@ -23,7 +23,7 @@
"fileName": "update_data.bal",
"startLine": {
"line": 21,
"offset": 0
"offset": 53
},
"endLine": {
"line": 26,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fileName": "clients.bal",
"nodes": [
{
"id": "45137",
"id": "46315",
"metadata": {
"label": "Start"
},
Expand All @@ -23,7 +23,7 @@
"fileName": "clients.bal",
"startLine": {
"line": 13,
"offset": 0
"offset": 38
},
"endLine": {
"line": 29,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "comment.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "comment.bal",
"nodes": [
{
"id": "31900",
"id": "33419",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "comment.bal",
"startLine": {
"line": 0,
"offset": 0
"offset": 49
},
"endLine": {
"line": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "comment.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "comment.bal",
"nodes": [
{
"id": "118328",
"id": "119692",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "comment.bal",
"startLine": {
"line": 87,
"offset": 0
"offset": 44
},
"endLine": {
"line": 96,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "comment.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "comment.bal",
"nodes": [
{
"id": "129240",
"id": "130449",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "comment.bal",
"startLine": {
"line": 98,
"offset": 0
"offset": 39
},
"endLine": {
"line": 107,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"source": "comment.bal",
"description": "Tests a simple diagram flow",
"forceAssign": false,
"diagram": {
"fileName": "comment.bal",
"nodes": [
{
"id": "139966",
"id": "140927",
"metadata": {
"label": "Start"
},
Expand All @@ -24,7 +23,7 @@
"fileName": "comment.bal",
"startLine": {
"line": 109,
"offset": 0
"offset": 31
},
"endLine": {
"line": 112,
Expand Down
Loading

0 comments on commit 79c3c98

Please sign in to comment.