PsiType referencing non-existent type

Answered

Hi,

I am developing plugin extending Groovy's NonCodeMembersContributor.

Is it possible to make auto-completion work for non-existent type that would be an combination of few other known types?

Example:

I have two known interfaces: A and B, and I want to create PsiType instance referencing non-existent type 'C', where C would be equivalent to:

interface C extends A, B { }

Then in then NonCodeMembersContributor#processDynamicElements i would pass that PsiType instance to the processor like below:

processor.execute(new LightFieldBuilder(name, psiTypeC, aClass), state)

All my attempts either did not work, or generated exceptions.

0
2 comments

Have you tried creating PsiIntersectionType?

1
Avatar
Permanently deleted user

I did not :(, now it's working, thank you.

0

Please sign in to leave a comment.