mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 17:57:53 +08:00
execution_contexts.topic: Include elements via <snippet>
This commit is contained in:
parent
981a8ff911
commit
e81a2ee7d1
@ -5,7 +5,7 @@
|
|||||||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||||||
id="execution_contexts" title="Execution Contexts">
|
id="execution_contexts" title="Execution Contexts">
|
||||||
|
|
||||||
<var name="id_postfix"></var><title>Execution Contexts</title>
|
<title>Execution Contexts</title>
|
||||||
<link-summary>Tracking execution progress, checking for cancellations, and switching between different execution contexts.</link-summary>
|
<link-summary>Tracking execution progress, checking for cancellations, and switching between different execution contexts.</link-summary>
|
||||||
|
|
||||||
<p>The IntelliJ Platform provides APIs that allow tracking the progress of background processes and canceling their
|
<p>The IntelliJ Platform provides APIs that allow tracking the progress of background processes and canceling their
|
||||||
@ -25,14 +25,19 @@
|
|||||||
<li><a anchor="progress-indicator"/> — obsolete since 2024.1</li>
|
<li><a anchor="progress-indicator"/> — obsolete since 2024.1</li>
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
<p id="progress-indicator-migration-note%id_postfix%">Currently, the Progress Indicator context is the most widely used approach in the IntelliJ Platform.
|
<snippet id="progress-indicator-migration-note">
|
||||||
|
<p>Currently, the Progress Indicator context is the most widely used approach in the IntelliJ Platform.
|
||||||
As the platform's execution model moves towards <a href="launching_coroutines.md">coroutines</a>, this approach
|
As the platform's execution model moves towards <a href="launching_coroutines.md">coroutines</a>, this approach
|
||||||
can be considered obsolete.</p>
|
can be considered obsolete.</p>
|
||||||
|
</snippet>
|
||||||
|
|
||||||
<p>Starting with 2024.2, it is recommended to execute new code in the <a anchor="coroutine-execution-context-coroutines"/>.</p>
|
<p>Starting with 2024.2, it is recommended to execute new code in the <a anchor="coroutine-execution-context-coroutines"/>.</p>
|
||||||
|
|
||||||
<p id="sections-note%id_postfix%">The following sections explain the contexts and provide information about process cancellation, progress
|
<snippet id="sections-note">
|
||||||
|
<p>The following sections explain the contexts and provide information about process cancellation, progress
|
||||||
tracking, and switching between contexts.</p>
|
tracking, and switching between contexts.</p>
|
||||||
|
</snippet>
|
||||||
|
|
||||||
|
|
||||||
<chapter title="Coroutine Execution Context" id="coroutine-execution-context-coroutines"><!--FIXME: id-->
|
<chapter title="Coroutine Execution Context" id="coroutine-execution-context-coroutines"><!--FIXME: id-->
|
||||||
<primary-label ref="2024.2"/>
|
<primary-label ref="2024.2"/>
|
||||||
@ -72,16 +77,12 @@
|
|||||||
<li><a anchor="blocking-context"/></li>
|
<li><a anchor="blocking-context"/></li>
|
||||||
<li><a anchor="progress-indicator"/> — obsolete since 2024.1</li>
|
<li><a anchor="progress-indicator"/> — obsolete since 2024.1</li>
|
||||||
</list>
|
</list>
|
||||||
<include from="execution_contexts.topic" element-id="progress-indicator-migration-note">
|
<include from="execution_contexts.topic" element-id="progress-indicator-migration-note"/>
|
||||||
<var name="id_postfix" value="-8d50ec"/>
|
|
||||||
</include>
|
|
||||||
|
|
||||||
<p>Starting with 2024.1, it is recommended to execute new code in the
|
<p>Starting with 2024.1, it is recommended to execute new code in the
|
||||||
<a anchor="suspending-context-coroutines">Suspending Context</a>.</p>
|
<a anchor="suspending-context-coroutines">Suspending Context</a>.</p>
|
||||||
|
|
||||||
<include from="execution_contexts.topic" element-id="sections-note">
|
<include from="execution_contexts.topic" element-id="sections-note"/>
|
||||||
<var name="id_postfix" value="-8d50ee"/>
|
|
||||||
</include>
|
|
||||||
|
|
||||||
<chapter title="Suspending Context (Coroutines)" id="suspending-context-coroutines">
|
<chapter title="Suspending Context (Coroutines)" id="suspending-context-coroutines">
|
||||||
<primary-label ref="2024.1"/>
|
<primary-label ref="2024.1"/>
|
||||||
@ -128,7 +129,6 @@
|
|||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
|
|
||||||
|
|
||||||
<chapter title="Progress Indicator" id="progress-indicator">
|
<chapter title="Progress Indicator" id="progress-indicator">
|
||||||
<primary-label ref="obsolete-2024.1"/>
|
<primary-label ref="obsolete-2024.1"/>
|
||||||
<p>Code executed via the Progress API
|
<p>Code executed via the Progress API
|
||||||
@ -145,6 +145,7 @@
|
|||||||
performant solution.</p>
|
performant solution.</p>
|
||||||
</tip>
|
</tip>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<chapter title="Execution Contexts APIs" id="execution-contexts-apis">
|
<chapter title="Execution Contexts APIs" id="execution-contexts-apis">
|
||||||
<chapter title="Cancellation Check" id="cancellation-check">
|
<chapter title="Cancellation Check" id="cancellation-check">
|
||||||
<p>The following table presents APIs to use for checking whether a task was canceled in different execution
|
<p>The following table presents APIs to use for checking whether a task was canceled in different execution
|
||||||
@ -169,7 +170,8 @@
|
|||||||
</list>
|
</list>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="cancellation-check-progress-indicator-row%id_postfix%">
|
<snippet id="cancellation-check-progress-indicator-row">
|
||||||
|
<tr>
|
||||||
<td>Progress Indicator</td>
|
<td>Progress Indicator</td>
|
||||||
<td>
|
<td>
|
||||||
<list>
|
<list>
|
||||||
@ -180,6 +182,7 @@
|
|||||||
</list>
|
</list>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</snippet>
|
||||||
</table>
|
</table>
|
||||||
</tab>
|
</tab>
|
||||||
<tab title="2024.1" group-key="2024.1">
|
<tab title="2024.1" group-key="2024.1">
|
||||||
@ -210,9 +213,7 @@
|
|||||||
</list>
|
</list>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<include from="execution_contexts.topic" element-id="cancellation-check-progress-indicator-row">
|
<include from="execution_contexts.topic" element-id="cancellation-check-progress-indicator-row"/>
|
||||||
<var name="id_postfix" value="-8d50f1"/>
|
|
||||||
</include>
|
|
||||||
</table>
|
</table>
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
@ -227,7 +228,8 @@
|
|||||||
<table style="header-column">
|
<table style="header-column">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="17%">Coroutine Execution Context</td>
|
<td width="17%">Coroutine Execution Context</td>
|
||||||
<td id="progress-reporting-coroutine-execution-context-cell%id_postfix%">
|
<snippet id="progress-reporting-coroutine-execution-context-cell">
|
||||||
|
<td>
|
||||||
<list>
|
<list>
|
||||||
<li><a href="%gh-ic%/platform/util/progress/src/impl/ProgressStep.kt"><code>ProgressStep</code></a>
|
<li><a href="%gh-ic%/platform/util/progress/src/impl/ProgressStep.kt"><code>ProgressStep</code></a>
|
||||||
- a step-based progress reporting (see its KDoc for details)
|
- a step-based progress reporting (see its KDoc for details)
|
||||||
@ -258,8 +260,10 @@
|
|||||||
}
|
}
|
||||||
</code-block>
|
</code-block>
|
||||||
</td>
|
</td>
|
||||||
|
</snippet>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="progress-reporting-progress-indicator-row%id_postfix%">
|
<snippet id="progress-reporting-progress-indicator-row">
|
||||||
|
<tr>
|
||||||
<td>Progress Indicator</td>
|
<td>Progress Indicator</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="%gh-ic%/platform/core-api/src/com/intellij/openapi/progress/ProgressIndicator.java"><code>ProgressIndicator</code>'s</a>
|
<a href="%gh-ic%/platform/core-api/src/com/intellij/openapi/progress/ProgressIndicator.java"><code>ProgressIndicator</code>'s</a>
|
||||||
@ -270,15 +274,14 @@
|
|||||||
Progress</a> for details.</p>
|
Progress</a> for details.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</snippet>
|
||||||
</table>
|
</table>
|
||||||
</tab>
|
</tab>
|
||||||
<tab title="2024.1" group-key="2024.1">
|
<tab title="2024.1" group-key="2024.1">
|
||||||
<table style="header-column">
|
<table style="header-column">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="17%">Suspending Context</td>
|
<td width="17%">Suspending Context</td>
|
||||||
<include from="execution_contexts.topic" element-id="progress-reporting-coroutine-execution-context-cell">
|
<include from="execution_contexts.topic" element-id="progress-reporting-coroutine-execution-context-cell"/>
|
||||||
<var name="id_postfix" value="-8d50f5"/>
|
|
||||||
</include>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Blocking Context</td>
|
<td>Blocking Context</td>
|
||||||
@ -286,9 +289,7 @@
|
|||||||
unavailable
|
unavailable
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<include from="execution_contexts.topic" element-id="progress-reporting-progress-indicator-row">
|
<include from="execution_contexts.topic" element-id="progress-reporting-progress-indicator-row"/>
|
||||||
<var name="id_postfix" value="-8d50f7"/>
|
|
||||||
</include>
|
|
||||||
</table>
|
</table>
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user