add labels to content

This commit is contained in:
Yann Cébron 2024-06-13 14:18:18 +02:00
parent 782053c6cf
commit 16204b6e71
20 changed files with 69 additions and 46 deletions

View File

@ -9,7 +9,14 @@
<primary-label id="IntelliJIDEA_Ultimate" short-name="IntelliJ IDEA Ultimate" name="IntelliJ IDEA Ultimate"
href="https://plugins.jetbrains.com/docs/intellij/idea-ultimate.html"/>
<primary-label id="2020.3" short-name="2020.3+" name="2020.3+"/>
<primary-label id="2021.3" short-name="2021.3+" name="2021.3+"/>
<primary-label id="2022.1" short-name="2022.1+" name="2022.1+"/>
<primary-label id="2022.2" short-name="2022.2+" name="2022.2+"/>
<primary-label id="2022.3" short-name="2022.3+" name="2022.3+"/>
<primary-label id="2023.1" short-name="2023.1+" name="2023.1+"/>
<primary-label id="2023.2" short-name="2023.2+" name="2023.2+"/>
<primary-label id="2023.3" short-name="2023.3+" name="2023.3+"/>
<primary-label id="2024.1" short-name="2024.1+" name="2024.1+"/>
<primary-label id="2024.2" short-name="2024.2+" name="2024.2+"/>
</labels>

View File

@ -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 <ui-path>Plugin DevKit | Code | ActionUpdateThread is missing</ui-path> 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()`
<primary-label ref="2022.3"/>
`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 <ui-path>Plugin DevKit | Code | ActionUpdateThread is missing</ui-path> 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 [`<synonym>`](plugin
To provide a localized synonym, specify `key` instead of `text` attribute.
#### Disabling Search for Group
<primary-label ref="2020.3"/>
_2020.3_
To exclude a group from appearing in <ui-path>Help | Find Action</ui-path> results (e.g., <control>New...</control> popup), specify `searchable="false"`.
#### Localizing Actions and Groups

View File

@ -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"}
<primary-label ref="2022.3"/>
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`.

View File

@ -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_
<primary-label ref="2023.2"/>
Use dedicated (and heavily cached) methods from [`JavaLibraryUtil`](%gh-ic%/java/openapi/src/com/intellij/java/library/JavaLibraryUtil.java):

View File

@ -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
<primary-label ref="2023.3"/>
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

View File

@ -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
<primary-label ref="2023.1"/>
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,

View File

@ -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"}
<primary-label ref="2023.1"/>
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
<primary-label ref="2022.1"/>
> 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"}

View File

@ -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
<primary-label ref="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 (_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

View File

@ -116,8 +116,9 @@ private class FooLspServerDescriptor(project: Project) : ProjectWideLspServerDes
</procedure>
### Status Bar Integration
<primary-label ref="2024.1"/>
Since 2024.1, a dedicated <control>Language Services</control> status bar widget is available to monitor the status of all LSP servers.
A dedicated <control>Language Services</control> 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

View File

@ -69,6 +69,7 @@ The <ui-path>Navigate | Declaration or Usages</ui-path> 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
<primary-label ref="2022.2"/>
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 <control>String | Highlighted reference</control> text attributes from <ui-path>Settings | Editor | Color Scheme | Language Defaults</ui-path> (_2022.2_).
Such references will automatically be highlighted using <control>String | Highlighted reference</control> text attributes from <ui-path>Settings | Editor | Color Scheme | Language Defaults</ui-path>.

View File

@ -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
<primary-label ref="2024.1"/>
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**

View File

@ -1,6 +1,7 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Web Symbols
<primary-label ref="2022.3"/>
<link-summary>
Web Symbols framework simplifies web technology development by utilizing Symbol API and supporting custom syntaxes.

View File

@ -1,6 +1,7 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Web Symbols Context
<primary-label ref="2022.3"/>
<link-summary>How to use Web Symbols context detection to manage enablement of plugin features.</link-summary>

View File

@ -1,6 +1,7 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Implementing Web Symbols
<primary-label ref="2022.3"/>
<link-summary>Implementation details for the Web Symbols API.</link-summary>

View File

@ -1,6 +1,7 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Web Symbols Integration with Language Features
<primary-label ref="2022.3"/>
<link-summary>How to integrate your Web Symbols with a particular language feature.</link-summary>

View File

@ -1,6 +1,7 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Web Types
<primary-label ref="2022.3"/>
<link-summary>Web Types - contributing statically defined Web Symbols through JSONs.</link-summary>

View File

@ -217,9 +217,8 @@ Register a resource bundle via `com.intellij.iconDescriptionBundle` extension po
Create `icon.<icon-path>.tooltip` key in a resource bundle, where `<icon-path>` is the icon path with leading slash and `.svg` removed and slashes replaced with dots (e.g., `/nodes/class.svg` &rarr; `icon.nodes.class.tooltip`).
## New UI Icons
<primary-label ref="2022.3"/>
> 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.

View File

@ -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"}
<primary-label ref="2023.1"/>
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)

View File

@ -3,13 +3,14 @@
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<link-summary>Guide for the preview of Intention and Quick Fix actions.</link-summary>
<primary-label ref="2022.3"/>
> [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).

View File

@ -1,6 +1,7 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Kotlin UI DSL Version 2
<primary-label ref="2021.3"/>
<link-summary>Kotlin DSL for creating UI forms with input components bound to a state object.</link-summary>