stub_indexes.md: add EP link

This commit is contained in:
Yann Cébron 2025-04-09 16:51:45 +02:00
parent f832b570a7
commit 5fbbd57912

View File

@ -33,7 +33,7 @@ Usually there is no need to have stubs for things like statements or local varia
The following steps need to be performed only once for each language that supports stubs:
1. Change the file element type for the language (the element type returned from `ParserDefinition.getFileNodeType()`) to a class that extends [`IStubFileElementType`](%gh-ic%/platform/core-impl/src/com/intellij/psi/tree/IStubFileElementType.java) and override its `getExternalId()` method (see also following item).
2. In the <path>[plugin.xml](plugin_configuration_file.md)</path>, define the `com.intellij.stubElementTypeHolder` extension and specify the interface which contains the `IElementType` constants used by the language's parser.
2. In the <path>[plugin.xml](plugin_configuration_file.md)</path>, define the <include from="snippets.topic" element-id="epLink"><var name="ep" value="com.intellij.stubElementTypeHolder"/></include> extension and specify the interface which contains the `IElementType` constants used by the language's parser.
Define the common `externalIdPrefix` to be used for all stub element types (see [](#adding-stub-elements)).
See [`StubElementTypeHolderEP`](%gh-ic%/platform/core-api/src/com/intellij/psi/stubs/StubElementTypeHolderEP.java) docs for important requirements.