Bug 23300

Summary: Context sensitive Code Completion
Product: [Eclipse Project] JDT Reporter: Sam <scheung>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0.1   
Target Milestone: 2.1 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Sam CLA 2002-09-08 02:18:30 EDT
How about this also:

int a;

int i = aMethod(a <code complete>

only list out the choice of aMethod with the first parameter is an integer
(assume aMethod() is overload)

If aMethod() only takes an integer, code complete will print ");"

And if you have this:

int j = aMethod(a, <code complete>, 6) + 3;

It fills in only the possible parameters for aMethod() for the user.

Basically, the code complete engine not just look at the text from the
beginning of the line to the current cursor. It also looks at the text from
the cursor to the end of the line.

Thanks again.
Comment 1 Philipe Mulet CLA 2002-09-09 04:41:23 EDT
Looking on the right side is forbidden for completion behavior. When editing 
code, it would be highly counter-intuitive. 

We try to be smart when looking at things on the left though. In your first 
example, if you type a bonus comma behind the first argument, we will only 
propose methods accepting an 'int' as a first argument.

How about we investigate removing the need for the bonus comma instead ?
Comment 2 Philipe Mulet CLA 2002-10-02 06:19:27 EDT
Not sure we need to do anything on this.
Comment 3 Philipe Mulet CLA 2003-01-21 06:28:11 EST
Closing, won't change to look on the right of cursor (we are only completing 
the code on the left).