We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A command should be exposed in the command palette based on a custom variable set with setContext.
setContext
Although I set the value of the custom variable to true, the command is not available from the command palette.
true
master
Attached is an example of a "Hello World" extension (Change its suffix from zip to vsix): helloworld-sample-set-context-0.0.1.zip
zip
vsix
The command Hello World is not available in the command palette .
Hello World
package.json:
"contributes": { "commands": [ { "command": "extension.helloWorld", "title": "Hello World" } ], "menus": { "commandPalette": [ { "when": "tom", "command": "extension.helloWorld" } ] } }
extension.ts:
import * as vscode from 'vscode'; export async function activate(context: vscode.ExtensionContext) { await vscode.commands.executeCommand("setContext", "tom", true); const disposable = vscode.commands.registerCommand('extension.helloWorld', () => { vscode.window.showInformationMessage('Hello World!'); }); context.subscriptions.push(disposable); }
.vsix
yarn; yarn start:browser
localhost:3000
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug Description:
A command should be exposed in the command palette based on a custom variable set with
setContext
.Although I set the value of the custom variable to
true
, the command is not available from the command palette.Important Observation:
master
of Theia).Attached is an example of a "Hello World" extension (Change its suffix from
zip
tovsix
):helloworld-sample-set-context-0.0.1.zip
The command
Hello World
is not available in the command palette .package.json:
extension.ts:
Steps to Reproduce:
.vsix
file attached and copy it into the plugins directory under Theia's repository.yarn; yarn start:browser
.localhost:3000
in browser.Hello World
in the command palette.Hello World
is not available from the command palette.(!)Additional Information
master
.The text was updated successfully, but these errors were encountered: