Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 485542 - Show currently used method signature
Summary: Show currently used method signature
Status: CLOSED DUPLICATE of bug 529011
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.12 M1   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2016-01-11 07:47 EST by Marvin Fröhlich CLA
Modified: 2019-12-01 16:59 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2016-01-11 07:47:39 EST
Preconditions:
There is an overloaded method with many arguments per signature.
There is a call to one of them.

Now I want to check, if the call is correct and therefore show method signature highlighting. I hit CTRL+Space and a list of method signatures shows up.

It is hard to know, which method signature is currently being used, if they're similar. Of course I can place the caret at one of the later parameters and hit CTRL-Space. But if the signatures differ in the last parameter only or my call is incorrect and it doesn't perfectly match, this is difficult.

It would be nice, if there was a way to show method signature highlighting (CTRL+Space -> Choose -> Hit Enter), that is currently selected by the compiler by just hitting a hotkey.
Comment 1 Stephan Herrmann CLA 2016-01-11 19:02:01 EST
I'm not sure I understand your situation: the full method call with all arguments already exists? In that case, I wouldn't think of Ctrl-space, as you don't want to insert new text.

What do you mean by "my call is incorrect"? Are you speaking of a compile error, or of an invocation of a different method than you intended?

Doesn't the javadoc hover serve your purpose?

Or is this about visually associating formal parameter names with arguments, like it is done during completion, after selecting a method and while editing the arguments of the call in "linked mode"?
Comment 2 Dani Megert CLA 2016-01-12 03:25:44 EST
(In reply to Stephan Herrmann from comment #1)
> I'm not sure I understand your situation:

Same here.
Comment 3 Marvin Fröhlich CLA 2016-01-12 09:24:37 EST
Yes, the full method call already exists.

Yes, it is about linked mode. And yes, I want to visually associate my arguments. Hence javadoc hover doesn't do the trick.

By that "incorrect call" thing I was talking about an existing method call, that got compiler wisely incorrect for some reason. Let's say, I inserted a parameter somewhere in the original method. If the IDE is still able to guess a method signature selection, then it can help me with linked mode to check and fix my arguments.
Comment 4 Marvin Fröhlich CLA 2016-03-15 10:19:58 EDT
Will this be addressed?
Comment 5 Markus Keller CLA 2016-03-17 11:36:55 EDT
You're looking for Show Parameter Hints (Ctrl+Shift+Space), but that one is still broken for overloaded methods, see bug 70631.

*** This bug has been marked as a duplicate of bug 70631 ***
Comment 6 Marvin Fröhlich CLA 2016-03-18 05:37:23 EDT
Sorry, no, this is not, what I am looking for. Unfortunately I cannot screenshot this.

Let's say, you have a syntactically correct method call. If you place the caret before the first argument, hit CTRL+Space(, select the desired overloaded method variant) and hit Enter, then you get into a mode, where the argument (with type) with the caret on it is highlighted. I want to get into this mode. I think, this is not exactly linked mode, but something similar.

If you're browsing a read-only class (binary view), you cannot start this mode, because eclipse assumes, you want to start editing, which might not be true.

If the method call is wrong and cannot be compiled for what ever reason, eclipse still tries to do a best match and could still allow to start this mode for debugging reasons.

I hope, this explains better, what I am looking for. Please remove the "duplicate of" for 70631. This is not true.
Comment 7 Eclipse Genie CLA 2019-12-01 16:27:17 EST
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.

--
The automated Eclipse Genie.
Comment 8 Stephan Herrmann CLA 2019-12-01 16:59:47 EST
As of today, I believe bug 529011 is the most suitable answer to this.

*** This bug has been marked as a duplicate of bug 529011 ***