diff --git a/topics/basics/basic_action_system.md b/topics/basics/basic_action_system.md index 903eee15a..dfe2675fa 100644 --- a/topics/basics/basic_action_system.md +++ b/topics/basics/basic_action_system.md @@ -435,3 +435,49 @@ Executing actions can be achieved with [`ActionUtils.invokeAction()`](%gh-ic%/pl > If an action executed programmatically is under your control, extract its logic to a [service](plugin_services.md) or utility class and call it directly. > {style="warning"} + +## Action ID Code Insight{action-id-code-insight} + + +Code insight to defined Actions and Groups is provided by the _Plugin DevKit_ plugin. + +### Builtin Places + +- IntelliJ Platform API, for example [`ActionManager.getAction()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java) +- Test Framework API, for example [`CodeInsightTestFixture.performEditorAction()`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestFixture.java) +- String literal fields with the name `ACTION_ID` +- Constants defined in [`IdeActions`](%gh-ic%/platform/ide-core/src/com/intellij/openapi/actionSystem/IdeActions.java) + +### Custom Places + +Additional places can be configured to provide _Action ID_ reference using the bundled _IntelliLang_ plugin. +Common use cases include plugin-specific test utility code or configuration files. + +#### Code + +For string literal constants, parameters, and return values, use [`@Language`](%gh-java-annotations%/common/src/main/java/org/intellij/lang/annotations/Language.java) +annotation with `devkit-action-id`. + +```Java +public abstract class MyPluginTestCase + extends LightPlatformCodeInsightTestCase { + + protected void doTestInvokingSomeAction( + @Language("devkit-action-id") @NonNls final String actionId + /* more parameters */) { + } + +} +``` + +#### Other Places + +To setup _Action ID_ references in other places (for example, XML files) perform the following steps: + + + +1. Navigate to the place in sources +2. Invoke Inject language or reference intention +3. Choose Action ID Reference + + diff --git a/topics/intro/content_updates.md b/topics/intro/content_updates.md index 3e6262283..f3946d227 100644 --- a/topics/intro/content_updates.md +++ b/topics/intro/content_updates.md @@ -12,6 +12,13 @@ See [GitHub Changelog](https://github.com/JetBrains/intellij-sdk-docs/commits/ma ## 2025 +### March +{march-25} + +Minor Changes and Additions +: +- Document [](basic_action_system.md#action-id-code-insight) added in 2025.1. + ### February {february-25}