mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
toolbar.md: link implementation
This commit is contained in:
parent
21e14cdf9d
commit
72a6c33b6b
@ -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.
|
* 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).
|
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).
|
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.
|
These objects can be created through calls to the `ActionManager.createActionPopupMenu()` and `createActionToolbar()` methods.
|
||||||
|
@ -4,6 +4,13 @@
|
|||||||
|
|
||||||
<link-summary>UI guidelines on using toolbars.</link-summary>
|
<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.
|
A toolbar provides quick access to frequently used actions and filters. It appears in dialogs, pop-ups, tool windows, lists, trees, and tables.
|
||||||
|
|
||||||
{width=428}
|
{width=428}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user