Skip to content

Test menu contributions #8197

Closed
Closed

Description

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

Activity

  1. prog110 commented on Jan 15, 2017

    @prog110

    Johannes Rieken (@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.

  2. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions