diff --git a/ijs.tree b/ijs.tree index 592ea1bdf..8cdc2da98 100644 --- a/ijs.tree +++ b/ijs.tree @@ -100,8 +100,8 @@ - - + + diff --git a/topics/appendix/api_notable/api_notable_list_2020.md b/topics/appendix/api_notable/api_notable_list_2020.md index 5d0d7f4fe..b891227a4 100644 --- a/topics/appendix/api_notable/api_notable_list_2020.md +++ b/topics/appendix/api_notable/api_notable_list_2020.md @@ -1,4 +1,4 @@ - + # 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. Action System -: New features in [Action System](basic_action_system.md): `` works now for [``](plugin_configuration_file.md#idea-plugin__actions__group) as well, [``](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): `` works now for [``](plugin_configuration_file.md#idea-plugin__actions__group) as well, [``](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 : 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. diff --git a/topics/appendix/api_notable/api_notable_list_2022.md b/topics/appendix/api_notable/api_notable_list_2022.md index caed56880..3729389ce 100644 --- a/topics/appendix/api_notable/api_notable_list_2022.md +++ b/topics/appendix/api_notable/api_notable_list_2022.md @@ -1,6 +1,6 @@ -# Notable Changes in IntelliJ Platform and Plugins API 2022.* + - +# Notable Changes in IntelliJ Platform and Plugins API 2022.* List of known Notable API Changes in 2022.* @@ -25,7 +25,7 @@ Injection Text Formatting : Delegation of formatting can be controlled using dedicated [extension point](language_injection.md#formatting). 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 : All rules for [threading](threading_model.md) are now checked in tests as well. diff --git a/topics/appendix/api_notable/api_notable_list_2024.md b/topics/appendix/api_notable/api_notable_list_2024.md index 962b59ed5..80d435d2d 100644 --- a/topics/appendix/api_notable/api_notable_list_2024.md +++ b/topics/appendix/api_notable/api_notable_list_2024.md @@ -1,4 +1,4 @@ - + # 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). `ToggleAction` in popups -: No longer closes popups, see [](basic_action_system.md#toggleActionPopupMenus) +: No longer closes popups, see [](action_system.md#toggleActionPopupMenus) ### Kotlin Plugin diff --git a/topics/appendix/tools/ide_tooling/internal_actions/internal_ui_inspector.md b/topics/appendix/tools/ide_tooling/internal_actions/internal_ui_inspector.md index 15435ed45..ee625fd0d 100644 --- a/topics/appendix/tools/ide_tooling/internal_actions/internal_ui_inspector.md +++ b/topics/appendix/tools/ide_tooling/internal_actions/internal_ui_inspector.md @@ -50,10 +50,10 @@ Custom Swing components can also provide additional properties via [`UiInspector ### Action -| Type | Properties | -|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`AnAction`](basic_action_system.md) |

Action - [`AnAction`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java) implementation

Action ID - Action `id`

Action Plugin ID - contributing plugin

| -| [`ActionToolbar`](basic_action_system.md) |

Toolbar Group - Action Group ID

All Toolbar Groups - contained Action Group IDs

Target component - `ActionToolbar.setTargetComponent()`

| +| Type | Properties | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [`AnAction`](action_system.md) |

Action - [`AnAction`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java) implementation

Action ID - Action `id`

Action Plugin ID - contributing plugin

| +| [`ActionToolbar`](action_system.md) |

Toolbar Group - Action Group ID

All Toolbar Groups - contained Action Group IDs

Target component - `ActionToolbar.setTargetComponent()`

| ### IDE and UI Components diff --git a/topics/basics/basic_action_system.md b/topics/basics/action_system.md similarity index 99% rename from topics/basics/basic_action_system.md rename to topics/basics/action_system.md index 21e95d9be..5a6bbe3a2 100644 --- a/topics/basics/basic_action_system.md +++ b/topics/basics/action_system.md @@ -1,6 +1,6 @@ -# Actions +# Action System Adding custom actions to menus and toolbars. Implement and register actions, and handle user interactions efficiently. diff --git a/topics/basics/architectural_overview/documents.md b/topics/basics/architectural_overview/documents.md index cabe2e621..288d13731 100644 --- a/topics/basics/architectural_overview/documents.md +++ b/topics/basics/architectural_overview/documents.md @@ -1,4 +1,4 @@ - + # Documents @@ -13,7 +13,7 @@ The IntelliJ Platform handles encoding and line break conversions when loading a | 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) | | [Virtual File](virtual_file.md) |

[`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)

[`FileDocumentManager.getCachedDocument()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java) (use if only open or possibly modified documents are relevant)

| diff --git a/topics/basics/architectural_overview/psi_elements.md b/topics/basics/architectural_overview/psi_elements.md index ced69e6e8..f30ac3ff9 100644 --- a/topics/basics/architectural_overview/psi_elements.md +++ b/topics/basics/architectural_overview/psi_elements.md @@ -22,11 +22,11 @@ The [`PsiElement`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.jav ## How do I get a PSI element? -| Context | API | -|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Action](basic_action_system.md) |

[`AnActionEvent.getData(CommonDataKeys.PSI_ELEMENT)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)

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.

| -| [PSI File](psi_files.md) |

[`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.

[`PsiRecursiveElementWalkingVisitor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiRecursiveElementWalkingVisitor.java)

| -| [Reference](psi_references.md) | [`PsiReference.resolve()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReference.java) | +| Context | API | +|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Action](action_system.md) |

[`AnActionEvent.getData(CommonDataKeys.PSI_ELEMENT)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)

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.

| +| [PSI File](psi_files.md) |

[`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.

[`PsiRecursiveElementWalkingVisitor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiRecursiveElementWalkingVisitor.java)

| +| [Reference](psi_references.md) | [`PsiReference.resolve()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiReference.java) | ## What can I do with PSI elements? diff --git a/topics/basics/architectural_overview/psi_files.md b/topics/basics/architectural_overview/psi_files.md index e7834d17d..38057761c 100644 --- a/topics/basics/architectural_overview/psi_files.md +++ b/topics/basics/architectural_overview/psi_files.md @@ -1,6 +1,6 @@ -# PSI Files + - +# PSI Files PSI File represents file content as a hierarchy of elements in a particular programming language. @@ -14,13 +14,13 @@ the same file is represented by multiple `PsiFile` instances if the file belongs ## How do I get a PSI file? -| 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) | -| [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) | -| [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) | -| File Name | [`FilenameIndex.getVirtualFilesByName()`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/FilenameIndex.java) and locate via [`PsiManager.findFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiManager.java) or [`PsiUtilCore.toPsiFiles()`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/PsiUtilCore.java) | +| Context | API | +|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [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) | +| [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) | +| File Name | [`FilenameIndex.getVirtualFilesByName()`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/FilenameIndex.java) and locate via [`PsiManager.findFile()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiManager.java) or [`PsiUtilCore.toPsiFiles()`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/PsiUtilCore.java) | ## What can I do with a PSI file? diff --git a/topics/basics/architectural_overview/threading/threading_model.md b/topics/basics/architectural_overview/threading/threading_model.md index 9404cadc6..baac5b944 100644 --- a/topics/basics/architectural_overview/threading/threading_model.md +++ b/topics/basics/architectural_overview/threading/threading_model.md @@ -577,7 +577,7 @@ Meanwhile, try to speed up what you can in your plugin as it will be generally b #### Action Update 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 diff --git a/topics/basics/architectural_overview/virtual_file.md b/topics/basics/architectural_overview/virtual_file.md index 3d543a84f..38149ac52 100644 --- a/topics/basics/architectural_overview/virtual_file.md +++ b/topics/basics/architectural_overview/virtual_file.md @@ -1,4 +1,4 @@ - + # Virtual Files @@ -14,13 +14,13 @@ Contents of a `VirtualFile` are treated as a stream of bytes, but concepts like ## How do I get a virtual file? -| Context | API | -|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Action](basic_action_system.md) |

[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)

[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) for multiple selection

| -| [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) | -| File Name | [`FilenameIndex.getVirtualFilesByName()`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/FilenameIndex.java) | -| Local File System Path |

[`LocalFileSystem.findFileByIoFile()`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/vfs/LocalFileSystem.java)

[`VirtualFileManager.findFileByNioPath()`/`refreshAndFindFileByNioPath()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java) (2020.2+)

| +| Context | API | +|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Action](action_system.md) |

[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)

[`AnActionEvent.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY)`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) for multiple selection

| +| [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) | +| File Name | [`FilenameIndex.getVirtualFilesByName()`](%gh-ic%/platform/indexing-api/src/com/intellij/psi/search/FilenameIndex.java) | +| Local File System Path |

[`LocalFileSystem.findFileByIoFile()`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/vfs/LocalFileSystem.java)

[`VirtualFileManager.findFileByNioPath()`/`refreshAndFindFileByNioPath()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java) (2020.2+)

| ## What can I do with it? diff --git a/topics/basics/indexing_and_psi_stubs.md b/topics/basics/indexing_and_psi_stubs.md index 76debf0d7..7338683fd 100644 --- a/topics/basics/indexing_and_psi_stubs.md +++ b/topics/basics/indexing_and_psi_stubs.md @@ -62,7 +62,7 @@ Since 2024.2, this includes also [intentions](code_intentions.md) and [quick-fix #### 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 diff --git a/topics/basics/plugin_structure/plugin_actions.md b/topics/basics/plugin_structure/plugin_actions.md index 39a9dc1b5..a2d0bbd2c 100644 --- a/topics/basics/plugin_structure/plugin_actions.md +++ b/topics/basics/plugin_structure/plugin_actions.md @@ -1,4 +1,4 @@ - + # 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. -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. diff --git a/topics/basics/plugin_structure/plugin_configuration_file.md b/topics/basics/plugin_structure/plugin_configuration_file.md index c84f06dae..5d373fd06 100644 --- a/topics/basics/plugin_structure/plugin_configuration_file.md +++ b/topics/basics/plugin_structure/plugin_configuration_file.md @@ -589,7 +589,7 @@ Attributes `order`.
To not clash with other plugins defining extensions with the same identifier, - consider prepending the identifier with a prefix related to the plugin [``](#idea-plugin__id) or + consider prepending the identifier with a prefix related to the plugin [``](#idea-plugin__id) or [``](#idea-plugin__name), for example, `id="com.example.myplugin.myExtension"`. - `order` _(optional)_
Allows for ordering the extension relative to other instances of the same extension point. @@ -613,7 +613,7 @@ Attributes - `mac` - `unix` - `windows` - + For example, `os="windows"` registers the extension on Windows only. ### `extensionPoints` @@ -691,12 +691,12 @@ Attributes The scope in which the [extension](plugin_extensions.md) is instantiated. - + Allowed values: - `IDEA_APPLICATION` _(default)_ - `IDEA_PROJECT` - `IDEA_MODULE` (**deprecated**) - + **It is strongly recommended not to introduce new project- and module-level extension points.** If an extension point needs to operate on a `Project` or `Module` instance, declare an application-level extension point and pass the instance as a method parameter. @@ -739,7 +739,7 @@ Example An extension point which restricts the type provided in a `myClass` attribute to be an instance of `com.example.ParentType`, and the type provided in a `someClass` element to be an instance of `java.lang.Comparable`: - + ```xml ``` - + When using the above extension point, an implementation could be registered as follows: - + ```xml com.example.MyComparable ``` - + where: - + - `com.example.MyCustomType` must be a subtype of `com.example.ParentType` - `com.example.MyComparable` must be a subtype of `java.lang.Comparable` @@ -771,7 +771,7 @@ Example {#idea-plugin__resource-bundle} 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) element can contain multiple `` elements. {type="narrow"} @@ -790,7 +790,7 @@ Example -**Reference:** [Actions](basic_action_system.md) +**Reference:** [Actions](action_system.md) @@ -807,7 +807,7 @@ Attributes - `resource-bundle` _(optional; available since 2020.1)_
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. Children @@ -832,7 +832,7 @@ Example -**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) @@ -855,7 +855,7 @@ Attributes - `class` _(**required**)_
The fully qualified name of the action implementation class. - `text` _(**required** if the action is not -[localized](basic_action_system.md#localizing-actions-and-groups))_
+[localized](action_system.md#localizing-actions-and-groups))_
The default long-version text to be displayed for the action (tooltip for toolbar button or text for menu item). - `description` _(optional)_
The text which is displayed in the status bar when the action is focused. @@ -1126,7 +1126,7 @@ Required Attributes : - `key` _(`key` or `text` is **required**)_
- 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**)_
The synonym text. @@ -1170,7 +1170,7 @@ Example -**Reference:** [Grouping Actions](basic_action_system.md#grouping-actions) +**Reference:** [Grouping Actions](action_system.md#grouping-actions) @@ -1196,7 +1196,7 @@ Attributes [`DefaultActionGroup`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java) is used. - `text` _(**required** if the `popup` is `true` and the group is not -[localized](basic_action_system.md#localizing-actions-and-groups))_
+[localized](action_system.md#localizing-actions-and-groups))_
The default long-version text to be displayed for the group (text for the menu item showing the submenu). - `description` _(optional)_
The text which is displayed in the status bar when the group is focused. @@ -1276,7 +1276,7 @@ Attributes - `ref` _(**required**)_
The ID of the action to add to a group. - `id` _(optional)_
- **_Deprecated_**: Use `ref` instead. + **_Deprecated_**: Use `ref` instead. The ID of the action to add to a group. diff --git a/topics/intro/content_updates.md b/topics/intro/content_updates.md index 1db29e0a2..9f18767fe 100644 --- a/topics/intro/content_updates.md +++ b/topics/intro/content_updates.md @@ -20,7 +20,7 @@ Integration Testing 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-25} @@ -133,7 +133,7 @@ Language Server Protocol (LSP) 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. ### October @@ -238,7 +238,7 @@ Plugin User Experience 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-22} @@ -282,7 +282,7 @@ Status Bar Widgets 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-22} diff --git a/topics/intro/key_topics.md b/topics/intro/key_topics.md index 6c36391e5..6a7ef45b3 100644 --- a/topics/intro/key_topics.md +++ b/topics/intro/key_topics.md @@ -1,4 +1,4 @@ - + # 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. 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_intentions.md) - context-specific actions that are available in the Alt+Enter menu when the text caret is at a particular location. * [](code_completion.md). diff --git a/topics/reference_guide/icons.md b/topics/reference_guide/icons.md index f513311b3..1196b928e 100644 --- a/topics/reference_guide/icons.md +++ b/topics/reference_guide/icons.md @@ -1,4 +1,4 @@ - + # Working with Icons @@ -13,7 +13,7 @@ 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. > For more information, see the [](plugin_icon_file.md) section. diff --git a/topics/reference_guide/project_model/project.md b/topics/reference_guide/project_model/project.md index fe1534830..f369f3aa0 100644 --- a/topics/reference_guide/project_model/project.md +++ b/topics/reference_guide/project_model/project.md @@ -1,4 +1,4 @@ - + # Project @@ -62,13 +62,13 @@ Basic API classes and interfaces for the concepts of [`Project`](%gh-ic%/platfor A Project instance is available in multiple contexts: -| Context | API | -|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Action](basic_action_system.md) |

[`AnActionEvent.getProject()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)

[`DataContext.getData(CommonDataKeys.PROJECT)`](%gh-ic%/platform/core-ui/src/openapi/actionSystem/DataContext.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) | -| [PSI](psi.md) | [`PsiElement.getProject()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.java) | -| [Tests](testing_plugins.md) | [`IdeaProjectTestFixture.getProject()`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/fixtures/IdeaProjectTestFixture.java) | +| Context | API | +|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Action](action_system.md) |

[`AnActionEvent.getProject()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java)

[`DataContext.getData(CommonDataKeys.PROJECT)`](%gh-ic%/platform/core-ui/src/openapi/actionSystem/DataContext.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) | +| [PSI](psi.md) | [`PsiElement.getProject()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElement.java) | +| [Tests](testing_plugins.md) | [`IdeaProjectTestFixture.getProject()`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/fixtures/IdeaProjectTestFixture.java) | It is also possible to retrieve projects in generic contexts: * Project from [`VirtualFile`](virtual_file.md): diff --git a/topics/tutorials/action_system/grouping_action.md b/topics/tutorials/action_system/grouping_action.md index 7a9fd466b..80ed7635d 100644 --- a/topics/tutorials/action_system/grouping_action.md +++ b/topics/tutorials/action_system/grouping_action.md @@ -1,4 +1,4 @@ - + # 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 `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. -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 ` element declaration below: ``` -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. Conceivably, there could be another set of translations for the action if it used the [``](plugin_configuration_file.md#idea-plugin__actions__action__override-text) attribute. diff --git a/topics/tutorials/action_system/working_with_custom_actions.md b/topics/tutorials/action_system/working_with_custom_actions.md index 5d2dc0f42..876fdb2d9 100644 --- a/topics/tutorials/action_system/working_with_custom_actions.md +++ b/topics/tutorials/action_system/working_with_custom_actions.md @@ -42,7 +42,7 @@ public class PopupDialogAction extends AnAction { > `AnAction` classes do not have class fields of any kind. > 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"} @@ -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 [``](plugin_configuration_file.md#idea-plugin__actions) section of a [plugin configuration file](plugin_configuration_file.md). This section describes using IDE tooling - the New Action form - to add a declaration to the plugin.xml 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 @@ -109,7 +109,7 @@ This declaration is enough, but adding more attributes is discussed in the next ### Setting Registration Attributes Manually An action declaration can be added manually to the plugin.xml 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 New Action form or by editing the registration declaration directly in the plugin.xml file. The [``](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. 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 ``` @@ -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. > 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"} @@ -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. 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 ``` @@ -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`. 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 diff --git a/topics/tutorials/editor_basics.md b/topics/tutorials/editor_basics.md index 8feb3b146..90278a3de 100644 --- a/topics/tutorials/editor_basics.md +++ b/topics/tutorials/editor_basics.md @@ -1,4 +1,4 @@ - + # 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). **Related topics:** -* [](basic_action_system.md) +* [](action_system.md) * [](threading_model.md) diff --git a/topics/tutorials/file_and_code_templates/using_file_templates.md b/topics/tutorials/file_and_code_templates/using_file_templates.md index d86813fb1..6657bbf50 100644 --- a/topics/tutorials/file_and_code_templates/using_file_templates.md +++ b/topics/tutorials/file_and_code_templates/using_file_templates.md @@ -1,4 +1,4 @@ - + # Using File Templates Programmatically @@ -75,7 +75,7 @@ The new action should be registered under the `NewGroup` group, e.g: ``` -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 diff --git a/topics/ui/controls/toolbar.md b/topics/ui/controls/toolbar.md index 0bb74fde7..31917aceb 100644 --- a/topics/ui/controls/toolbar.md +++ b/topics/ui/controls/toolbar.md @@ -1,4 +1,4 @@ - + # Toolbar @@ -7,7 +7,7 @@ -**Related:** [](basic_action_system.md#buildingToolbarPopupMenu) +**Related:** [](action_system.md#buildingToolbarPopupMenu) diff --git a/topics/user_interface_components/misc_swing_components.md b/topics/user_interface_components/misc_swing_components.md index aca60f4d6..5530c8e86 100644 --- a/topics/user_interface_components/misc_swing_components.md +++ b/topics/user_interface_components/misc_swing_components.md @@ -1,4 +1,4 @@ - + # 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. -[](basic_action_system.md#buildingToolbarPopupMenu) covers creating `AnAction`-based toolbars. +[](action_system.md#buildingToolbarPopupMenu) covers creating `AnAction`-based toolbars. diff --git a/topics/user_interface_components/tool_windows.md b/topics/user_interface_components/tool_windows.md index 5b6501b83..d23da373b 100644 --- a/topics/user_interface_components/tool_windows.md +++ b/topics/user_interface_components/tool_windows.md @@ -1,4 +1,4 @@ - + # 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). 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 diff --git a/topics/user_interface_components/user_interface_components.md b/topics/user_interface_components/user_interface_components.md index f30b74de0..99666042e 100644 --- a/topics/user_interface_components/user_interface_components.md +++ b/topics/user_interface_components/user_interface_components.md @@ -1,4 +1,4 @@ - + # 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: -* Menus and toolbars are built using [](basic_action_system.md) +* Menus and toolbars are built using [](action_system.md) * [](tool_windows.md) * [](dialog_wrapper.md) * [](popups.md)