Integrate XML File As Part of A Custom Language
I have a custom language plugin that needs to recognize some xml files as being part of the language. The XML can both define symbols in the language and include code from the custom language where I need to inject variables in the language injection block.
In addition to these things, I'd like to autodetect these XML files and include the language injections in them so the user doesn't have to go through them and apply the language injections themselves.
Does anyone have any advice?
请先登录再写评论。
I answered my own question.
Implementing the multiHostInjector EP was the answer. You can see the code here:
https://bitbucket.org/sylvanaar2/lua-for-idea/src/3fcf665ba74f24283cd161ead13a1e9249983f73/src/injection/FrameXMLLanguageInjector.java?at=idea15&fileviewer=file-view-default