-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
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
workspace: add command mapping to plugin-system #9840
Comments
Is there a way to test this command's functionality? |
@dineshUmasankar generally you would create a vscode plugin that uses this functionality, package it and include it in the framework for test purposes. You can then execute these commands and confirm the behavior is correct. |
I would like to be assigned to this task if possible, but I require some help clarifying I have made a vscode plugin following the extension tutorial but I am having trouble going through the VS Code API finding this mapping equivalent method. As such, I cannot figure out how to call upon this specific functionality within a vscode plugin for the purposes of testing the functionality of the code provided. My attempts so far lead me to https://code.visualstudio.com/api/references/vscode-api#workspace, specifically the method: If anyone could point in the right direction, within the VS Code API, regarding upon how to call this function and its parameters. I would really appreciate it and apologize in advance for the beginner question, as I'm taking my time to carefully learn the ins-outs of Theia and Typescript. |
@dineshUmasankar to test it is quite simple, I created a plugin to test which you can use since you were having difficulty: The plugin simply executes the command: export function activate(context: vscode.ExtensionContext) {
let disposable = vscode.commands.registerCommand('vscode-open-config-file.test', () => {
vscode.commands.executeCommand('workbench.action.openWorkspaceConfigFile');
});
context.subscriptions.push(disposable);
} The command Error (theia):
To test the feature you would do the following:
I confirmed it works locally with the plugin and the mapping updates: |
@vince-fugnitto Thank you so much for the guidance and your time. I managed to get the test working successfully after fixing a couple build issues on my own hardware, and with your documentation. I apologize for the hassle and appreciate the opportunity to contribute significantly. |
Feature Description:
The command
workspace:openConfigFile
requires a mapping in the plugin system to be able to be executable by vscode plugins. We should therefore add an appropriate mapping forworkbench.action.openWorkspaceConfigFile
(vscode command id) to the plugin system like so:at:
theia/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts
Lines 240 to 242 in cff1eda
The text was updated successfully, but these errors were encountered: