Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Show Javadoc when hovering over deprecated method call
Show Javadoc when hovering over deprecated method call [message #1766316] Tue, 20 June 2017 08:12 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Hi,

I often browse code that is calling a deprecated method, which gives a compiler warning. When I hover over such a call, I get the "xxx is deprecated" warning hover. Quite often, the called method's javadoc has indications on which method to use instead, but I can only get there via F3, or with the Javadoc view, which I never use. I'd like to see the javadoc on hover over just as I see it for non-deprecated calls. Any ideas or tips? Maybe add support to 'cycle' through hovers?
Re: Show Javadoc when hovering over deprecated method call [message #1766321 is a reply to message #1766316] Tue, 20 June 2017 08:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7675
Registered: July 2009
Senior Member
Hi

Me too. If an editor has a default hover that clarifies a usage, it is a pain if a squiggle replaces the hover with something more important that the underlying hover is need to understand. Worse in the debugger perspective, an evaluated value may usurp the hover. It is a pain having to change perspectives just to get a better hover. While the developers may know a magic short cut to get a specific category of hover, users do not. The hover must indicate locally what Fx button to press to access more hover (e.g. F2 for focus). Behind the scenes, there should probably be a stack of potential hovers, from which the default and alternates are displayed lazily. Currently hover code seems hard coded to offer only the 'best' eagerly.

Regards

Ed Willink

Re: Show Javadoc when hovering over deprecated method call [message #1766410 is a reply to message #1766321] Wed, 21 June 2017 08:33 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
So to make this better, we should either be able to cycle (like with code assist proposal pages) or, hackish, merge all the hovers into one separated by horizontal lines. I have no clue about the technical difficulties of implementing either..
Re: Show Javadoc when hovering over deprecated method call [message #1767578 is a reply to message #1766410] Fri, 07 July 2017 08:55 Go to previous messageGo to next message
Noopur Gupta is currently offline Noopur GuptaFriend
Messages: 58
Registered: December 2012
Member
Press Ctrl+Shift and hover to see the Javadoc. You can configure the key binding in Preferences > Java > Editor > Hovers > Javadoc.
Re: Show Javadoc when hovering over deprecated method call [message #1767792 is a reply to message #1767578] Tue, 11 July 2017 07:40 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Oh, you have to send this to #eclipestips
Thank you!
Re: Show Javadoc when hovering over deprecated method call [message #1767871 is a reply to message #1767792] Tue, 11 July 2017 19:24 Go to previous messageGo to next message
Noopur Gupta is currently offline Noopur GuptaFriend
Messages: 58
Registered: December 2012
Member
I have already tweeted this: https://twitter.com/EclipseJavaIDE/status/860476307838193664 :)
Re: Show Javadoc when hovering over deprecated method call [message #1769312 is a reply to message #1767871] Sat, 29 July 2017 09:03 Go to previous message
Kaminska Zakrzewska is currently offline Kaminska ZakrzewskaFriend
Messages: 1
Registered: July 2017
Junior Member
Would I have to use @Override as well to ensure that the base class function is not used?
Previous Topic:Causing a break into the debugger
Next Topic:How to change this color in eclipse?
Goto Forum:
  


Current Time: Sun Oct 06 23:03:55 GMT 2024

Powered by FUDForum. Page generated in 0.04381 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top