Community
Participate
Working Groups
I20110307-2110, follow-up to bug 339221 and bug 337156 void bar(int a, int b) { } void foo() { bar } - have 'Fill method arguments' preference enabled and 'Insert best guessed arguments' selected - use content assist to complete bar => gives "bar(0, 0)" with 2 linked positions but no proposals - type ',' => expected: should jump to second linked position => was: inserts ',' The problem is that ParameterGuesser#parameterProposals(*) only adds ',' as trigger character when there are actual proposals. We need a new mechanism to configure jumping to the next position when no proposals list is up. See caller hierarchy of LinkedModeUI#next(). I guess the best solution is to add a "char[] fTriggerChars" to LinkedModeUI and let clients set trigger chars that are handled in LinkedModeUI.KeyListener#verifyKey(*) by invoking next() if the char is a trigger char.
Markus, this needs to be fixed for M6 or deferred to the next release.
Bug 339221 comment 2 shows that a static set of trigger characters is not enough, so there cannot be a generic solution with a "char[] fTriggerChars". A way to fix this bug could be a new IExitPolicy result that would trigger a call to LinkedModeUI#next(). But there's an easier way without new API: ParameterGuessingProposal's ExitPolicy can just transform the ',' into a '\t' when we want the special behavior.
Created attachment 212603 [details] fix
(In reply to comment #2) > Bug 339221 comment 2 shows that a static set of trigger characters is not > enough, so there cannot be a generic solution with a "char[] fTriggerChars". > > A way to fix this bug could be a new IExitPolicy result that would trigger a > call to LinkedModeUI#next(). But there's an easier way without new API: > ParameterGuessingProposal's ExitPolicy can just transform the ',' into a '\t' > when we want the special behavior. Looks good to me.
http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=576c9c7d95fcfc0e98813404318c19e59fc96606