Community
Participate
Working Groups
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.
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).
>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
*** Bug 70631 has been marked as a duplicate of this bug. ***
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.
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.
It's too late to change the behavior and the change would not be small and trivial. Moving to 3.6 with high prio.
>- 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.
*** Bug 115589 has been marked as a duplicate of this bug. ***
Verified in I20100125-1800. See bug 70631 comment 2 for a possible improvement that would not need codeSelect.
Verified with I20100125-1800 for 3.6 M5.