Bug 23300 - Context sensitive Code Completion
Summary: Context sensitive Code Completion
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 M5   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-08 02:18 EDT by Sam CLA
Modified: 2003-01-21 06:28 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).