Hacker News new | ask | show | jobs
by BasLeijdekkers 5311 days ago
If you can't get IntelliJ IDEA's JavaDoc formatter to do what you want there exists a plugin which lets you use Eclipse for formatting call Eclipse Code Formatter: http://plugins.intellij.net/plugin/?idea&id=6546 I have never used it, so I cannot comment on its quality, but it might be worth a try.

However submitting bugs and feature requests with examples would be better. Many reports are fixed quite quickly. I did not manage to find the bugs you filed though: http://youtrack.jetbrains.net/issues?q=%23rkalla

1 comments

Bas thank you for the link; I gave that plugin a try before going back to Eclipse. Unfortunately the workflow of actually using it is terrible for someone that formats frequently (like I do).

I can't find older bugs, but the most recent one was this one: http://youtrack.jetbrains.net/issue/IDEA-28895?query=voted+b...

I don't know what happened between the report and the fix in 10.x, but I didn't notice changed behavior. The formatter still didn't wrap correctly for me and indent.

For example, take this:

  /* This is a really long line */
and turn it into:

  /* 
   * This is a really
   * long line.
   */
IIRC what it did was break the line but not prefix it with star, or it prefixed it but put no space between star and the chars... something like that.

It also didn't handle longer // comments well from what I remember and most importantly would mangle the HTML embedded in my Javadoc comments.

These are little touches that Eclipse takes care to handle... like ul-li lists inside of Javadoc that it will leave as a list and not try and compact down into a run on sentence.

Or things like p-tags formatted nicely as paragraphs.

I literally just want the default formatter from Eclipse in IJ and I'd be a happy camper.

I am surprised more people don't notice these discrepancies, but I don't want to be the only one pestering the IJ team for these fixes. They have plenty of other things to work on.

As I said I like to write a lot of comments; so I notice this more than most. I don't think I represent the norm here.