Parameter Hints do not recognize correct method [message #787529] |
Tue, 31 January 2012 12:24  |
Eclipse User |
|
|
|
void test(int i){}
void test(int i, boolean x){}
void invoke() {
test(3);
test(6,true);
}
When invoking Parameter Hints by pressing ctrl-shift-space inside the parameter list in either of the two invocations of the test() method, a popup choice appears offering both variants.
Is this on purpose?
Why is not the "correct" version chosen automatically?
Especially in longer parameter lists it is a bit hard to manually figure out the correct method.
Is it possible to get a visual hint, which method is matched by the actual code?
Regards,
David
(Using Indigo Service Release 1)
|
|
|
|
Re: Parameter Hints do not recognize correct method [message #787986 is a reply to message #787904] |
Wed, 01 February 2012 02:54  |
Eclipse User |
|
|
|
Deepak Azad wrote on Wed, 01 February 2012 06:05On 1/31/2012 10:54 PM, David Balažic wrote:
>
> void test(int i){}
> void test(int i, boolean x){}
>
> void invoke() {
> test(3);
> test(6,true);
> }
>
>
> When invoking Parameter Hints by pressing ctrl-shift-space inside the
> parameter list in either of the two invocations of the test() method, a
> popup choice appears offering both variants.
>
> Is this on purpose?
> Why is not the "correct" version chosen automatically?
Yes this is intentional, because you may want anyone of the overloaded
methods.
> Especially in longer parameter lists it is a bit hard to manually figure
> out the correct method.
>
> Is it possible to get a visual hint, which method is matched by the
> actual code?
You can place the caret on the method name in the method invocation and
press 'F2' to popup a hover containing the javadoc and the method signature.
Yes, but this does not have the feature of Parameter Hints to highlight the parameter which is under the cursor.
|
|
|
Powered by
FUDForum. Page generated in 0.03214 seconds