-
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.
- Loading branch information
Showing
4 changed files
with
80 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
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
4 changes: 4 additions & 0 deletions
4
...ge-server/modules/langserver-core/src/test/resources/project/hello_service/Ballerina.toml
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,4 @@ | ||
[package] | ||
org = "baltest" | ||
name = "long_running" | ||
version = "0.1.0" |
31 changes: 31 additions & 0 deletions
31
language-server/modules/langserver-core/src/test/resources/project/hello_service/main.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,31 @@ | ||
import ballerina/io; | ||
|
||
public class Listener { | ||
public isolated function 'start() returns error? { | ||
} | ||
public isolated function gracefulStop() returns error? { | ||
} | ||
public isolated function immediateStop() returns error? { | ||
} | ||
public isolated function detach(service object {} s) returns error? { | ||
} | ||
public isolated function attach(service object {} s, string[]|string? name = ()) returns error? { | ||
return self.register(s, name); | ||
} | ||
isolated function register(service object {} s, string[]|string? name) returns error? { | ||
return (); | ||
} | ||
} | ||
|
||
listener Listener lsn = new; | ||
|
||
service /hello on lsn { | ||
|
||
function init() { | ||
io:println("Hello, World!"); | ||
} | ||
|
||
resource function get foo() returns int { | ||
return 1; | ||
} | ||
} |