2020-12-02 10:56:46 +01:00
..
2020-10-07 15:44:55 +02:00
2020-10-15 17:10:31 +02:00
2020-10-15 17:10:31 +02:00
2020-09-21 17:15:08 +02:00
2020-02-19 21:51:48 -08:00

Action Basics Sample Project JetBrains IntelliJ Platform SDK Docs

Reference: Action System in IntelliJ SDK Docs

Quickstart

The Action Basics Sample Project demonstrates the process of registering actions in various configurations. Each action is an extension of the AnAction abstract class and brings the possibility of extending the IDE with an event performed with the user interaction - i.e., clicking the button, using the keyboard or mouse shortcuts.

This Plugin registers the PopupDialogAction action, which provides a popup dialog as a feedback, in three different ways:

  • by assigning the keyboard (Ctrl/Cmd+Alt+A, C) and mouse shortcuts (Ctrl/Cmd + Mouse Button 3 + Double Click),
  • by adding an action to the ToolsMenu directly, and as part of new groups added to the Tools menu,
  • by adding an action to a new group in the EditorPopupMenu, which is the Editor's context menu.

Additional features of the plugin:

  • Using the <override-text> element in an <action> element is demonstrated in the plugin.xml declaration to add the PopupDialogAction action directly to the ToolsMenu.
  • Localization of action and group text and description attributes using a <resource-bundle> is demonstrated in the declaration to add a new group to the EditorPopupMenu.

Actions

ID Implementation Extension Point Class
org.intellij.sdk.action.PopupDialogAction PopupDialogAction AnAction
org.intellij.sdk.action.GroupPopDialogAction PopupDialogAction AnAction
org.intellij.sdk.action.CustomGroupedAction PopupDialogAction AnAction
org.intellij.sdk.action.CustomDefaultActionGroup CustomDefaultActionGroup ActionGroup
org.intellij.sdk.action.DynamicActionGroup DynamicActionGroup ActionGroup

Reference: Action System in IntelliJ SDK Docs