toolbar.md: link implementation

This commit is contained in:
Yann Cébron 2024-10-22 11:09:17 +02:00
parent 21e14cdf9d
commit 72a6c33b6b
2 changed files with 9 additions and 1 deletions

View File

@ -416,7 +416,8 @@ Two steps are required to register an action from code:
* Second, the action needs to be added to one or more groups.
To get an instance of an action group by ID, it is necessary to call `ActionManager.getAction()` and cast the returned value to [`DefaultActionGroup`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java).
## Building UI from Actions
## Building a Toolbar/Popup Menu from Actions
{id="buildingToolbarPopupMenu"}
If a plugin needs to include a toolbar or popup menu built from a group of actions in its user interface, that is achieved through [`ActionPopupMenu`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionPopupMenu.java) and [`ActionToolbar`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionToolbar.java).
These objects can be created through calls to the `ActionManager.createActionPopupMenu()` and `createActionToolbar()` methods.

View File

@ -4,6 +4,13 @@
<link-summary>UI guidelines on using toolbars.</link-summary>
<tldr>
**Implementation:** [](basic_action_system.md#buildingToolbarPopupMenu)
</tldr>
A toolbar provides quick access to frequently used actions and filters. It appears in dialogs, pop-ups, tool windows, lists, trees, and tables.
![](toolbar_example.png){width=428}