New in 11: Javadoc editing improvements

Posted on by denis.zhdanov

Recently I realized that javadoc editing may be easily improved by introducing some handy little features. After using them for a couple of days, I can say they are cool, so, it’s time to share them with you. And you can try them all in the latest IntelliJ IDEA 11 EAP.

The main idea is to ease fulfilling method javadoc stubs that IntelliJ IDEA generates for you:

  • Smart “End”
    Pressing End when the caret is located after javadoc parameter name relocates it to the position where description should start. It respects ‘Align parameters description’ code style setting as well (‘Code Style | Javadoc | Alignment’).
    Before:
    After:
  • Smart “Enter”
    We rather often need to write a multi-line javadoc parameter description. Now pressing Enter preserves previous line indent if a corresponding option is enabled (‘Editor | Smart Keys | Enter | Smart indent’).
    Before:

    After:
  • Smart complete statement
    Corresponding support is added for smart complete statement (Ctrl+Shift+Enter by default).
    Before:

    After:
Comments below can no longer be edited.

13 Responses to New in 11: Javadoc editing improvements

  1. Dirk says:

    October 21, 2011

    Very nice. While you’re at it, could you also have a look at those?

    http://youtrack.jetbrains.net/issue/IDEA-67002
    http://youtrack.jetbrains.net/issue/IDEA-14591

    Especially the missing images are kind of annoying 🙁

  2. Brice says:

    October 21, 2011

    Cool! However some other small improvements could be made, like:
    – surround text with HTML elements or for example surround a Java object with {@link }
    – easy insert HTML character codes, with a completion popup that triggers on ‘&’
    – allow zencoding in javadoc

    Anyway thanks for the continuous improvements 😉

  3. Denis.Zhdanov says:

    October 21, 2011

    Are there any feature requests for that at the tracker? 🙂

  4. Brice says:

    October 21, 2011

    @Denis

    Yep, there is some :
    – Surrounding with HTML elements : http://youtrack.jetbrains.net/issue/IDEA-69628 | http://youtrack.jetbrains.net/issue/IDEA-15296
    – for the {@link } however not really exactly the same as I was porposing : http://youtrack.jetbrains.net/issue/IDEA-51889
    – HTML character codes : http://youtrack.jetbrains.net/issue/IDEA-44056

    And no issues about ZenCoding in the Javadoc

  5. Denis.Zhdanov says:

    October 21, 2011

    @Dirk: I’m definitely going to improve javadoc support (either editing or formatting) but afraid that that will not be done to the upcoming v.11 release.

  6. Denis.Zhdanov says:

    October 21, 2011

    @Brice: cool, thanks. I reassigned the tickets to me. But please note my comment to Dirk about implementation time.

  7. Mario Arias says:

    October 21, 2011

    No love for Scala/ScalaDoc? http://youtrack.jetbrains.net/issue/SCL-2433

  8. Brice says:

    October 21, 2011

    @Denis Thanks for the attention, even if if doesn’t land right in the 11 🙂
    Btw I created an issue about zencoding missing in javadoc http://youtrack.jetbrains.net/issue/IDEA-75810

  9. Denis.Zhdanov says:

    October 21, 2011

    @Brice: thanks!

  10. Alexander.Podkhalyuzin says:

    October 21, 2011

    @Mario
    We just started progress on all scaladoc features. I hope some of them you will see soon.

  11. David Smiley says:

    October 26, 2011

    The first example, “Smart End”, should work with the tab key, I think. The tab is intuitively what key I expect to press based on the feature shown. I don’t want to remember to start typing new key presses; my brain is full as it is 😉

  12. Denis.Zhdanov says:

    October 27, 2011

    @David: that contradicts to the current approach used by IJ to tab processing, namely inserting tab/spaces

  13. Andy says:

    March 18, 2014

    @Alexander.Podkhalyuzin: Any update on scaladoc formatting support / enhancements? Feature parity with javadoc still seems far off…

Subscribe

Subscribe for updates