mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
basic_action_system.md: minor
This commit is contained in:
parent
c19af1b197
commit
f0c4df5d83
@ -56,9 +56,8 @@ Every IntelliJ Platform action should override `AnAction.update()` and must over
|
|||||||
When switching from BGT to EDT is absolutely necessary, actions can use `AnActionEvent.getUpdateSession()` to
|
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
|
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 the EDT.
|
then call `UpdateSession.compute()` to run a function on the EDT.
|
||||||
Starting from IntelliJ Platform version 2022.3, the Plugin DevKit will have an inspection in
|
Inspection <ui-path>Plugin DevKit | Code | ActionUpdateThread is missing</ui-path> highlights missing implementation of
|
||||||
<ui-path>Plugin DevKit | Code | ActionUpdateThread is missing</ui-path> to notify plugin authors about a missing implementation of
|
`AnAction.getActionUpdateThread()` (2022.3+).
|
||||||
`AnAction.getActionUpdateThread()`.
|
|
||||||
* An action's method `AnAction.actionPerformed()` is called by the IntelliJ Platform if available and selected by the user.
|
* 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.
|
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.
|
The `actionPerformed()` method also receives `AnActionEvent` as a parameter, which is used to access any context data like projects, files, selection, etc.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user