Bug 58719 - [content assist] Context information: show parameters should show parameters for all overloaded methods
Summary: [content assist] Context information: show parameters should show parameters ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 normal with 2 votes (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 115589 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-15 15:05 EDT by Guillaume Pothier CLA
Modified: 2010-01-26 08:53 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Pothier CLA 2004-04-15 15:05:53 EDT
In the java editor, when the cursor is within the arguments list of a method
call, pressing ctrl+shift+space brings a small popup showing the parameters that
are required by the method.
However, in the case of an overloaded method, the behaviour is cumbersome: it
first asks for the version of the method, and then displays the small popup. If
I press escape to close the popup and press ctrl+shift+space again, the popup
appears directly without asking for the version of the method, impeding me from
choosing another version.
It would be much more practical if parameters of all overloaded versions
appeared directly and systematically in the popup.
Comment 1 Guillaume Pothier CLA 2004-06-12 00:51:02 EDT
I would add that the list that is popped up when there are various methods is
too small: I usually have to scroll to the right to see all the arguments.
I think this list should try to fit to the size of its content (up to a certain
limit of course).
Comment 2 Dani Megert CLA 2004-07-23 05:54:06 EDT
>It would be much more practical if parameters of all overloaded versions
>appeared directly and systematically in the popup.
The idea is that after selecting it helps you typing the params. That's why the
hint is then shown above the method.

>If I press escape to close the popup and press ctrl+shift+space again, the popup
>appears directly without asking for the version of the method, impeding me from
>choosing another version.
Content assist remembers your choice for a while. This is also done when you
first  select the method using Ctrl+Space: it will not ask later when you press
Ctrl+Shift+Space

See also comment in bug 70631
Comment 3 Dani Megert CLA 2004-07-23 05:54:42 EDT
*** Bug 70631 has been marked as a duplicate of this bug. ***
Comment 4 Markus Keller CLA 2005-08-30 11:40:20 EDT
As it is today, the Parameter Hints action is not a big help if you deal with
overloaded methods with several parameters (which is exactly my main use case
for this action).

As mentioned in bug 70631, the popup should come up with the matching method
selected (first try to match by parameter count, then by parameter types).

Almost always when I invoke the action again on the same method invocation, I do
it because I realized that my first guess was wrong -> I have to do tricks to
see the popup menu again.
Comment 5 Markus Keller CLA 2007-07-05 13:45:15 EDT
I still have not found a use case for the current behavior. To clarify my request from bug 70631 (which does not really match this bug's summary):

Show Parameter Hints should ...
- pre-select the best-matching version in the proposal list
- never "remember" my last selection. The only exception could be the first invocation after I have inserted a content assist proposal.
Comment 6 Dani Megert CLA 2009-05-19 08:56:55 EDT
It's too late to change the behavior and the change would not be small and trivial.

Moving to 3.6 with high prio.
Comment 7 Dani Megert CLA 2010-01-22 09:53:30 EST
>- pre-select the best-matching version in the proposal list
This is currently not possible since we don't know which method it is and we don't want to call codeSelect since this needs a reconcile to be correct or feature work in JDT Core's completion engine. Nothing I plan to do for now. Instead I select the last shown context info.

Fixed in HEAD.
Available in builds > I20100122-0800.
Comment 8 Dani Megert CLA 2010-01-22 10:03:47 EST
*** Bug 115589 has been marked as a duplicate of this bug. ***
Comment 9 Markus Keller CLA 2010-01-26 06:36:07 EST
Verified in I20100125-1800. See bug 70631 comment 2 for a possible improvement that would not need codeSelect.
Comment 10 Deepak Azad CLA 2010-01-26 08:53:26 EST
Verified with I20100125-1800 for 3.6 M5.