Bug 137184 - Smart code completion with parameters
Summary: Smart code completion with parameters
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2006-04-18 07:32 EDT by Kristian Hansen CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Hansen CLA 2006-04-18 07:32:03 EDT
When I code complete a method and the relevant parameters are at the right hand side of the cursor, the editor should use these as parameters instead of trying to guess the correct parameters.

Example:

Given the following:

Object[] toArray(List list) { ... }
void addArray(Object[] array) { ... }
List myList;

The following sequence (where | marks the cursor) should work:

Begin point:
addArray(|myList);  

Start entering method name:
addArray(toArr|myList);

Press ctrl+space for code complete
addArray(toArray(myList));

Instead, the editor inserts its best guess at the parameter, and gives a result like this

addArray(toArray(myList)myList);
Comment 1 Dani Megert CLA 2006-04-18 10:31:58 EDT
What if 'myList' would be some totally different type?
You can use 'Completion Overwrites' in your example.
Comment 2 Dani Megert CLA 2007-06-22 09:59:48 EDT
Get rid of deprecated state.
Comment 3 Dani Megert CLA 2007-06-22 10:04:57 EDT
.