run_configurations.md: RunConfigurationProducer DumbAware

This commit is contained in:
Yann Cébron 2024-03-13 18:26:11 +01:00
parent 342bcb5d21
commit 02f58c1347

View File

@ -138,6 +138,7 @@ The extension requires implementing the following methods:
* `isConfigurationFromContext()` - checks if a configuration was created from the specified context.
This method allows reusing an existing run configuration, which applies to the current context, instead of creating a new one and possibly ignoring the user's customizations in the existing one.
If access to indexes is not required, it can be marked [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI).
If the run configuration requires additional data before it is executed for the first time, override [`RunConfigurationProducer.onFirstRun()`](%gh-ic%/platform/lang-api/src/com/intellij/execution/actions/RunConfigurationProducer.java) to provide it or display UI to get the data from the user.
To support the automatic naming of configurations created from context, the configuration should extend [`LocatableConfigurationBase`](%gh-ic%/platform/execution/src/com/intellij/execution/configurations/LocatableConfigurationBase.java).