From 7462c85c9b2bba5ce7076ceab639b92f04ee9f41 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Wed, 10 Apr 2024 10:01:37 +0200 Subject: [PATCH] Grammar fixes: "the EDT" -> "EDT" --- .../coroutines/coroutine_dispatchers.md | 4 ++-- topics/basics/basic_action_system.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/topics/basics/architectural_overview/coroutines/coroutine_dispatchers.md b/topics/basics/architectural_overview/coroutines/coroutine_dispatchers.md index ddc6d89e2..795453d83 100644 --- a/topics/basics/architectural_overview/coroutines/coroutine_dispatchers.md +++ b/topics/basics/architectural_overview/coroutines/coroutine_dispatchers.md @@ -57,7 +57,7 @@ suspend fun readDataFromFile(): Data { ## EDT Dispatcher The [`Dispatchers.EDT`](%gh-ic%/platform/core-api/src/com/intellij/openapi/application/coroutines.kt) dispatcher is used for executing UI actions on the Swing Event Dispatch Thread. -`Dispatchers.EDT` dispatches onto the EDT within the context [modality state](general_threading_rules.md#modality-and-invokelater). +`Dispatchers.EDT` dispatches onto EDT within the context [modality state](general_threading_rules.md#modality-and-invokelater). ### `Dispatchers.Main` vs. `Dispatchers.EDT` @@ -107,7 +107,7 @@ The code is executed as follows: 1. `suspendingTask` is started and partially executed on **Thread 2**. 2. `suspendingTask` is suspended when it waits for data fetched from the internet. 3. After receiving data, `suspendingTask` is resumed, but now it is executed on **Thread 1**. -4. Execution explicitly switches to the EDT Dispatcher and `updateUI` is executed on the UI thread. +4. Execution explicitly switches to the EDT dispatcher and `updateUI` is executed on the UI thread. > This behavior can result in unexpected consequences for code that relies on thread-specific data and assumes it will execute consistently on the same thread. diff --git a/topics/basics/basic_action_system.md b/topics/basics/basic_action_system.md index a91cf0e87..bf96427b1 100644 --- a/topics/basics/basic_action_system.md +++ b/topics/basics/basic_action_system.md @@ -51,11 +51,11 @@ Every IntelliJ Platform action should override `AnAction.update()` and must over 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 the EDT must not access PSI, VFS, or project data but have access to Swing components and other UI models. + 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 the EDT. + 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.