You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently menu nodes (whether they be sub-menus, groups, separators or actions) are pure data. users of the MenuNode interfaces must implement all concerns like whether a menu item is visible in a context or how to adapt menu command parameters (for example, converting Widget instances to a view id to send to a plugin) themselves. In order to prevent breaking layers, we have introduced a registry infrastructure (MenuCommandAdapterRegistry ) that allows in particular the VS Code contribution handlers to influence the execution and visibility of items in toolbars and menus.
By making menu nodes active and polymorphous (for example, replacing the command field with a run method), we could simplify the menu item handling and move the complexity to where it is needed and hide it from the rest of the system.
The text was updated successfully, but these errors were encountered:
Fixeseclipse-theia#14217
Makes menu nodes active object that can decide on visibility,
enablement, etc. themselves.
Contributed on behalf of STMicroelectronics
Signed-off-by: Thomas Mäder <[email protected]>
tsmaeder
added a commit
to tsmaeder/theia
that referenced
this issue
Dec 27, 2024
Fixeseclipse-theia#14217
Makes menu nodes active object that can decide on visibility,
enablement, etc. themselves.
Contributed on behalf of STMicroelectronics
Signed-off-by: Thomas Mäder <[email protected]>
Feature Description:
Currently menu nodes (whether they be sub-menus, groups, separators or actions) are pure data. users of the
MenuNode
interfaces must implement all concerns like whether a menu item is visible in a context or how to adapt menu command parameters (for example, converting Widget instances to a view id to send to a plugin) themselves. In order to prevent breaking layers, we have introduced a registry infrastructure (MenuCommandAdapterRegistry
) that allows in particular the VS Code contribution handlers to influence the execution and visibility of items in toolbars and menus.By making menu nodes active and polymorphous (for example, replacing the
command
field with arun
method), we could simplify the menu item handling and move the complexity to where it is needed and hide it from the rest of the system.The text was updated successfully, but these errors were encountered: