Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339221 - [content assist] ',' does not jump to the next argument
Summary: [content assist] ',' does not jump to the next argument
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 08:30 EST by Deepak Azad CLA
Modified: 2011-03-16 09:38 EDT (History)
1 user (show)

See Also:


Attachments
Fix 2 (4.77 KB, patch)
2011-03-16 09:38 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Azad CLA 2011-03-08 08:30:48 EST
--------------------------------
void bar(int a, int b) {

}

void foo() {
	bar<ctrl+space><,>	
}
------------------------------

In the above snippet ',' does not jump to the next argument. However if I define 'a' and 'b' in foo then ',' jumps to the next argument.

Don't know if it matters but I had 'Fill method arguments' preference enabled and 'Insert parameter names' selected.
Comment 1 Markus Keller CLA 2011-03-08 09:06:02 EST
>     bar<ctrl+space><,>    
Keys are: Ctrl+Space, Enter, ','

> Don't know if it matters but I had 'Fill method arguments' preference enabled
> and 'Insert parameter names' selected.
Yes, that makes the difference.

Fixed in HEAD of ParameterGuesser.


Filed bug 339224 for cases where no proposal popup is shown.
Comment 2 Markus Keller CLA 2011-03-16 09:38:52 EDT
Created attachment 191300 [details]
Fix 2

The initial fix was not handy in case the user decides to add more arguments to the method invocation:

public class Try {
    String foo(String str, int end) {
        // content assist, Enter, press Left, type "0, ":
        return str.subs
    }
    
    void bar(int x, int y, int[] xs, int[] ys) {
        // content assist, Tab, type "x, ":
        takeInts
    }
    
    void takeInts(int a, int... more) {
        
    }
}

The patch fixes this by not using ',' as trigger character in the last argument. Fixed in HEAD.