Grammar-Kit generats stub based psi element with a constructor using IStubElementType
It should check the superclass constructor and use IElementType if necessary instead.
For now it seems there is no way to override this.
@hsz we probably need your help here. One of the problem is that for proper introspection, we need to have classfiles from the platform and plugin in the classpaths. And it shouldn't be a problem with platform, but may be tricky with plugin. In my case - compile task depends on generate task. But, generate could use a classfiles from the previous run :) and this won't work on clean run ofc. I was thinking about extracting some classes into separate module and compile it first. But not sure if it is doable and feels too tricky for a normal solution. Not sure if there is one, but still, i'd like to have compiler output paths in the classpath of generate parser task.
I just checked manually, with
classpath += files("/home/hurricup/Projects/IDEA-Perl5/plugin/backend/build/classes/java/main", "/home/hurricup/Projects/IDEA-Perl5/plugin/backend/build/classes/kotlin/main")
And it did the trick
tried to extract some stuff to a separate module to change the build graph and this is a real pain. May be would be easier for maintainers to add an option I could specify in bnf to enforce particular element type. Feels a bit hacky, but well.