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

查看:43
本文介绍了是否可以在 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天全站免登陆