File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ A VS Code helper extension that contributes settings which define connections to
44For example:
55``` json
66 "intersystems.servers" : {
7- "myLocal " : {
7+ "my-local " : {
88 "webServer" : {
99 "scheme" : " http" ,
1010 "host" : " 127.0.0.1" ,
@@ -22,6 +22,24 @@ For example:
2222 "username" : " alice" ,
2323 "description" : " Development server serviced by central web host over HTTPS"
2424 },
25- "/default" : " myLocal "
25+ "/default" : " my-local "
2626 }
2727```
28+
29+ An extension XYZ needing to connect to InterSystems servers defines this extension as a dependency in its ` package.json `
30+
31+ ``` json
32+ "extensionDependencies" : [
33+ " intersystems-community.servermanager"
34+ ],
35+ ```
36+
37+ This helps users add server definitions to their [ user or workspace settings] ( https://code.visualstudio.com/docs/getstarted/settings ) .
38+
39+ Extension XYZ then gets the ` intersystems.servers ` object and uses it as needed, for example:
40+
41+ ``` ts
42+ const allServers = vscode .workspace .getConfiguration (' intersystems' ).get (' servers' );
43+ const mine = allServers [' my-server' ];
44+ const webHost = mine .webServer .host ;
45+ ```
You can’t perform that action at this time.
0 commit comments