Faster XML coding with new completion features

How often do you write XML configurations like that above? How many keystrokes does it take?

This one is written in just moments, with the help of the new completion features coming in IntelliJ IDEA 10. First of all, the IDE completes all required subtags for you, even nested ones. Second, you can use smart completion feature to ensure that the tags you write are in order described in your XML schema.

If you do not know where your new tag should be inserted, invoke the Generate / XML Tag action from context menu, choose the tag you want, and IntelliJ IDEA will generate a completely valid XML structure and insert it in the right place of the document.

Download the latest IntelliJ IDEA EAP build and try this in the next XML file you open.

This entry was posted in Tips & Tricks and tagged , , . Bookmark the permalink.

4 Responses to Faster XML coding with new completion features

  1. neuro159 says:

    It should insert short tag is only short tags are used – now you need to press ESC & fix tag manually

  2. Brice says:

    Actually something like zen coding would be really awesome in IntelliJ :
    http://code.google.com/p/zen-coding/
    http://www.downloadsquad.com/2010/04/30/if-you-code-html-zen-coding-will-change-your-life/

    You just type something like :
    div#page>div.logo+ul#navigation>li*5>a

    And it’s expanded to :





  3. yole says:

    Brice,
    Zen coding is supported in IntelliJ IDEA since version 9.0.2.

  4. Brice says:

    @yole
    Thx I didn’t knew that!

    For readers, we need to install the plugin of Zen-Coding :
    http://blogs.jetbrains.com/idea/2010/03/zen-coding-support-in-intellij-idea/

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>