Community
Participate
Working Groups
Build ID: I20070625-1500 Steps To Reproduce: 1. Suppose you have: public class A { /** * @deprecated use {@link #b()} instead */ public void a(){} public void b(){} public void c() { a(); // (*) } } 2. as of now, the warning given on line marked as (*) is: The method a() from the type A is deprecated It would be VERY useful if the warning could include at least the contents of the @deprecation JavaDOC tag, so that the warning would become something like: The method a() from the type A is deprecated @deprecated use b() instead This would inform the developer on what is the reason of the deprecation or the way to avoid using that code. As of now, if you want to know how to fix the deprecation warning, pressing F2 is not enough: you must go to the declaration of the deprecated method, have a look to its JavaDOC, go back to your client code and fix it.
The warning is coming from JDT Core. Workaround: assign your custom modifier to the Javadoc hover on the Java > Editor > Hovers preference page (e.g. Ctrl). This allows to look at the hover.
It would still be very useful if the deprecated warning can pull the @deprecated note from the corresponding Javadoc and display it. Holding Ctrl-Shift to see the full javadoc doesn't always help, as the @deprecated note may be located in the class javadoc, but I may be looking at the method javadoc.
The JDT core team is currently busy with the Java 8 effort and unlikely to take this up any time soon. However, should there be a patch, we could look at it.