是否可以在Eclipse中显示方法参数的注释? [英] Is it possible to show the annotations of method parameters in Eclipse?

查看:451
本文介绍了是否可以在Eclipse中显示方法参数的注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用注释 @ javax.annotation.Nullable @ javax.annotation.Nonnull 来记录方法参数的行为.

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

是否可以在Eclipse的JavaDoc弹出窗口中显示此批注?我的意思是如果我将鼠标移到某个方法上,则会出现弹出窗口.当前,Eclipse仅显示方法self的注释,而不显示参数的注释.

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.

推荐答案

我正在使用Indigo SR1 [Java EE版本],它正是这样做的.

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.

如前所述,以上内容不适用于带注释的参数.

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

如果在将鼠标悬停在方法上之前按住 SHIFT ,它将显示不同参数的注释.

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

Eclipse的完整构建信息:

The full build information of Eclipse:

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

这篇关于是否可以在Eclipse中显示方法参数的注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆