Skip to content
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

Test menu contributions #8197

Closed
2 tasks done
jrieken opened this issue Jun 27, 2016 · 1 comment
Closed
2 tasks done

Test menu contributions #8197

jrieken opened this issue Jun 27, 2016 · 1 comment

Comments

@jrieken
Copy link
Member

jrieken commented Jun 27, 2016

Tests #3192

We added a new contribution point called menus which allows extension writers to contribute to different (context) menus. Make sure that

  • you get proper intellisense and documentation when authoring package.json
  • you get proper validation when authoring package.json
  • you get warnings/errors when launching with a bogus menus-contributions
  • you get warnings when a menu item references a missing command
  • you can contribute an icon to commands in the commands section
  • an icon can be a path or a themable icon which is two values for the light or dark theme
  • you can contribute menu items to editor/title, editor/context, and explorer/context
  • a menu item can define a when condition under which it shows
  • the when is the same as the keybindings-when and can use the same keys
  • the when can use two new keys resourceScheme and resourceLangId which are available without an editor - think of the explorer context menu
  • the when can be a boolean configuration value, e.g config.editor.lineNumbers
  • menus update when keys change, e.g. editorHasSelection
  • a menu item can declare an alternative command which shows when pressing alt and hovering (not in context menus)
  • a menu item can define a group which is used to group and separate the item from others
  • there is a special group called navigation which means that the menu item is moved to the top of the context menus or in the title and not overflow area of editor actions
  • the group can be like navigation@10 where the @10 defines the sorting inside that group
  • the command is passed the URI of the selected resource - the file from the explorer or the document uri from the editor
@thekalinga
Copy link

thekalinga commented Jan 15, 2017

@jrieken Is there a way currently to contribute commands to exclusively to explorer context menu & add a shortcut for it.

For eg., if I select a folder in explorer & press alt+insert, I want to add the ability for the user to select a set of options the way intellij show.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants