mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
"EDT" and related: add links to threading_model.md
This commit is contained in:
parent
beed2c27c2
commit
5c6184c69a
@ -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.
|
||||
|
||||
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
|
||||
|
||||
|
@ -150,7 +150,7 @@ JsonPath library unbundled
|
||||
: Coroutine scope was added to track editor lifetime.
|
||||
|
||||
`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
|
||||
: Use `com.intellij.collaboration.async.CoroutineUtilKt.disposingScope(CoroutineContext)` instead.
|
||||
|
@ -56,7 +56,7 @@ Application, project, and module [services](plugin_services.md) declared with `o
|
||||
|
||||
## 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"}
|
||||
|
||||
|
@ -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):
|
||||
|
||||
`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).
|
||||
|
||||
`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).
|
||||
|
||||
Any long-running or CPU-intensive tasks should be made visible to users by using `ProgressManager.run(Task.Backgroundable)`.
|
||||
Access to indexes must be wrapped with [`DumbService`](indexing_and_psi_stubs.md#dumb-mode), see also [General Threading Rules](threading_model.md).
|
||||
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 [](threading_model.md).
|
||||
|
||||
See also [](ide_infrastructure.md#running-tasks-once).
|
||||
|
||||
|
@ -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.
|
||||
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.
|
||||
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`.
|
||||
4. After that the following methods are called which will be explained in the next phase: `findElementForUpdatingParameterInfo()`,
|
||||
`updateParameterInfo()`, `updateUI()`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user