开发者

Java Annotations in eclipse Tooltip?

Is anyone aware of an eclipse plugin that updates the tooltip on hover over a method/class to include annotation information?

There a few libraries we are using that have annotated methods and it would be handy if I could hover over the method and see what has been applied. I realize this would only work with annotations that have bee开发者_JS百科n retained but that is good enough.


I ma not aware of any current plugin, but the upcoming Eclipse Helios will include a similar feature:
Since Eclipse 3.6 M7 - New and Noteworthy (April 30, 2010):

Javadoc hovers include annotation

Javadoc hovers now include annotations:

Java Annotations in eclipse Tooltip?

Javadoc hovers render {@value}

Javadoc hovers now render {@value} inlined:

Java Annotations in eclipse Tooltip?


My eMoose tool does something similar with specific tags that are embedded in the JavaDoc of a method or in comments of the method, as a way of drawing attention to these details.

I was going to add similar support with annotations but was told that this feature was coming at some point in the next Eclipse.

If you can't make the transition to the next Eclipse version milestones, I'd be happy to share my source code so you can easily build a plugin with that feature.


In the latest Eclipse versions, this is supported out of the box for objects without Javadocs if you set "Enable annotation-based null analysis" to true in your Compiler Error/Warnings settings. This applies to all annotations:

Java Annotations in eclipse Tooltip?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜