"EDT" and related: add links to threading_model.md

This commit is contained in:
Yann Cébron 2024-08-07 10:55:36 +02:00
parent beed2c27c2
commit 5c6184c69a
5 changed files with 7 additions and 7 deletions

View File

@ -380,7 +380,7 @@ Add implementation for `com.intellij.openapi.fileEditor.FileEditor.getFile()`
: Project is now only accessible via `com.intellij.openapi.ui.playback.PlaybackContext.getProject()` since it may change during script execution. : Project is now only accessible via `com.intellij.openapi.ui.playback.PlaybackContext.getProject()` since it may change during script execution.
JSON Widget suppressor `com.intellij.json.jsonWidgetSuppressor` EP JSON Widget suppressor `com.intellij.json.jsonWidgetSuppressor` EP
: Override new method [`JsonWidgetSuppressor.isCandidateForSuppress(VirtualFile, Project)`](%gh-ic%/json/src/com/jetbrains/jsonSchema/extension/JsonWidgetSuppressor.java) for quick check in EDT before `suppressSwitcherWidget()` is called on background thread. : Override new method [`JsonWidgetSuppressor.isCandidateForSuppress(VirtualFile, Project)`](%gh-ic%/json/src/com/jetbrains/jsonSchema/extension/JsonWidgetSuppressor.java) for quick check in [EDT](threading_model.md) before `suppressSwitcherWidget()` is called on a background thread.
### HTTP Client Plugin 2021.1 ### HTTP Client Plugin 2021.1

View File

@ -150,7 +150,7 @@ JsonPath library unbundled
: Coroutine scope was added to track editor lifetime. : Coroutine scope was added to track editor lifetime.
`com.intellij.collaboration.ui.codereview.details.model.CodeReviewChangesViewModelBase` class removed `com.intellij.collaboration.ui.codereview.details.model.CodeReviewChangesViewModelBase` class removed
: Incorrect EDT-reliant implementation removed. : Incorrect [EDT](threading_model.md)-reliant implementation removed.
`com.intellij.collaboration.async.CoroutineUtilKt.DisposingScope(Disposable, CoroutineContext)` method removed `com.intellij.collaboration.async.CoroutineUtilKt.DisposingScope(Disposable, CoroutineContext)` method removed
: Use `com.intellij.collaboration.async.CoroutineUtilKt.disposingScope(CoroutineContext)` instead. : Use `com.intellij.collaboration.async.CoroutineUtilKt.disposingScope(CoroutineContext)` instead.

View File

@ -56,7 +56,7 @@ Application, project, and module [services](plugin_services.md) declared with `o
## Code ## Code
> Loading and unloading plugins happens in EDT and under write action. > Loading and unloading plugins happens in [EDT](threading_model.md) and under write action.
> >
{style="note"} {style="note"}

View File

@ -62,14 +62,14 @@ Implementation in [Kotlin](using_kotlin.md) is required because Java doesn't sup
To execute code when a project is being opened, use one of these two [extensions](plugin_extensions.md): To execute code when a project is being opened, use one of these two [extensions](plugin_extensions.md):
`com.intellij.postStartupActivity` `com.intellij.postStartupActivity`
: [`StartupActivity`](%gh-ic%/platform/core-api/src/com/intellij/openapi/startup/StartupActivity.kt) for immediate execution on EDT. : [`StartupActivity`](%gh-ic%/platform/core-api/src/com/intellij/openapi/startup/StartupActivity.kt) for immediate execution on [EDT](threading_model.md).
Implement `DumbAware` to indicate activity can run in a background thread (in parallel with other such tasks). Implement `DumbAware` to indicate activity can run in a background thread (in parallel with other such tasks).
`com.intellij.backgroundPostStartupActivity` `com.intellij.backgroundPostStartupActivity`
: [`StartupActivity.Background`](%gh-ic%/platform/core-api/src/com/intellij/openapi/startup/StartupActivity.kt) for execution with a 5-second delay in a background thread (2019.3 or later). : [`StartupActivity.Background`](%gh-ic%/platform/core-api/src/com/intellij/openapi/startup/StartupActivity.kt) for execution with a 5-second delay in a background thread (2019.3 or later).
Any long-running or CPU-intensive tasks should be made visible to users by using `ProgressManager.run(Task.Backgroundable)`. Any long-running or CPU-intensive tasks should be made visible to users by using `ProgressManager.run(Task.Backgroundable)` (see [](background_processes.md)).
Access to indexes must be wrapped with [`DumbService`](indexing_and_psi_stubs.md#dumb-mode), see also [General Threading Rules](threading_model.md). Access to indexes must be wrapped with [`DumbService`](indexing_and_psi_stubs.md#dumb-mode), see also [](threading_model.md).
See also [](ide_infrastructure.md#running-tasks-once). See also [](ide_infrastructure.md#running-tasks-once).

View File

@ -53,7 +53,7 @@ The initial phase describes what happens when no parameter info is currently dis
2. If the returned function call element is valid, the `showParameterInfo()` method is invoked. 2. If the returned function call element is valid, the `showParameterInfo()` method is invoked.
Implementations of this method usually just call `showHint()` of the `CreateParameterInfoContext` providing the offset at which the popup should appear. Implementations of this method usually just call `showHint()` of the `CreateParameterInfoContext` providing the offset at which the popup should appear.
3. For each item to show from step 1, the `updateUI()` method is called. 3. For each item to show from step 1, the `updateUI()` method is called.
No heavy work is allowed in this method since it runs on EDT, and it should only update the UI representation using, e.g., No heavy work is allowed in this method since it runs on [EDT](threading_model.md), and it should only update the UI representation using, e.g.,
`setUIComponentEnabled()` or `setupUIComponentPresentation()` of the provided `ParameterInfoUIContext`. `setUIComponentEnabled()` or `setupUIComponentPresentation()` of the provided `ParameterInfoUIContext`.
4. After that the following methods are called which will be explained in the next phase: `findElementForUpdatingParameterInfo()`, 4. After that the following methods are called which will be explained in the next phase: `findElementForUpdatingParameterInfo()`,
`updateParameterInfo()`, `updateUI()`. `updateParameterInfo()`, `updateUI()`.