vscode-server-connector
vscode-server-connector copied to clipboard
Disable deployments on minishift/CDK
I guess that means adding server adapter types, but who would want to publish files to CDK?
we decided not to fix this before releasing since this isnt critical but rather an enhancement.
and also other ctx menu item like restart in debug, etc...
Is it even possible to hide context menu actiosn on-the-fly based on some decision? My understanding is that this isn't even possible. The Actions are declared in the package.json and can only be enabled or disabled by some type of regex on the viewItem's label?
I'm inclined to reject this request for that reason. It'd be strange to have a weird string at the end of the label indicating the capabilities of such a server. It seems a limited API forces us to keep them.
But also, start / stop / deployments / publish are the 4 main features of a server adapter. Not all servers will support all 4, but all 4 are primary UI elements and are expected to be present for all 4. I admit it's kinda bad form to have actions that aren't usable, but, the RSP will return that the action is not implemented.
If there was any other way to disable an action other than by regex on its string label, that'd be worth looking into, but, is there?
If you want to show/hide commands in the UI we must use the contextValue in the TreeItem object which is used in the "when" clause to check which item have to be shown. The contextValue content is not shown anywhere in the UI, the user only see the label + iconpath and maybe the resourceuri which we don't use. Currently we use the contextValue to store the state of a server so the right commands are displayed (start cmd when the server is stopped... ) but we can add whatever we want and change the regex exp to make it work with different strings.
Wont fix. API doesn't allow us to know in advance whether a server type supports deployment or not.