Is it possible to show the annotations of method parameters in Eclipse?

感情迁移 提交于 2020-05-31 07:20:13

问题


We use the annotations @javax.annotation.Nullable and @javax.annotation.Nonnull to document the behavior of method parameters.

Is it possible to show this annotations in the JavaDoc popup in Eclipse? I means the popup that occur if I move with the mouse over a method. Currently Eclipse show only the annotations of the method self but not of the parameter.


回答1:


I'm using Indigo SR1 [Java EE version], and it does exactly this.

I didn't configure it specifically, so I think its something that was added.

Screenshot

As pointed out, the above is not for annotated parameters.

If you hold down SHIFT before hovering over the method, it will show the annotations for the different parameters.

The full build information of Eclipse:

Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 1
Build id: 20110916-0149


来源:https://stackoverflow.com/questions/8534033/is-it-possible-to-show-the-annotations-of-method-parameters-in-eclipse

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