Rename basic_action_system.md to action_system.md

This commit is contained in:
Karol Lewandowski 2025-03-10 14:44:10 +01:00
parent 676d095f6f
commit 625fe7df78
26 changed files with 98 additions and 98 deletions

View File

@ -100,8 +100,8 @@
<toc-element topic="color_scheme_management.md"/> <toc-element topic="color_scheme_management.md"/>
<toc-element topic="themes_metadata.md"/> <toc-element topic="themes_metadata.md"/>
</toc-element> </toc-element>
<toc-element topic="basic_action_system.md" accepts-web-file-names="action_system.html"> <toc-element topic="action_system.md" accepts-web-file-names="action_system.html,basic-action-system.html">
<toc-element topic="actions_tutorial.md" accepts-web-file-names="action-system.html"> <toc-element topic="actions_tutorial.md">
<toc-element topic="working_with_custom_actions.md"/> <toc-element topic="working_with_custom_actions.md"/>
<toc-element topic="grouping_action.md"/> <toc-element topic="grouping_action.md"/>
</toc-element> </toc-element>

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Notable Changes in IntelliJ Platform and Plugins API 2020.* # Notable Changes in IntelliJ Platform and Plugins API 2020.*
@ -27,7 +27,7 @@ Extensible HTML Lexer/Parser
Please note that old API from `com.intellij.lexer.BaseHtmlLexer` is no longer working. Please note that old API from `com.intellij.lexer.BaseHtmlLexer` is no longer working.
Action System Action System
: New features in [Action System](basic_action_system.md): `<override-text>` works now for [`<group>`](plugin_configuration_file.md#idea-plugin__actions__group) as well, [`<synonym>`](plugin_configuration_file.md#idea-plugin__actions__action__synonym) provides alternative names when searching for actions, and groups can be excluded from search results. : New features in [](action_system.md): `<override-text>` works now for [`<group>`](plugin_configuration_file.md#idea-plugin__actions__group) as well, [`<synonym>`](plugin_configuration_file.md#idea-plugin__actions__action__synonym) provides alternative names when searching for actions, and groups can be excluded from search results.
Welcome Screen customization Welcome Screen customization
: To provide additional custom tabs, implement [`WelcomeTabFactory`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/wm/WelcomeTabFactory.java) and register in `com.intellij.welcomeTabFactory` extension point. : To provide additional custom tabs, implement [`WelcomeTabFactory`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/wm/WelcomeTabFactory.java) and register in `com.intellij.welcomeTabFactory` extension point.

View File

@ -1,6 +1,6 @@
# Notable Changes in IntelliJ Platform and Plugins API 2022.* <!-- Copyright 2000-2025 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<!-- Copyright 2000-2023 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. --> # Notable Changes in IntelliJ Platform and Plugins API 2022.*
<link-summary>List of known Notable API Changes in 2022.*</link-summary> <link-summary>List of known Notable API Changes in 2022.*</link-summary>
@ -25,7 +25,7 @@ Injection Text Formatting
: Delegation of formatting can be controlled using dedicated [extension point](language_injection.md#formatting). : Delegation of formatting can be controlled using dedicated [extension point](language_injection.md#formatting).
Specifying Threading for Actions Specifying Threading for Actions
: Implementations of `AnAction` need to override `getActionUpdateThread()` as detailed in [](basic_action_system.md#principal-implementation-overrides). : Implementations of `AnAction` need to override `getActionUpdateThread()` as detailed in [](action_system.md#principal-implementation-overrides).
Threading assertions in tests Threading assertions in tests
: All rules for [threading](threading_model.md) are now checked in tests as well. : All rules for [threading](threading_model.md) are now checked in tests as well.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Notable Changes in IntelliJ Platform and Plugins API 2024.* # Notable Changes in IntelliJ Platform and Plugins API 2024.*
@ -49,7 +49,7 @@ Testing: indexes
: Indexes are now built asynchronously during tests, see [](testing_faq.md#how-to-handle-indexing). : Indexes are now built asynchronously during tests, see [](testing_faq.md#how-to-handle-indexing).
`ToggleAction` in popups `ToggleAction` in popups
: No longer closes popups, see [](basic_action_system.md#toggleActionPopupMenus) : No longer closes popups, see [](action_system.md#toggleActionPopupMenus)
### Kotlin Plugin ### Kotlin Plugin

View File

@ -51,9 +51,9 @@ Custom Swing components can also provide additional properties via [`UiInspector
### Action ### Action
| Type | Properties | | Type | Properties |
|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`AnAction`](basic_action_system.md) | <p><control>Action</control> - [`AnAction`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java) implementation</p><p><control>Action ID</control> - Action `id`</p><p><control>Action Plugin ID</control> - contributing plugin</p> | | [`AnAction`](action_system.md) | <p><control>Action</control> - [`AnAction`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java) implementation</p><p><control>Action ID</control> - Action `id`</p><p><control>Action Plugin ID</control> - contributing plugin</p> |
| [`ActionToolbar`](basic_action_system.md) | <p><control>Toolbar Group</control> - Action Group ID</p><p><control>All Toolbar Groups</control> - contained Action Group IDs</p><p><control>Target component</control> - `ActionToolbar.setTargetComponent()`</p> | | [`ActionToolbar`](action_system.md) | <p><control>Toolbar Group</control> - Action Group ID</p><p><control>All Toolbar Groups</control> - contained Action Group IDs</p><p><control>Target component</control> - `ActionToolbar.setTargetComponent()`</p> |
### IDE and UI Components ### IDE and UI Components

View File

@ -1,6 +1,6 @@
<!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Actions # Action System
<web-summary> <web-summary>
Adding custom actions to menus and toolbars. Implement and register actions, and handle user interactions efficiently. Adding custom actions to menus and toolbars. Implement and register actions, and handle user interactions efficiently.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Documents # Documents
@ -13,7 +13,7 @@ The IntelliJ Platform handles encoding and line break conversions when loading a
| Context | API | | Context | API |
|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Action](basic_action_system.md) | [`AnActionEvent.getData(CommonDataKeys.EDITOR).getDocument()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) | | [Action](action_system.md) | [`AnActionEvent.getData(CommonDataKeys.EDITOR).getDocument()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) |
| [PSI File](psi_files.md) | [`PsiDocumentManager.getDocument()`/`getCachedDocument()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiDocumentManager.java) | | [PSI File](psi_files.md) | [`PsiDocumentManager.getDocument()`/`getCachedDocument()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiDocumentManager.java) |
| [Virtual File](virtual_file.md) | <p>[`FileDocumentManager.getDocument()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) (forces the document content to be loaded from a disk if it wasn't loaded previously)</p><p>[`FileDocumentManager.getCachedDocument()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) (use if only open or possibly modified documents are relevant)</p> | | [Virtual File](virtual_file.md) | <p>[`FileDocumentManager.getDocument()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) (forces the document content to be loaded from a disk if it wasn't loaded previously)</p><p>[`FileDocumentManager.getCachedDocument()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) (use if only open or possibly modified documents are relevant)</p> |

View File

@ -23,8 +23,8 @@ The [`PsiElement`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.jav
## How do I get a PSI element? ## How do I get a PSI element?
| Context | API | | Context | API |
|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Action](basic_action_system.md) | <p>[`AnActionEvent.getData(CommonDataKeys.PSI_ELEMENT)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)</p><p>Note: If an editor is currently open and the element under caret is a [reference](psi_references.md), this will return the result of resolving the reference.</p> | | [Action](action_system.md) | <p>[`AnActionEvent.getData(CommonDataKeys.PSI_ELEMENT)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)</p><p>Note: If an editor is currently open and the element under caret is a [reference](psi_references.md), this will return the result of resolving the reference.</p> |
| [PSI File](psi_files.md) | <p>[`PsiFile.findElementAt(offset)`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiFile.java) - This returns a leaf element at the specified offset, normally a lexer token. Use `PsiTreeUtil.getParentOfType()` to find the element of the exact type.</p><p>[`PsiRecursiveElementWalkingVisitor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiRecursiveElementWalkingVisitor.java)</p> | | [PSI File](psi_files.md) | <p>[`PsiFile.findElementAt(offset)`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiFile.java) - This returns a leaf element at the specified offset, normally a lexer token. Use `PsiTreeUtil.getParentOfType()` to find the element of the exact type.</p><p>[`PsiRecursiveElementWalkingVisitor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiRecursiveElementWalkingVisitor.java)</p> |
| [Reference](psi_references.md) | [`PsiReference.resolve()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReference.java) | | [Reference](psi_references.md) | [`PsiReference.resolve()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReference.java) |

View File

@ -1,6 +1,6 @@
# PSI Files <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> # PSI Files
<link-summary>PSI File represents file content as a hierarchy of elements in a particular programming language.</link-summary> <link-summary>PSI File represents file content as a hierarchy of elements in a particular programming language.</link-summary>
@ -15,8 +15,8 @@ the same file is represented by multiple `PsiFile` instances if the file belongs
## How do I get a PSI file? ## How do I get a PSI file?
| Context | API | | Context | API |
|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Action](basic_action_system.md) | [`AnActionEvent.getData(CommonDataKeys.PSI_FILE)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) | | [Action](action_system.md) | [`AnActionEvent.getData(CommonDataKeys.PSI_FILE)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) |
| [Document](documents.md) | [`PsiDocumentManager.getPsiFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiDocumentManager.java) | | [Document](documents.md) | [`PsiDocumentManager.getPsiFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiDocumentManager.java) |
| [PSI Element](psi_elements.md) | [`PsiElement.getContainingFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.java) (may return `null` if the PSI element is not contained in a file) | | [PSI Element](psi_elements.md) | [`PsiElement.getContainingFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.java) (may return `null` if the PSI element is not contained in a file) |
| [Virtual File](virtual_file.md) | [`PsiManager.findFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiManager.java), [`PsiUtilCore.toPsiFiles()`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/PsiUtilCore.java) | | [Virtual File](virtual_file.md) | [`PsiManager.findFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiManager.java), [`PsiUtilCore.toPsiFiles()`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/PsiUtilCore.java) |

View File

@ -577,7 +577,7 @@ Meanwhile, try to speed up what you can in your plugin as it will be generally b
#### Action Update #### Action Update
For implementations of [`AnAction`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java), plugin authors should specifically For implementations of [`AnAction`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java), plugin authors should specifically
review the documentation of `AnAction.getActionUpdateThread()` in the [](basic_action_system.md) section as it describes how threading works for actions. review the documentation of `AnAction.getActionUpdateThread()` in the [](action_system.md) section as it describes how threading works for actions.
#### Minimize Write Actions Scope #### Minimize Write Actions Scope

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Virtual Files # Virtual Files
@ -15,8 +15,8 @@ Contents of a `VirtualFile` are treated as a stream of bytes, but concepts like
## How do I get a virtual file? ## How do I get a virtual file?
| Context | API | | Context | API |
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Action](basic_action_system.md) | <p>[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)</p><p>[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) for multiple selection</p> | | [Action](action_system.md) | <p>[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)</p><p>[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) for multiple selection</p> |
| [Document](documents.md) | [`FileDocumentManager.getFile()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) | | [Document](documents.md) | [`FileDocumentManager.getFile()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) |
| [PSI File](psi_files.md) | [`PsiFile.getVirtualFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiFile.java) (may return `null` if the PSI file exists only in memory) | | [PSI File](psi_files.md) | [`PsiFile.getVirtualFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiFile.java) (may return `null` if the PSI file exists only in memory) |
| File Name | [`FilenameIndex.getVirtualFilesByName()`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/FilenameIndex.java) | | File Name | [`FilenameIndex.getVirtualFilesByName()`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/FilenameIndex.java) |

View File

@ -62,7 +62,7 @@ Since 2024.2, this includes also [intentions](code_intentions.md) and [quick-fix
#### Actions #### Actions
For [](basic_action_system.md) available during Dumb Mode, extend [`DumbAwareAction`](%gh-ic%/platform/ide-core/src/com/intellij/openapi/project/DumbAwareAction.java) (do not override `AnAction.isDumbAware()` instead). For [actions](action_system.md) available during Dumb Mode, extend [`DumbAwareAction`](%gh-ic%/platform/ide-core/src/com/intellij/openapi/project/DumbAwareAction.java) (do not override `AnAction.isDumbAware()` instead).
#### Other API #### Other API

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Actions # Actions
@ -16,4 +16,4 @@ Subgroups of the group can form submenus of a menu.
The user can customize all registered actions via [Menus and Toolbars](https://www.jetbrains.com/help/idea/customize-actions-menus-and-toolbars.html) settings. The user can customize all registered actions via [Menus and Toolbars](https://www.jetbrains.com/help/idea/customize-actions-menus-and-toolbars.html) settings.
Please see [Action System](basic_action_system.md) on how to create and register actions in the IDE. Please see [](action_system.md) on how to create and register actions in the IDE.

View File

@ -771,7 +771,7 @@ Example
{#idea-plugin__resource-bundle} {#idea-plugin__resource-bundle}
A resource bundle to be used with message key attributes in extension declarations and for A resource bundle to be used with message key attributes in extension declarations and for
[action and group localization](basic_action_system.md#localizing-actions-and-groups). [action and group localization](action_system.md#localizing-actions-and-groups).
A single [`<idea-plugin>`](#idea-plugin) element can contain multiple `<resource-bundle>` elements. A single [`<idea-plugin>`](#idea-plugin) element can contain multiple `<resource-bundle>` elements.
{type="narrow"} {type="narrow"}
@ -790,7 +790,7 @@ Example
<tldr> <tldr>
**Reference:** [Actions](basic_action_system.md) **Reference:** [Actions](action_system.md)
</tldr> </tldr>
@ -807,7 +807,7 @@ Attributes
- `resource-bundle` _(optional; available since 2020.1)_<br/> - `resource-bundle` _(optional; available since 2020.1)_<br/>
Defines the dedicated actions resource bundle. Defines the dedicated actions resource bundle.
See [Localizing Actions and Groups](basic_action_system.md#localizing-actions-and-groups) See [Localizing Actions and Groups](action_system.md#localizing-actions-and-groups)
for more details. for more details.
Children Children
@ -832,7 +832,7 @@ Example
<tldr> <tldr>
**Reference:** [Registering Actions in plugin.xml](basic_action_system.md#registering-actions-in-pluginxml) **Reference:** [Registering Actions in plugin.xml](action_system.md#registering-actions-in-pluginxml)
</tldr> </tldr>
@ -855,7 +855,7 @@ Attributes
- `class` _(**required**)_<br/> - `class` _(**required**)_<br/>
The fully qualified name of the action implementation class. The fully qualified name of the action implementation class.
- `text` _(**required** if the action is not - `text` _(**required** if the action is not
[localized](basic_action_system.md#localizing-actions-and-groups))_<br/> [localized](action_system.md#localizing-actions-and-groups))_<br/>
The default long-version text to be displayed for the action (tooltip for toolbar button or text for menu item). The default long-version text to be displayed for the action (tooltip for toolbar button or text for menu item).
- `description` _(optional)_<br/> - `description` _(optional)_<br/>
The text which is displayed in the status bar when the action is focused. The text which is displayed in the status bar when the action is focused.
@ -1126,7 +1126,7 @@ Required
Attributes Attributes
: :
- `key` _(`key` or `text` is **required**)_<br/> - `key` _(`key` or `text` is **required**)_<br/>
The key of the synonym text provided in a [message bundle](basic_action_system.md#localizing-actions-and-groups). The key of the synonym text provided in a [message bundle](action_system.md#localizing-actions-and-groups).
- `text` _(`key` or `text` is **required**)_<br/> - `text` _(`key` or `text` is **required**)_<br/>
The synonym text. The synonym text.
@ -1170,7 +1170,7 @@ Example
<tldr> <tldr>
**Reference:** [Grouping Actions](basic_action_system.md#grouping-actions) **Reference:** [Grouping Actions](action_system.md#grouping-actions)
</tldr> </tldr>
@ -1196,7 +1196,7 @@ Attributes
[`DefaultActionGroup`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java) [`DefaultActionGroup`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
is used. is used.
- `text` _(**required** if the `popup` is `true` and the group is not - `text` _(**required** if the `popup` is `true` and the group is not
[localized](basic_action_system.md#localizing-actions-and-groups))_<br/> [localized](action_system.md#localizing-actions-and-groups))_<br/>
The default long-version text to be displayed for the group (text for the menu item showing the submenu). The default long-version text to be displayed for the group (text for the menu item showing the submenu).
- `description` _(optional)_<br/> - `description` _(optional)_<br/>
The text which is displayed in the status bar when the group is focused. The text which is displayed in the status bar when the group is focused.

View File

@ -20,7 +20,7 @@ Integration Testing
Minor Changes and Additions Minor Changes and Additions
: :
- Document [](basic_action_system.md#action-id-code-insight) added in 2025.1. - Document [](action_system.md#action-id-code-insight) added in 2025.1.
### February ### February
{february-25} {february-25}
@ -133,7 +133,7 @@ Language Server Protocol (LSP)
Minor Changes and Additions Minor Changes and Additions
: :
- Add information about [executing actions programmatically](basic_action_system.md#executing-actions-programmatically). - Add information about [executing actions programmatically](action_system.md#executing-actions-programmatically).
- Please see [](tools_gradle_intellij_plugin.md#attaching-sources) on how to set up 2023.2/3 IDEs for Gradle plugin projects. - Please see [](tools_gradle_intellij_plugin.md#attaching-sources) on how to set up 2023.2/3 IDEs for Gradle plugin projects.
### October ### October
@ -238,7 +238,7 @@ Plugin User Experience
Minor Changes and Additions Minor Changes and Additions
: :
- Add information about threading in Actions in [](basic_action_system.md#principal-implementation-overrides). - Add information about threading in Actions in [](action_system.md#principal-implementation-overrides).
### October ### October
{#october-22} {#october-22}
@ -282,7 +282,7 @@ Status Bar Widgets
Minor Changes and Additions Minor Changes and Additions
: :
- Add overview of [](basic_action_system.md#useful-action-base-classes). - Add overview of [](action_system.md#useful-action-base-classes).
### June ### June
{#june-22} {#june-22}

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Key Topics # Key Topics
@ -30,7 +30,7 @@ The PSI parses code, builds indexes, and creates a semantic model.
The IntelliJ Platform is extremely extensible, and most features and services can be extended. The IntelliJ Platform is extremely extensible, and most features and services can be extended.
Some common extension points are: Some common extension points are:
* [](basic_action_system.md) - menu and toolbar items * [](action_system.md) - menu and toolbar items
* [](code_inspections.md) - code analysis that looks at the syntax trees and semantic models and highlight issues in the editor. * [](code_inspections.md) - code analysis that looks at the syntax trees and semantic models and highlight issues in the editor.
* [](code_intentions.md) - context-specific actions that are available in the <shortcut>Alt+Enter</shortcut> menu when the text caret is at a particular location. * [](code_intentions.md) - context-specific actions that are available in the <shortcut>Alt+Enter</shortcut> menu when the text caret is at a particular location.
* [](code_completion.md). * [](code_completion.md).

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Working with Icons # Working with Icons
@ -13,7 +13,7 @@
</tldr> </tldr>
Icons are used widely by IntelliJ Platform plugins. Icons are used widely by IntelliJ Platform plugins.
Plugins need icons mostly for [](basic_action_system.md), custom component renderers, [](tool_windows.md), etc. Plugins need icons mostly for [actions](action_system.md), custom component renderers, [](tool_windows.md), etc.
> A plugin _logo_, which represents the plugin itself, has different requirements than icons used within plugins. > A plugin _logo_, which represents the plugin itself, has different requirements than icons used within plugins.
> For more information, see the [](plugin_icon_file.md) section. > For more information, see the [](plugin_icon_file.md) section.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Project # Project
@ -63,8 +63,8 @@ Basic API classes and interfaces for the concepts of [`Project`](%gh-ic%/platfor
A Project instance is available in multiple contexts: A Project instance is available in multiple contexts:
| Context | API | | Context | API |
|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Action](basic_action_system.md) | <p>[`AnActionEvent.getProject()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)</p><p>[`DataContext.getData(CommonDataKeys.PROJECT)`](%gh-ic%/platform/core-ui/src/openapi/actionSystem/DataContext.java)</p> | | [Action](action_system.md) | <p>[`AnActionEvent.getProject()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)</p><p>[`DataContext.getData(CommonDataKeys.PROJECT)`](%gh-ic%/platform/core-ui/src/openapi/actionSystem/DataContext.java)</p> |
| [Editor](editor_basics.md) | [`Editor.getProject()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/editor/Editor.java) | | [Editor](editor_basics.md) | [`Editor.getProject()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/editor/Editor.java) |
| [Module](module.md) | [`Module.getProject()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/module/Module.java) | | [Module](module.md) | [`Module.getProject()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/module/Module.java) |
| [PSI](psi.md) | [`PsiElement.getProject()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.java) | | [PSI](psi.md) | [`PsiElement.getProject()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.java) |

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Grouping Actions # Grouping Actions
@ -25,7 +25,7 @@ The `id` attribute must be unique, so incorporating the plugin ID or package nam
The `popup` attribute determines whether actions in the group are placed in a submenu. The `popup` attribute determines whether actions in the group are placed in a submenu.
The `icon` attribute specifies the FQN of an [`Icon`](icons.md) object to be displayed. The `icon` attribute specifies the FQN of an [`Icon`](icons.md) object to be displayed.
No `compact` attribute is specified, which means this group will support submenus. No `compact` attribute is specified, which means this group will support submenus.
See [](basic_action_system.md#registering-actions-in-pluginxml) for more information about these attributes. See [](action_system.md#registering-actions-in-pluginxml) for more information about these attributes.
```xml ```xml
<group <group
@ -165,7 +165,7 @@ In the `<action>` element declaration below:
</group> </group>
``` ```
Now the translations for the `text` and `description` attributes must be provided in the resource bundle [`BasicActionsBundle.properties`](%gh-sdk-samples-master%/action_basics/src/main/resources/messages/BasicActionsBundle.properties) file according to [Localizing Actions and Groups](basic_action_system.md#localizing-actions-and-groups). Now the translations for the `text` and `description` attributes must be provided in the resource bundle [`BasicActionsBundle.properties`](%gh-sdk-samples-master%/action_basics/src/main/resources/messages/BasicActionsBundle.properties) file according to [](action_system.md#localizing-actions-and-groups).
Note there are two sets of `text` and `description` translations, one for the action and one for the group. Note there are two sets of `text` and `description` translations, one for the action and one for the group.
Conceivably, there could be another set of translations for the action if it used the [`<override-text>`](plugin_configuration_file.md#idea-plugin__actions__action__override-text) attribute. Conceivably, there could be another set of translations for the action if it used the [`<override-text>`](plugin_configuration_file.md#idea-plugin__actions__action__override-text) attribute.

View File

@ -42,7 +42,7 @@ public class PopupDialogAction extends AnAction {
> `AnAction` classes do not have class fields of any kind. > `AnAction` classes do not have class fields of any kind.
> This restriction prevents memory leaks. > This restriction prevents memory leaks.
> For more information about why, see [](basic_action_system.md#action-implementation). > For more information about why, see [](action_system.md#action-implementation).
> >
{style="warning"} {style="warning"}
@ -56,7 +56,7 @@ Before fleshing out those methods, to complete this minimal implementation, `Pop
Actions are registered by declaring them in code or by declaring them in the [`<actions>`](plugin_configuration_file.md#idea-plugin__actions) section of a [plugin configuration file](plugin_configuration_file.md). Actions are registered by declaring them in code or by declaring them in the [`<actions>`](plugin_configuration_file.md#idea-plugin__actions) section of a [plugin configuration file](plugin_configuration_file.md).
This section describes using IDE tooling - the <control>New Action</control> form - to add a declaration to the <path>plugin.xml</path> file and then tuning registration attributes manually. This section describes using IDE tooling - the <control>New Action</control> form - to add a declaration to the <path>plugin.xml</path> file and then tuning registration attributes manually.
A more comprehensive explanation of action registration is available in the [](basic_action_system.md#registering-actions) section of this guide. A more comprehensive explanation of action registration is available in the [](action_system.md#registering-actions) section of this guide.
### Registering an Action with the New Action Form ### Registering an Action with the New Action Form
@ -109,7 +109,7 @@ This declaration is enough, but adding more attributes is discussed in the next
### Setting Registration Attributes Manually ### Setting Registration Attributes Manually
An action declaration can be added manually to the <path>plugin.xml</path> file. An action declaration can be added manually to the <path>plugin.xml</path> file.
An exhaustive list of declaration elements and attributes is presented in [](basic_action_system.md#registering-actions-in-pluginxml). An exhaustive list of declaration elements and attributes is presented in [](action_system.md#registering-actions-in-pluginxml).
Attributes are added by selecting them from the <control>New Action</control> form or by editing the registration declaration directly in the <path>plugin.xml</path> file. Attributes are added by selecting them from the <control>New Action</control> form or by editing the registration declaration directly in the <path>plugin.xml</path> file.
The [`<action>`](plugin_configuration_file.md#idea-plugin__actions__action) declaration for `PopupDialogAction` in the `action_basics` [plugin.xml](%gh-sdk-samples-master%/action_basics/src/main/resources/META-INF/plugin.xml) file. The [`<action>`](plugin_configuration_file.md#idea-plugin__actions__action) declaration for `PopupDialogAction` in the `action_basics` [plugin.xml](%gh-sdk-samples-master%/action_basics/src/main/resources/META-INF/plugin.xml) file.
@ -176,7 +176,7 @@ However, code in this method could manipulate a project, invoke an inspection, c
For demonstration purposes, the `AnActionEvent.getData()` method tests if a [`Navigatable`](%gh-ic%/platform/core-api/src/com/intellij/pom/Navigatable.java) object is available. For demonstration purposes, the `AnActionEvent.getData()` method tests if a [`Navigatable`](%gh-ic%/platform/core-api/src/com/intellij/pom/Navigatable.java) object is available.
If so, information about the selected element is added to the dialog. If so, information about the selected element is added to the dialog.
See [](basic_action_system.md#determining-the-action-context) for more information about accessing information from the `AnActionEvent` input parameter. See [](action_system.md#determining-the-action-context) for more information about accessing information from the `AnActionEvent` input parameter.
```java ```java
``` ```
@ -188,7 +188,7 @@ Adding code to `PopupDialogAction.update()` gives finer control of the action's
The action's state and(or) presentation can be dynamically changed depending on the context. The action's state and(or) presentation can be dynamically changed depending on the context.
> This method needs to _execute very quickly_. > This method needs to _execute very quickly_.
> For more information about this constraint, see the warning in [](basic_action_system.md#overriding-the-anactionupdate-method). > For more information about this constraint, see the warning in [](action_system.md#overriding-the-anactionupdate-method).
> >
{style="warning"} {style="warning"}
@ -197,7 +197,7 @@ This requirement means the user must have at least one project open in the IDE f
So the `update()` method disables the action for contexts where a `Project` object isn't defined. So the `update()` method disables the action for contexts where a `Project` object isn't defined.
The availability (enabled and visible) is set on the `Presentation` object. The availability (enabled and visible) is set on the `Presentation` object.
Setting both the enabled state and visibility produces consistent behavior despite possible host menu settings, as discussed in [](basic_action_system.md#grouping-actions). Setting both the enabled state and visibility produces consistent behavior despite possible host menu settings, as discussed in [](action_system.md#grouping-actions).
```java ```java
``` ```
@ -205,7 +205,7 @@ Setting both the enabled state and visibility produces consistent behavior despi
The `update()` method does not check to see if a `Navigatable` object is available before enabling `PopupDialogAction`. The `update()` method does not check to see if a `Navigatable` object is available before enabling `PopupDialogAction`.
This check is unnecessary because using the `Navigatable` object is opportunistic in `actionPerformed()`. This check is unnecessary because using the `Navigatable` object is opportunistic in `actionPerformed()`.
See [Determining the Action Context](basic_action_system.md#determining-the-action-context) for more information about accessing information from the `AnActionEvent` input parameter. See [Determining the Action Context](action_system.md#determining-the-action-context) for more information about accessing information from the `AnActionEvent` input parameter.
### Other Methods Overrides ### Other Methods Overrides

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Basics of Working with the Editor # Basics of Working with the Editor
@ -22,5 +22,5 @@ The following are referenced in the tutorial:
* [`TypedAction`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/TypedAction.java). * [`TypedAction`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/TypedAction.java).
**Related topics:** **Related topics:**
* [](basic_action_system.md) * [](action_system.md)
* [](threading_model.md) * [](threading_model.md)

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Using File Templates Programmatically # Using File Templates Programmatically
@ -75,7 +75,7 @@ The new action should be registered under the `NewGroup` group, e.g:
</actions> </actions>
``` ```
Action presentation texts should be added to the [resource bundle defined in plugin.xml](plugin_configuration_file.md#idea-plugin__resource-bundle) according to the rules described in [](basic_action_system.md#localizing-actions-and-groups): Action presentation texts should be added to the [resource bundle defined in plugin.xml](plugin_configuration_file.md#idea-plugin__resource-bundle) according to the rules described in [](action_system.md#localizing-actions-and-groups):
``` ```
action.Create.MyClass.text=My Class action.Create.MyClass.text=My Class

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Toolbar # Toolbar
@ -7,7 +7,7 @@
<tldr> <tldr>
**Related:** [](basic_action_system.md#buildingToolbarPopupMenu) **Related:** [](action_system.md#buildingToolbarPopupMenu)
</tldr> </tldr>

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Miscellaneous Swing Components # Miscellaneous Swing Components
@ -38,4 +38,4 @@ so it's up to the developer to choose which tab control would be more appropriat
See [](toolbar.md) in the UI Guidelines for an overview. See [](toolbar.md) in the UI Guidelines for an overview.
[](basic_action_system.md#buildingToolbarPopupMenu) covers creating `AnAction`-based toolbars. [](action_system.md#buildingToolbarPopupMenu) covers creating `AnAction`-based toolbars.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Tool Windows # Tool Windows
@ -88,7 +88,7 @@ To manage the contents of a tool window, call [`ToolWindow.getContentManager()`]
To add a content (tab), first create it by calling [`ContentManager.getFactory().createContent()`](%gh-ic%/platform/ide-core/src/com/intellij/ui/content/ContentManager.java), and then to add it to the tool window using [`ContentManager.addContent()`](%gh-ic%/platform/ide-core/src/com/intellij/ui/content/ContentManager.java). To add a content (tab), first create it by calling [`ContentManager.getFactory().createContent()`](%gh-ic%/platform/ide-core/src/com/intellij/ui/content/ContentManager.java), and then to add it to the tool window using [`ContentManager.addContent()`](%gh-ic%/platform/ide-core/src/com/intellij/ui/content/ContentManager.java).
Use `Content.setDisposer()` to register associated `Disposable` (see [](disposers.md)). Use `Content.setDisposer()` to register associated `Disposable` (see [](disposers.md)).
See [`SimpleToolWindowPanel`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/SimpleToolWindowPanel.java) as a convenient base class, supporting [Toolbars](basic_action_system.md#buildingToolbarPopupMenu) and both vertical/horizontal layout. See [`SimpleToolWindowPanel`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/SimpleToolWindowPanel.java) as a convenient base class, supporting [Toolbars](action_system.md#buildingToolbarPopupMenu) and both vertical/horizontal layout.
### Closing Tabs ### Closing Tabs

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# User Interface Components # User Interface Components
@ -34,7 +34,7 @@ See [](UI_kit.md) when using [Figma](https://www.figma.com) to design UI.
The following components are particularly noteworthy: The following components are particularly noteworthy:
* Menus and toolbars are built using [](basic_action_system.md) * Menus and toolbars are built using [](action_system.md)
* [](tool_windows.md) * [](tool_windows.md)
* [](dialog_wrapper.md) * [](dialog_wrapper.md)
* [](popups.md) * [](popups.md)