-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41256 from KavinduZoysa/fix-issue-34801
Make goto-def and renaming work for table and stream row type
- Loading branch information
Showing
20 changed files
with
425 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../modules/langserver-core/src/test/resources/definition/expected/project/defProject15.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"source": { | ||
"file": "projectls/defmodsource6.bal" | ||
}, | ||
"position": { | ||
"line": 3, | ||
"character": 19 | ||
}, | ||
"result": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 9, | ||
"character": 12 | ||
}, | ||
"end": { | ||
"line": 9, | ||
"character": 17 | ||
} | ||
}, | ||
"uri": "projectls/modules/lsmod3/lsmod3.bal" | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
...modules/langserver-core/src/test/resources/definition/sources/projectls/defmodsource6.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import projectls.lsmod3; | ||
|
||
function foo() { | ||
table<lsmod3:Human> tHuman = table [{id: 1, name: "Jane"}]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...ore/src/test/resources/rename/expected/project/rename_table_row_type_and_stream_type.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"source": { | ||
"file": "main.bal" | ||
}, | ||
"position": { | ||
"line": 19, | ||
"character": 23 | ||
}, | ||
"prepareRename": { | ||
"valid": true | ||
}, | ||
"result": { | ||
"changes": { | ||
"modules/module2/types.bal": [{ | ||
"range": { | ||
"start": { | ||
"line": 2, | ||
"character": 12 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"character": 17 | ||
} | ||
}, | ||
"newText": "Student" | ||
}], | ||
"main.bal": [{ | ||
"range": { | ||
"start": { | ||
"line": 18, | ||
"character": 19 | ||
}, | ||
"end": { | ||
"line": 18, | ||
"character": 24 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, { | ||
"range": { | ||
"start": { | ||
"line": 19, | ||
"character": 18 | ||
}, | ||
"end": { | ||
"line": 19, | ||
"character": 23 | ||
} | ||
}, | ||
"newText": "Student" | ||
}] | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
.../langserver-core/src/test/resources/rename/expected/single/rename_map_type_parameter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"source": { | ||
"file": "rename_map_type_parameter.bal" | ||
}, | ||
"position": { | ||
"line": 6, | ||
"character": 14 | ||
}, | ||
"prepareRename": { | ||
"valid": true | ||
}, | ||
"result": { | ||
"changes": { | ||
"rename_map_type_parameter.bal": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 5 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 11 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 8 | ||
}, | ||
"end": { | ||
"line": 6, | ||
"character": 14 | ||
} | ||
}, | ||
"newText": "Student" | ||
} | ||
] | ||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...ngserver-core/src/test/resources/rename/expected/single/rename_stream_type_parameter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"source": { | ||
"file": "rename_stream_type_parameter.bal" | ||
}, | ||
"position": { | ||
"line": 7, | ||
"character": 17 | ||
}, | ||
"prepareRename": { | ||
"valid": true | ||
}, | ||
"result": { | ||
"changes": { | ||
"rename_stream_type_parameter.bal": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 5 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 11 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 6, | ||
"character": 10 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 7, | ||
"character": 11 | ||
}, | ||
"end": { | ||
"line": 7, | ||
"character": 17 | ||
} | ||
}, | ||
"newText": "Student" | ||
} | ||
] | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...rver-core/src/test/resources/rename/expected/single/rename_table_row_type_parameter1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"source": { | ||
"file": "rename_table_row_type_parameter1.bal" | ||
}, | ||
"position": { | ||
"line": 6, | ||
"character": 16 | ||
}, | ||
"prepareRename": { | ||
"valid": true | ||
}, | ||
"result": { | ||
"changes": { | ||
"rename_table_row_type_parameter1.bal": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 5 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 11 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 10 | ||
}, | ||
"end": { | ||
"line": 6, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": "Student" | ||
} | ||
] | ||
} | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
...rver-core/src/test/resources/rename/expected/single/rename_table_row_type_parameter2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"source": { | ||
"file": "rename_table_row_type_parameter2.bal" | ||
}, | ||
"position": { | ||
"line": 7, | ||
"character": 16 | ||
}, | ||
"prepareRename": { | ||
"valid": true | ||
}, | ||
"result": { | ||
"changes": { | ||
"rename_table_row_type_parameter2.bal": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 5 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 11 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 6, | ||
"character": 10 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 7, | ||
"character": 10 | ||
}, | ||
"end": { | ||
"line": 7, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": "Student" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 8, | ||
"character": 11 | ||
}, | ||
"end": { | ||
"line": 8, | ||
"character": 17 | ||
} | ||
}, | ||
"newText": "Student" | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.