Desperate request for suggestions for custom XML language

Many employees at my company badly want editor for our XML based web template
language similar to JSP. Two important aspects of this language are embedded
Java, CSS, Javascript, and formatting. Neither of these are available for a
plugin to modify for XML.

Waiting until IDEA 6 or even IDEA 6 EAP, for the promised XML language API, is
not cool for us. I've been considering my options for implementing the plugin,
and it appears that due to nature of chameleons, I will need to implement custom
language plugin which parses XML itself without IDEA's help.

I do not want to re-implement IDEA's XML support. I am desperately asking
JetBrains developers, if some small API could be unobfuscated or briefly
explained, which would allow me to hook into XML lexer/parser but extend it in
such a way as to provide my own chameleons from the lexer as required. I'd like
to still produce XmlElement PSI tree and get all of the XML editor features that
normal XML files have, but with embedded languages and custom formatter.

I've been looking through com.intellij.psi.impl.source.tabular and Grammar and
things like that and I don't see how to create my own grammar which extends
XML's. Is this possible? Is this a suggested way to do it? Is there some other
way I should go about it?

Any help from JetBrains or anyone else would be welcomed. I right now feel
desperate because all of the ideas I've looked at are way too much work, or they
are not extensible enough to allow arbitrary attribute values to be Java/JS/CSS

Please sign in to leave a comment.