Skip to content

Commit

Permalink
stub_indexes.md: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
YannCebron committed Dec 16, 2019
1 parent 1b3407f commit 4427e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basics/indexing_and_psi_stubs/stub_indexes.md
Expand Up @@ -25,7 +25,7 @@ For each element type that you want to store in the stub tree, you need to perfo
The following steps need to be performed only once for each language that supports stubs:

* Change the file element type for your language (the element type that you return from `ParserDefinition.getFileNodeType()`) to a class that extends `IStubFileElementType`.
* In your `plugin.xml`, define the `<stubElementTypeHolder>` extension and specify the interface which contains the `IElementType` constants used by your language's parser ([example](upsource:///plugins/properties/src/META-INF/plugin.xml)<!--#L55-->).
* In your `plugin.xml`, define the `com.intellij.stubElementTypeHolder` extension and specify the interface which contains the `IElementType` constants used by your language's parser ([example](upsource:///plugins/properties/src/META-INF/plugin.xml)).

For serializing string data, e.g. element names, in stubs, we recommend to use `StubOutputStream.writeName()` and `StubInputStream.readName()` methods. These methods ensure that each unique identifier is stored only once in the data stream. This reduces the size of the serialized stub tree data.

Expand Down

0 comments on commit 4427e50

Please sign in to comment.