Skip to content

Commit 83e2c93

Browse files
committed
Delay display of new options until sure they are needed
1 parent c730bfd commit 83e2c93

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
},
8282
{
8383
"view": "ObjectScriptExplorer",
84-
"contents": "Connect a workspace folder to an [InterSystems server](https://intersystems-community.github.io/vscode-objectscript/serverside/) if you want to export or import ObjectScript code.\n[Choose Server and Namespace](command:vscode-objectscript.connectFolderToServerNamespace)\nOr [hide this ObjectScript view](command:vscode-objectscript.hideExplorerForWorkspace) if it is not needed for the current workspace."
84+
"contents": "Connect a workspace folder to an [InterSystems server](https://intersystems-community.github.io/vscode-objectscript/serverside/) if you want to export or import ObjectScript code.\n[Choose Server and Namespace](command:vscode-objectscript.connectFolderToServerNamespace)\nOr [hide this ObjectScript view](command:vscode-objectscript.hideExplorerForWorkspace) if it is not needed for the current workspace.",
85+
"when": "vscode-objectscript.explorerRoots == 0"
8586
}
8687
],
8788
"menus": {

src/explorer/explorer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export class ObjectScriptExplorerProvider implements vscode.TreeDataProvider<Nod
127127
});
128128
}
129129
});
130+
await vscode.commands.executeCommand("setContext", "vscode-objectscript.explorerRoots", rootNodes.length);
130131
return rootNodes;
131132
}
132133
}

0 commit comments

Comments
 (0)