Often people ask us what XML editor we are using. When I say I use IntelliJ from JetBrain, the next question is inevitably "uh? I thought IntelliJ was a Java IDE".
For those of us who have are writing Java code, IntelliJ had for as far as I can remember provided an auto-import feature: say you use the class ArrayList without importing java.util.ArrayList. Then IntelliJ suggests to add an
import java.util.ArrayList for you, and you can accept the suggestion by just pressing Alt-Enter.
Now IntelliJ has the same feature for namespace declaration in XML. Say you start writing
<xforms:model> but you don't have any namespace declaration for the
xforms prefix. After you press Alt-Enter, IntelliJ will ask if you want to create a namespace declaration. If you accept, it will add for you the
xmlns:xforms="http://www.w3.org/2002/xforms" where it is needed.
IntelliJ seems to be looking all your schemas, and picking the namespace of those that define an element with a matching name. When multiple namespaces could apply, IntelliJ will give you a choice. For instance in the example below I have a
config element, which could either be the start of an XPL pipeline or a page flow controller document. Hence IntelliJ gives me the choice between the two: