-
Notifications
You must be signed in to change notification settings - Fork 46
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 #516 from LakshanWeerasinghe/fix-#456
Get the enclosed resource, remote function definition for a given position
- Loading branch information
Showing
4 changed files
with
63 additions
and
2 deletions.
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
19 changes: 19 additions & 0 deletions
19
...r-ls-extension/src/test/resources/get_enclosed_func_def/config/current_package_ref_4.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,19 @@ | ||
{ | ||
"description": "current package reference", | ||
"filePath": "proj_1/services.bal", | ||
"position": { | ||
"line": 5, | ||
"offset": 24 | ||
}, | ||
"response": { | ||
"filePath": "proj_1/services.bal", | ||
"startLine": { | ||
"line": 2, | ||
"offset": 4 | ||
}, | ||
"endLine": { | ||
"line": 10, | ||
"offset": 5 | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...r-ls-extension/src/test/resources/get_enclosed_func_def/config/current_package_ref_5.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,19 @@ | ||
{ | ||
"description": "current package reference", | ||
"filePath": "proj_1/services.bal", | ||
"position": { | ||
"line": 17, | ||
"offset": 16 | ||
}, | ||
"response": { | ||
"filePath": "proj_1/services.bal", | ||
"startLine": { | ||
"line": 12, | ||
"offset": 4 | ||
}, | ||
"endLine": { | ||
"line": 20, | ||
"offset": 5 | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...enerator-ls-extension/src/test/resources/get_enclosed_func_def/source/proj_1/services.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,23 @@ | ||
public client class Client { | ||
|
||
resource function get path(boolean flag) returns string { | ||
do { | ||
if flag { | ||
return "path1"; | ||
} else { | ||
return "path2"; | ||
} | ||
} | ||
} | ||
|
||
remote function name(boolean flag) returns string { | ||
do { | ||
if flag { | ||
return "name1"; | ||
} else { | ||
return "name2"; | ||
} | ||
} | ||
} | ||
|
||
} |