Bug 370678 - Propose method arguments on empty prefix
Summary: Propose method arguments on empty prefix
Status: CLOSED DUPLICATE of bug 25313
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 01:43 EST by Marcel Bruch CLA
Modified: 2012-02-06 04:48 EST (History)
3 users (show)

See Also:


Attachments
Screenshot showing completion on method arguments with emtpy prefix (34.13 KB, image/png)
2012-02-06 01:43 EST, Marcel Bruch CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Bruch CLA 2012-02-06 01:43:28 EST
Created attachment 210550 [details]
Screenshot showing completion on method arguments with emtpy prefix

When triggering code completion in method bodies w/o prefix, it proposes all locals, methods and fields visible at the current completion position:


void m(){
|<^Space> --> all visible locals, fields, methods are proposed



When triggering code completion on method arguments as in 

void m(){
  x.call(|<^Space)
}

it only shows the signature of the method you have chosen , and in the case x.call is an overloaded method all its variants, but not any visible local, field, or method. They are proposed only after the first character is typed:

String field;

void m(){
  x.call(f|<^Space) --> may propose "field"
}


From my observation, this behavior is confusing and additionally requires me to remember which variable or method I want to invoke from the early beginning. With this behavior code completion looses its function as a explorer for "what can I can do here?".

Since completions with empty prefixes are supported in other positions I wonder if  there is any reason why proposing variables and methods in method arguments shouldn't be proposed too with empty prefixes (probably below the list of methods I'm potentially going to use).


If there is no reason, I'd like to propose this as change for 3.8/4.2.
Comment 1 Johannes Lerch CLA 2012-02-06 04:31:49 EST
+1
Comment 2 Dani Megert CLA 2012-02-06 04:48:31 EST
> If there is no reason, I'd like to propose this as change for 3.8/4.2.

Patch is welcome.

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