XML improvements in IntelliJ IDEA X
July 8th, 2010 by Konstantin BulenkovThere are few small, but very useful improvements in XML editing will be available in IntelliJ IDEA 10. All of them are very handy when edit XML files like schemes, JSPs, MXMLs, etc. First of these improvements is inspection detecting unused namespace declarations.

Others include namespace prefix intentions which allow you to rename, remove or introduce namespace prefixes. Want to make you schema file lighter? Not a problem:

Rename in place:

Or introduce new namespace prefix:

Find usages works as well. Enjoy them in first IntelliJ IDEA X EAP soon.
Tags: Code Analysis, ideaX, XML

July 8th, 2010 at 1:06 pm
will these improvements trickle down to the MXML support? :>
July 8th, 2010 at 1:10 pm
Sure, and you will be able use it in JSP too. All them based on XML-support
July 8th, 2010 at 1:15 pm
Will the “namespace declaration not used” condition take into account prefixes that are used only in element or attribute content, e.g. ?
July 8th, 2010 at 1:17 pm
Whoops, the XML there got swallowed.
Will the “namespace declaration not used” condition take into account prefixes that are used only in element or attribute content, e.g. [invoice xsi:type="my:invoice"]?
July 8th, 2010 at 1:29 pm
@Michael, yes. Moreover, in place editing works just inside such attr values: http://i30.tinypic.com/8nba.png
July 8th, 2010 at 2:39 pm
Nice. Will Ctrl-Alt-o work on unused declarations (similar to unused Java packages)?
July 8th, 2010 at 3:52 pm
Nice improvements … keep them coming!
I have some XML related ones on my “application improvements” list that I’m usually too lazy to report …
- Allow to fold namespace declarations (similar to the Java imports folding) so they’re not visible until you hover with the mouse or unfold.
- Fold maybe also the xsi namespace attributes like the location that usually takes a lot of space and is always the same in many XML files (eg. Spring XML configuration files).
- Allow customising the XML formatting so that each namespace declaration is kept in one line and sorted by prefix (similar to Java or JSP imports).
- Allow to navigate to the namespace declaration via Control-B or Control-Click. This would be even of more help in XML as the declaration can occur at any node.
July 9th, 2010 at 5:49 am
@Juan Thanks for feature requests. The last on is already implemented http://i31.tinypic.com/28kk16s.png (This is Ctrl+mouseover, no mouse cursor on the screen
) I’ll do folding soon. Nice idea!
July 11th, 2010 at 9:00 am
Intellij X ??? The roadmap for intellij x is yet to release, and yet a EAP is going to be release soon ? Surprise for us … <:^}
September 28th, 2010 at 2:23 am
Another improvement is the usage of OASIS XML catalog, I have not found how to configure it (it seems that this useful feature is not implemented).