I am building a VSCode-Extension
and I managed to call my function
via 'right-click' on the files.
This is my package.json
:
"main": "./extension.js",
"contributes": {
"commands": [{
"command": "flutter-localization-generator.create",
"title": "localize_it: create"
}],
"menus": {
"explorer/context": [{
"command": "flutter-localization-generator.create"
}]
}
The thing is that I need the URI
from where the user clicked on the method
. Is that possible? How do I access it inside the activate
?
function activate(context) {
console.log('Congratulations, your extension "flutter-localization-generator" is now active!');
let disposable = vscode.commands.registerCommand('flutter-localization-generator.create', function () {
console.log(context.globalStorageUri);
console.log(context.extensionUri);
console.log(context.extensionPath);
console.log(context.rootPath);
});
context.subscriptions.push(disposable);
}
I tried different of things but all of the above logs
do not get me the desired path
.