Description
hi there 👋
in certain circumstances commands provided by an extension are called with arguments. for example:
"editor/context": [
{
"command": "extension.myCommand",
"when": "resourceLangId == cpp",
"group": "my-tests"
}
]
within your extension manifest (package.json
) creates a context menu item for myCommand
. when a user invokes that menu item by right-clicking and selecting it from the context menu, myCommand
is called with a single argument: the uri
for the file where the context menu was clicked.
my understanding just from poking around is that commands exposed via explorer/context
, editor/title
, and editor/title/context
have similar behavior (though in some cases they are called with more and / or different arguments).
it would be nice if all of these cases were documented - specifically: when a command will be called with additional arguments and what those arguments will be
thanks 🙏👍