diff --git a/labels.list b/labels.list index 006c46612..27d0a509e 100644 --- a/labels.list +++ b/labels.list @@ -9,7 +9,14 @@ + + + + + + + diff --git a/topics/basics/basic_action_system.md b/topics/basics/basic_action_system.md index b4ca8c82b..61885f765 100644 --- a/topics/basics/basic_action_system.md +++ b/topics/basics/basic_action_system.md @@ -41,28 +41,42 @@ The IntelliJ Platform calls methods of actions when a user interacts with a menu ### Principal Implementation Overrides Every IntelliJ Platform action should override `AnAction.update()` and must override `AnAction.actionPerformed()`. -* An action's method `AnAction.update()` is called by the IntelliJ Platform framework to update an action state. - The state (enabled, visible) of an action determines whether the action is available in the UI. - An object of the [`AnActionEvent`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) type is passed to this method and contains information about the current context for the action. - Actions are made available by changing state in the [`Presentation`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/Presentation.java) object associated with the event context. - As explained in [Overriding the `AnAction.update()` Method](#overriding-the-anactionupdate-method), it is vital `update()` methods _execute quickly_ and return execution to platform. -* `AnAction.getActionUpdateThread()` (2022.3+) return an [`ActionUpdateThread`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionUpdateThread.java), - which specifies if the `update()` method is called on a [background thread (BGT) or the event-dispatching thread (EDT)](general_threading_rules.md). - The preferred method is to run the update on the BGT, which has the advantage of guaranteeing application-wide read access to - [PSI](psi.md), [the virtual file system](virtual_file_system.md) (VFS), or [project models](project_structure.md). - Actions that run the update session on the BGT should not access the Swing component hierarchy directly. - Conversely, actions that specify to run their update on EDT must not access PSI, VFS, or project data but have access to Swing components and other UI models. - All accessible data is provided by the `DataContext` as explained in [](#determining-the-action-context). - When switching from BGT to EDT is absolutely necessary, actions can use `AnActionEvent.getUpdateSession()` to - access the [`UpdateSession`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/UpdateSession.java) and - then call `UpdateSession.compute()` to run a function on EDT. - Inspection Plugin DevKit | Code | ActionUpdateThread is missing highlights missing implementation of - `AnAction.getActionUpdateThread()` (2022.3+). -* An action's method `AnAction.actionPerformed()` is called by the IntelliJ Platform if available and selected by the user. - This method does the heavy lifting for the action: it contains the code executed when the action gets invoked. - The `actionPerformed()` method also receives `AnActionEvent` as a parameter, which is used to access any context data like projects, files, selection, etc. - See [Overriding the `AnAction.actionPerformed()` Method](#overriding-the-anactionactionperformed-method) for more information. +#### `AnAction.update()` + +An action's method `AnAction.update()` is called by the IntelliJ Platform framework to update an action state. +The state (enabled, visible) of an action determines whether the action is available in the UI. +An object of the [`AnActionEvent`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java) type is passed to this method and contains information about the current context for the action. + +Actions are made available by changing state in the [`Presentation`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/Presentation.java) object associated with the event context. +As explained in [Overriding the `AnAction.update()` Method](#overriding-the-anactionupdate-method), it is vital `update()` methods _execute quickly_ and return execution to platform. + +#### `AnAction.getActionUpdateThread()` + + +`AnAction.getActionUpdateThread()` returns an [`ActionUpdateThread`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionUpdateThread.java), +which specifies if the `update()` method is called on a [background thread (BGT) or the event-dispatching thread (EDT)](general_threading_rules.md). +The preferred method is to run the update on the BGT, which has the advantage of guaranteeing application-wide read access to +[PSI](psi.md), [the virtual file system](virtual_file_system.md) (VFS), or [project models](project_structure.md). +Actions that run the update session on the BGT should not access the Swing component hierarchy directly. +Conversely, actions that specify to run their update on EDT must not access PSI, VFS, or project data but have access to Swing components and other UI models. + +All accessible data is provided by the `DataContext` as explained in [](#determining-the-action-context). +When switching from BGT to EDT is absolutely necessary, actions can use `AnActionEvent.getUpdateSession()` to +access the [`UpdateSession`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/UpdateSession.java) and +then call `UpdateSession.compute()` to run a function on EDT. + +Inspection Plugin DevKit | Code | ActionUpdateThread is missing highlights missing implementation of +`AnAction.getActionUpdateThread()`. + +#### `AnAction.actionPerformed()` + +An action's method `AnAction.actionPerformed()` is called by the IntelliJ Platform if available and selected by the user. +This method does the heavy lifting for the action: it contains the code executed when the action gets invoked. +The `actionPerformed()` method also receives `AnActionEvent` as a parameter, which is used to access any context data like projects, files, selection, etc. +See [Overriding the `AnAction.actionPerformed()` Method](#overriding-the-anactionactionperformed-method) for more information. + +#### Miscellaneous There are other methods to override in the `AnAction` class, such as changing the default `Presentation` object for the action. There is also a use case for overriding action constructors when registering them with dynamic action groups, demonstrated in the [Grouping Actions](grouping_action.md#adding-child-actions-to-the-dynamic-group) tutorial. @@ -216,8 +230,8 @@ To allow using alternative names in search, add one or more [``](plugin To provide a localized synonym, specify `key` instead of `text` attribute. #### Disabling Search for Group + -_2020.3_ To exclude a group from appearing in Help | Find Action results (e.g., New... popup), specify `searchable="false"`. #### Localizing Actions and Groups diff --git a/topics/basics/persisting_state_of_components.md b/topics/basics/persisting_state_of_components.md index f4fe91386..af2d5b04b 100644 --- a/topics/basics/persisting_state_of_components.md +++ b/topics/basics/persisting_state_of_components.md @@ -212,10 +212,7 @@ Only the settings that are not specific to a given machine should be shared, e.g If a component contains both shareable and non-shareable data, it should be split into two separate components. #### Settings Sync Plugin - -> The _Settings Sync_ plugin is available starting with version 2022.3. -> -{style="note"} + To include a plugin's component state in the _Settings Sync_ plugin synchronization, the following requirements must be met: - The `RoamingType` is defined via the `roamingType` attribute of the `@Storage` annotation and is not equal to `DISABLED`. diff --git a/topics/basics/psi_cookbook.md b/topics/basics/psi_cookbook.md index 14763f50b..5e22cbcaf 100644 --- a/topics/basics/psi_cookbook.md +++ b/topics/basics/psi_cookbook.md @@ -70,8 +70,7 @@ or [`OverridingMethodsSearch.search()`](%gh-ic%/java/java-indexing-api/src/com/intellij/psi/search/searches/OverridingMethodsSearch.java) ### How do I check the presence of a JVM library? - -_2023.2_ + Use dedicated (and heavily cached) methods from [`JavaLibraryUtil`](%gh-ic%/java/openapi/src/com/intellij/java/library/JavaLibraryUtil.java): diff --git a/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md b/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md index 87fc76ba8..431c8a80f 100644 --- a/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md +++ b/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md @@ -34,9 +34,10 @@ See [Inspections](inspections.md) topic in the UI Guidelines on naming, writing > Please also note important change in 2024.1, refer to [](syntax_highlighting_and_error_highlighting.md#order-of-running-highlighting). #### Inspections Performance + A [custom language plugin](custom_language_support.md) providing many inspections (>100) can register the default [`PsiElementVisitor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElementVisitor.java) -for its language in `com.intellij.inspection.basicVisitor` extension point (2023.3) to optimize processing. +for its language in `com.intellij.inspection.basicVisitor` extension point to optimize processing. ### Intentions diff --git a/topics/reference_guide/custom_language_support/documentation.md b/topics/reference_guide/custom_language_support/documentation.md index ebc31d5d0..e9bc942d2 100644 --- a/topics/reference_guide/custom_language_support/documentation.md +++ b/topics/reference_guide/custom_language_support/documentation.md @@ -31,6 +31,7 @@ Detailed information on implementing these EPs can be found in the [](#documenta {title="Targeting IDEs before 2023.1" style="note"} ## Documentation Target API + Custom language developers have the flexibility to select from three distinct EPs for providing documentation to their users. To ensure clarity and avoid confusion, we provide a high-level summary of the overall approach, diff --git a/topics/reference_guide/custom_language_support/inlay_hints.md b/topics/reference_guide/custom_language_support/inlay_hints.md index 8d89b35cd..f4ed03202 100644 --- a/topics/reference_guide/custom_language_support/inlay_hints.md +++ b/topics/reference_guide/custom_language_support/inlay_hints.md @@ -53,10 +53,7 @@ To suppress inlay parameter hints in specific places, implement and register it in `com.intellij.codeInsight.parameterNameHintsSuppressor` EP. ### Declarative Inlay Hints Provider - -> This API is available since 2023.1. -> -{style="note"} + Declarative inlay hints are **inline** textual inlays that can hold expandable list of clickable items. Please note this API has limited presentation customization possibilities due to its UI-independent design, which allows utilizing it by different frontend technologies (not only in Swing). @@ -71,9 +68,9 @@ See the API documentation for the details. - [`JavaMethodChainsDeclarativeInlayProvider`](%gh-ic%/java/java-impl/src/com/intellij/codeInsight/hints/JavaMethodChainsDeclarativeInlayProvider.kt) - shows method return types in call chains in Java code ### Code Vision Provider + -> This API is available since 2022.1. -> It is still in experimental state and may be changed without preserving backward compatibility. +> This API is still in experimental state and may be changed without preserving backward compatibility. > {style="note"} diff --git a/topics/reference_guide/custom_language_support/language_injection.md b/topics/reference_guide/custom_language_support/language_injection.md index f33d70111..e9d14d4be 100644 --- a/topics/reference_guide/custom_language_support/language_injection.md +++ b/topics/reference_guide/custom_language_support/language_injection.md @@ -307,8 +307,9 @@ final class MyDSLInjector implements MultiHostInjector { Now, inside the editor the injected portion will work as expected where foo is the method name and `System.out.println(42);` will look and feel like a method body with highlighting, completion, and goto definition working. ## Formatting + -To control delegation of formatting to containing file, implement [`InjectedFormattingOptionsProvider`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/InjectedFormattingOptionsProvider.java) and register in `com.intellij.formatting.injectedOptions` extension point (_2022.3_). +To control delegation of formatting to containing file, implement [`InjectedFormattingOptionsProvider`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/InjectedFormattingOptionsProvider.java) and register in `com.intellij.formatting.injectedOptions` extension point. ## Injection Highlighting diff --git a/topics/reference_guide/custom_language_support/language_server_protocol.md b/topics/reference_guide/custom_language_support/language_server_protocol.md index 75f067377..e093279cb 100644 --- a/topics/reference_guide/custom_language_support/language_server_protocol.md +++ b/topics/reference_guide/custom_language_support/language_server_protocol.md @@ -116,8 +116,9 @@ private class FooLspServerDescriptor(project: Project) : ProjectWideLspServerDes ### Status Bar Integration + -Since 2024.1, a dedicated Language Services status bar widget is available to monitor the status of all LSP servers. +A dedicated Language Services status bar widget is available to monitor the status of all LSP servers. Override `LspServerSupportProvider.createLspServerWidgetItem()` to provide a custom icon and link to [Settings](settings.md) page (if available). ```kotlin diff --git a/topics/reference_guide/custom_language_support/references_and_resolve.md b/topics/reference_guide/custom_language_support/references_and_resolve.md index 494e5a475..e1ec06f4c 100644 --- a/topics/reference_guide/custom_language_support/references_and_resolve.md +++ b/topics/reference_guide/custom_language_support/references_and_resolve.md @@ -69,6 +69,7 @@ The Navigate | Declaration or Usages action for such referenc The implementation of `multiResolve()` can be also based on [`PsiScopeProcessor`](%gh-ic%/platform/core-api/src/com/intellij/psi/scope/PsiScopeProcessor.java), and can collect all valid targets for the reference instead of stopping when the first valid target is found. ## Additional Highlighting + Implement [`HighlightedReference`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/highlighting/HighlightedReference.java) to add additional highlighting for non-obvious places (e.g., inside String literals). -Such references will automatically be highlighted using String | Highlighted reference text attributes from Settings | Editor | Color Scheme | Language Defaults (_2022.2_). +Such references will automatically be highlighted using String | Highlighted reference text attributes from Settings | Editor | Color Scheme | Language Defaults. diff --git a/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md b/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md index 33c0ce851..3391f7631 100644 --- a/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md +++ b/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md @@ -168,8 +168,9 @@ To force re-highlighting all open or specific file(s) (e.g., after changing plug [`DaemonCodeAnalyzer.restart()`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzer.java). ## Order of Running Highlighting + -Since 2024.1, [inspections](code_inspections_and_intentions.md) and [annotators](#annotator) do not run sequentially on each `PsiElement` anymore. +[Inspections](code_inspections_and_intentions.md) and [annotators](#annotator) do not run sequentially on each `PsiElement` anymore. Instead, they're run in parallel on all relevant PSI independently with the following consequences. **Independent Annotators** diff --git a/topics/reference_guide/custom_language_support/websymbols.md b/topics/reference_guide/custom_language_support/websymbols.md index 525ef874c..8ec808e54 100644 --- a/topics/reference_guide/custom_language_support/websymbols.md +++ b/topics/reference_guide/custom_language_support/websymbols.md @@ -1,6 +1,7 @@ # Web Symbols + Web Symbols framework simplifies web technology development by utilizing Symbol API and supporting custom syntaxes. diff --git a/topics/reference_guide/custom_language_support/websymbols_context.md b/topics/reference_guide/custom_language_support/websymbols_context.md index 43a186d42..73314d018 100644 --- a/topics/reference_guide/custom_language_support/websymbols_context.md +++ b/topics/reference_guide/custom_language_support/websymbols_context.md @@ -1,6 +1,7 @@ # Web Symbols Context + How to use Web Symbols context detection to manage enablement of plugin features. diff --git a/topics/reference_guide/custom_language_support/websymbols_implementation.md b/topics/reference_guide/custom_language_support/websymbols_implementation.md index 869bfe16a..e6bd7f1e1 100644 --- a/topics/reference_guide/custom_language_support/websymbols_implementation.md +++ b/topics/reference_guide/custom_language_support/websymbols_implementation.md @@ -1,6 +1,7 @@ # Implementing Web Symbols + Implementation details for the Web Symbols API. diff --git a/topics/reference_guide/custom_language_support/websymbols_integration.md b/topics/reference_guide/custom_language_support/websymbols_integration.md index 213b6a204..d32b0db75 100644 --- a/topics/reference_guide/custom_language_support/websymbols_integration.md +++ b/topics/reference_guide/custom_language_support/websymbols_integration.md @@ -1,6 +1,7 @@ # Web Symbols Integration with Language Features + How to integrate your Web Symbols with a particular language feature. diff --git a/topics/reference_guide/custom_language_support/websymbols_web_types.md b/topics/reference_guide/custom_language_support/websymbols_web_types.md index a325be7c0..ecc5c2b05 100644 --- a/topics/reference_guide/custom_language_support/websymbols_web_types.md +++ b/topics/reference_guide/custom_language_support/websymbols_web_types.md @@ -1,6 +1,7 @@ # Web Types + Web Types - contributing statically defined Web Symbols through JSONs. diff --git a/topics/reference_guide/icons.md b/topics/reference_guide/icons.md index 081756e9e..7b6f1fba2 100644 --- a/topics/reference_guide/icons.md +++ b/topics/reference_guide/icons.md @@ -217,9 +217,8 @@ Register a resource bundle via `com.intellij.iconDescriptionBundle` extension po Create `icon..tooltip` key in a resource bundle, where `` is the icon path with leading slash and `.svg` removed and slashes replaced with dots (e.g., `/nodes/class.svg` → `icon.nodes.class.tooltip`). ## New UI Icons + -> This feature is available since 2022.3. -> > See [New UI Icons Guide](https://www.figma.com/community/file/1227729570033544559) for guidelines and overview. To fully support the [New UI](https://www.jetbrains.com/help/idea/new-ui.html), the plugin must provide additional dedicated icons and mapping information. diff --git a/topics/reference_guide/inspection_options.md b/topics/reference_guide/inspection_options.md index b7ace32b7..d47acc140 100644 --- a/topics/reference_guide/inspection_options.md +++ b/topics/reference_guide/inspection_options.md @@ -12,10 +12,7 @@ Currently, there are two ways of providing the inspection options: * [UI-based](#ui-based-inspection-options) ## Declarative Inspection Options - -> Declarative inspection options API is available since version 2023.1. -> -{style="note"} + Declarative API allows to: * delegate component rendering to the platform and make all the inspection options UI consistent and compliant with the [](ui_guidelines_welcome.topic) diff --git a/topics/tutorials/code_intentions_preview.md b/topics/tutorials/code_intentions_preview.md index 41922e138..7fec63ddb 100644 --- a/topics/tutorials/code_intentions_preview.md +++ b/topics/tutorials/code_intentions_preview.md @@ -3,13 +3,14 @@ Guide for the preview of Intention and Quick Fix actions. + > [Intention](code_intentions.md) previews are supposed to work out-of-the-box in most cases. > This page gives guidance to plugin authors in situations where this is not the case and to > encourage thorough [testing](writing_tests.md) of intention actions. -Since version 2022.3, the IntelliJ Platform can show a preview for +The IntelliJ Platform can show a preview for [`IntentionAction`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInsight/intention/IntentionAction.java) and [`LocalQuickFix`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInspection/LocalQuickFix.java). diff --git a/topics/user_interface_components/kotlin_ui_dsl_version_2.md b/topics/user_interface_components/kotlin_ui_dsl_version_2.md index 7f402838f..0d931db6b 100644 --- a/topics/user_interface_components/kotlin_ui_dsl_version_2.md +++ b/topics/user_interface_components/kotlin_ui_dsl_version_2.md @@ -1,6 +1,7 @@ # Kotlin UI DSL Version 2 + Kotlin DSL for creating UI forms with input components bound to a state object.