Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for type parameter recognition #649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"source": "data_mapper/main.bal",
"position": {
"line": 14,
"offset": 0
},
"description": "Sample diagram node",
"codedata": {
"node": "FUNCTION_CALL",
"org": "ballerina",
"module": "io",
"symbol": "fileReadCsv",
"version": "1.6.1"
},
"output": {
"id": "31",
"metadata": {
"label": "fileReadCsv",
"description": "Read file content as a CSV.\nWhen the expected data type is record[], the first entry of the csv file should contain matching headers.\n```ballerina\nstring[][]|io:Error content = io:fileReadCsv(\"./resources/myfile.csv\");\nrecord{}[]|io:Error content = io:fileReadCsv(\"./resources/myfile.csv\");\n```",
"icon": "https://bcentral-packageicons.azureedge.net/images/ballerina_io_1.6.1.png"
},
"codedata": {
"node": "FUNCTION_CALL",
"org": "ballerina",
"module": "io",
"symbol": "fileReadCsv",
"version": "1.6.1",
"id": 341,
"inferredReturnType": "returnType[]"
},
"returning": false,
"properties": {
"returnType": {
"metadata": {
"label": "returnType",
"description": "The type of the return value (string[] or a Ballerina record)"
},
"valueType": "TYPE",
"valueTypeConstraint": "string[]|map<anydata>",
"placeholder": "string[]|map<anydata>",
"optional": false,
"editable": true,
"advanced": false,
"codedata": {
"kind": "PARAM_FOR_TYPE_INFER",
"originalName": "returnType"
}
},
"path": {
"metadata": {
"label": "path",
"description": "The CSV file path"
},
"valueType": "EXPRESSION",
"valueTypeConstraint": "string",
"placeholder": "\"\"",
"optional": false,
"editable": true,
"advanced": false,
"codedata": {
"kind": "REQUIRED",
"originalName": "path"
},
"typeMembers": [
{
"type": "string",
"packageInfo": "",
"kind": "BASIC_TYPE",
"selected": false
}
]
},
"skipHeaders": {
"metadata": {
"label": "skipHeaders",
"description": "Number of headers, which should be skipped prior to reading records"
},
"valueType": "EXPRESSION",
"valueTypeConstraint": "int",
"placeholder": "0",
"optional": true,
"editable": true,
"advanced": true,
"codedata": {
"kind": "DEFAULTABLE",
"originalName": "skipHeaders"
},
"typeMembers": [
{
"type": "int",
"packageInfo": "",
"kind": "BASIC_TYPE",
"selected": false
}
]
},
"type": {
"metadata": {
"label": "Variable Type",
"description": "Type of the variable"
},
"valueType": "TYPE",
"value": "returnType[]",
"placeholder": "var",
"optional": false,
"editable": false,
"advanced": false,
"codedata": {}
},
"variable": {
"metadata": {
"label": "Variable Name",
"description": "Name of the variable"
},
"valueType": "IDENTIFIER",
"value": "returnType",
"optional": false,
"editable": true,
"advanced": false
},
"checkError": {
"metadata": {
"label": "Check Error",
"description": "Trigger error flow"
},
"valueType": "FLAG",
"value": true,
"optional": false,
"editable": true,
"advanced": true
}
},
"flags": 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"module": "io",
"symbol": "println",
"version": "1.6.1",
"id": 351
"id": 361
},
"returning": false,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"module": "data.jsondata",
"symbol": "parseString",
"version": "0.2.0",
"id": 597,
"id": 618,
"inferredReturnType": "t"
},
"returning": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"module": "data.jsondata",
"symbol": "toJson",
"version": "0.2.0",
"id": 600
"id": 621
},
"returning": false,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"module": "log",
"symbol": "printInfo",
"version": "2.10.0",
"id": 278
"id": 284
},
"returning": false,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"module": "time",
"symbol": "utcFromCivil",
"version": "2.5.0",
"id": 574
"id": 553
},
"returning": false,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"object": "Client",
"symbol": "close",
"version": "3.0.2",
"id": 780
"id": 930
},
"returning": false,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"object": "Client",
"symbol": "init",
"version": "1.5.1",
"id": 2900
"id": 2645
},
"returning": false,
"properties": {
Expand Down
Loading
Loading