mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
stub_indexes.md: add Kotlin sample for stubElementTypeHolder
EP
This commit is contained in:
parent
ed4f074361
commit
fa995bfbb7
@ -1,6 +1,6 @@
|
|||||||
[//]: # (title: Stub Indexes)
|
# Stub Indexes
|
||||||
|
|
||||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
<!-- Copyright 2000-2023 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||||
|
|
||||||
## Stub Trees
|
## Stub Trees
|
||||||
|
|
||||||
@ -28,7 +28,9 @@ The following steps need to be performed only once for each language that suppor
|
|||||||
* In your <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 your language's parser.
|
* In your <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 your language's parser.
|
||||||
Define common `externalIdPrefix` to be used for all stub element types (see [`StubElementTypeHolderEP`](%gh-ic%/platform/core-api/src/com/intellij/psi/stubs/StubElementTypeHolderEP.java) docs for important requirements).
|
Define common `externalIdPrefix` to be used for all stub element types (see [`StubElementTypeHolderEP`](%gh-ic%/platform/core-api/src/com/intellij/psi/stubs/StubElementTypeHolderEP.java) docs for important requirements).
|
||||||
|
|
||||||
**Example**: [`JavaStubElementTypes`](%gh-ic%/java/java-psi-impl/src/com/intellij/psi/impl/java/stubs/JavaStubElementTypes.java) registered in [`JavaPsiPlugin.xml`](%gh-ic%/java/java-psi-impl/src/META-INF/JavaPsiPlugin.xml)
|
**Examples**:
|
||||||
|
- [`JavaStubElementTypes`](%gh-ic%/java/java-psi-impl/src/com/intellij/psi/impl/java/stubs/JavaStubElementTypes.java) registered in [`JavaPsiPlugin.xml`](%gh-ic%/java/java-psi-impl/src/META-INF/JavaPsiPlugin.xml)
|
||||||
|
- see [`Angular2HtmlStubElementTypes`](%gh-ij-plugins-master%/AngularJS/src/org/angular2/lang/html/stub/Angular2HtmlStubElementTypes.kt) for Kotlin sample
|
||||||
|
|
||||||
For each element type that you want to store in the stub tree, you need to perform the following steps:
|
For each element type that you want to store in the stub tree, you need to perform the following steps:
|
||||||
|
|
||||||
|
3
v.list
3
v.list
@ -15,4 +15,7 @@
|
|||||||
<var name="gh-ij-android" value="https://git.jetbrains.org/?p=idea/android.git;hb=refs/tags/idea/%ijPlatformBuild%;a=blob;f="/>
|
<var name="gh-ij-android" value="https://git.jetbrains.org/?p=idea/android.git;hb=refs/tags/idea/%ijPlatformBuild%;a=blob;f="/>
|
||||||
<!-- <var name="gh-ij-android" value="https://github.com/JetBrains/android/tree/idea/%ijPlatformBuild%"/>-->
|
<!-- <var name="gh-ij-android" value="https://github.com/JetBrains/android/tree/idea/%ijPlatformBuild%"/>-->
|
||||||
|
|
||||||
|
<var name="gh-ij-plugins" value="https://github.com/JetBrains/intellij-plugins/tree/idea/%ijPlatformBuild%"/>
|
||||||
|
<var name="gh-ij-plugins-master" value="https://github.com/JetBrains/intellij-plugins/tree/master"/>
|
||||||
|
|
||||||
</vars>
|
</vars>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user