Bug 78599 - [hovering] ToolTip showing name of parameter under mouse
Summary: [hovering] ToolTip showing name of parameter under mouse
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-15 05:30 EST by F. Schelling CLA
Modified: 2019-09-06 15:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description F. Schelling CLA 2004-11-15 05:30:47 EST
Problem:
While reading code and looking at method calls, one often has to figure out
which argument belongs to which parameter. This is quite tedious and error-prone
with methods having 3 or more parameters, especially if the arguments itself are
non-trivial or somewhat longer expressions, possibly containing method calls
themselves.

Solution:
When the mouse hovers over a method argument, display the name and the type of
the corresponding parameter in a tooltip. Also, a visual "bracketing" (a box
surrounding the agrument) could help to discriminate quickly which part of the
code belongs to the argument (makes most sense with long arguments.)
If the argument contains method calls itself, then display the parameter info of
that method if the mouse is over one of that methods arguments.

The exact region on the screen where this new tooltip should activate extends
from the left to the right parenthesis of the method call (height is one line of
text.)
Comment 1 Dani Megert CLA 2004-11-15 05:44:41 EST
simply hover over the method which you call.
Comment 2 F. Schelling CLA 2004-11-15 07:01:18 EST
The existing functionality is not what I meant. What I meant is that the
described tooltip should help you in identifying single, specific arguments
while reading a long argument list and making sure that every argument is
sitting in the right place within the argument list (very important for methods
with many parameters of the same type.)

Imagine the following situation:
There is a method with, let's say, six parameters, and let's say that you even
know all the parameters by heart because you use that method very often.

Now image that you have to read code with a lot of calls to that method. Every
call contains those six arguments, but the call is not as simple as "foo(a, b,
c, d, e, f)" but instead every single argument is at least 10 or 20 characters
long or some even more. Some of the arguments even include other method calls,
so just quickly counting the commas does not work well when you e.g. want to
know what is passed as argument number 4.

With the enhancement proposed, you just would place the mouse pointer over a
specific part of the call and instantly see that exactly the part "...,
foo(foo2(2, 4) + 3 * foo3(4, 6)), ..." will be passed as argument "int xyz",
since (1) the argument is bracketed by a box (much the same appearance like when
typing in string constants) and (2) you see the name and type of the parameter
the argument is passed to, so you can be sure that the argument sits in the
right place within the argument list.
Comment 3 Dani Megert CLA 2004-11-15 08:45:42 EST
Try Ctrl+Shift+Space.

There are currently no plans to provide such a tool tip. Note that there's an
extension point which allows you to contribute this yourself, see:
org.eclipse.jdt.ui.javaEditorTextHovers
Comment 4 Dani Megert CLA 2007-06-22 09:59:22 EDT
Get rid of deprecated state.
Comment 5 Eclipse Webmaster CLA 2019-09-06 15:32:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.