Please forgive my ignorance, but I need help understanding how to implement a stub index in order to get "Go To Symbol" working for my custom language plugin. I tried looking at the La Clojure source, but there's a lot going on in there, and I was hoping someone could explain how it would work for a hypothetical, super-simple language, consisting of nothing but PSI elements called "named expressions".
For such a language, I imagine I'd have my PSI element class:
NamedExpression<T extends StubElement> extends StubBasedPsiElementBase<T>
And then I'd make a stub index class:
NamedExpressionIndex extends StringStubIndexExtension<NamedExpression>
And then I'd register the stub index in the plugin.xml:
And then presumably I could implement a ChooseByNameContributor that would use my NamedExpressionIndex stub index. But... beyond this I don't see what I'm missing, because I don't know what all the moving parts are and what they're doing, and why. Again, thanks for your help and your patience. I originally worked on my language plugin when IntelliJ was at version 6, so my understanding of the current API has some big gaps.