Bad line breaking in Eclipse javadoc comments

五迷三道 提交于 2019-12-05 12:57:45

Well there is a less than fun work around for this. To work around it try enabling Off/On Tags in the Eclipse formatter.

Window -> Preferences -> Java -> Formatter -> Edit -> Off/On Tags -> Enable Off/On tags

Then you need to surround your comment with these tags so the formatter does not touch it (Note that the tags need to be in separate comment blocks else Eclipse will ignore them). In example:

//@formatter:off
/**
 * Oddly formatted comment.              MUHAHAHAHAH :)
 **/
//@formatter:on

Presto... formatter won't touch it. Tested on Juno on Fedora 17. Hope that helps.

Well, it is now a new Eclipse bug. It will evidently still be present in the initial Indigo release.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!