DomFileDescription deprecated hasStubs and stubVersion (#386)

This commit is contained in:
Brian McNamara 2021-03-09 00:48:13 -08:00 committed by GitHub
parent b38ab293bf
commit d501d13fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,7 +592,7 @@ Example can be found in Struts 2 plugin (package `com.intellij.struts2.dom.strut
DOM elements can be stubbed, so (costly) access to XML/PSI is not necessary (see [Indexing and PSI Stubs](indexing_and_psi_stubs.md) for similar feature for custom languages).
Performance relevant elements, tag or attribute getters can simply be annotated with `@com.intellij.util.xml.Stubbed`.
Return `true` from `DomFileDescription.hasStubs()` and increase `DomFileDescription.getStubVersion()` whenever you change `@Stubbed` annotations usage in your DOM hierarchy to trigger proper rebuilding of Stubs during indexing.
Set and increase `stubVersion` of `com.intellij.dom.fileMetaData` extension whenever you change `@Stubbed` annotations usage in your DOM hierarchy to trigger proper rebuilding of Stubs during indexing.
## Building a DOM-Based GUI
@ -785,4 +785,4 @@ The following bundled open-source plugins make (heavy) use of DOM:
- [Ant](upsource:///plugins/ant)
- [Plugin DevKit](upsource:///plugins/devkit/devkit-core)
- [Maven](upsource:///plugins/maven)
- [Struts 2](https://github.com/JetBrains/intellij-plugins/tree/master/struts2) (Ultimate Edition)
- [Struts 2](https://github.com/JetBrains/intellij-plugins/tree/master/struts2) (Ultimate Edition)