PSI for all injected language parts in a file?

Hi,
I have a XML file with several attributes and text nodes with an injected custom language.

Currently variable resolving only works within each of the small injected parts. I want to resolve variables of an injected language fragment in all fragments of the physical file.

How do I get access to the PSI elements of all injected language parts?
Is it possible to get a (virtual) PSI tree which contains all injected fragments of the XML file for the custom language?

I've already tried implementing an language injector, but retrieving the view provoder only gives me the virtual PSI file of the small fragment.

Thanks!
Wallaby

1

There is no such possibility. Conceptually, injection is supposed to be used when each of the injected fragments is isolated. If they're not, you should look into using MultipleFilesPerDocumentFileViewProvider instead.

0
Avatar
Permanently deleted user

Is there any implementation sample code available?
Do I have to implement my own logic to find the places where the custom language is to be injected in the XML file?

Thanks!
Wallaby

0

请先登录再写评论。