Bug 577040

Summary: Cursor positioning in lambda completion
Product: [Eclipse Project] JDT Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Gayan Perera <gayanper>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gayanper, Lars.Vogel, noopur_gupta
Version: 4.22   
Target Milestone: 4.23 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187285
https://bugs.eclipse.org/bugs/show_bug.cgi?id=577054
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=005b8c51ea6aa87095ba6d8097bf177cbf3030ab
Whiteboard:

Description Lars Vogel CLA 2021-11-03 10:01:21 EDT
AFAICS the cursor position for the new lambda expression could be improve or tab could be supported to jump to the code block.

Example:

@Test
void numberFieldsetWrongValueType() {
	String testString = "testString";
	assertThrows(IllegalArgumentException.class, CODE_COMPLETION_HERE)
}

I get:

@Test
void numberFieldsetWrongValueType() {
	String testString = "testString";
	assertThrows(IllegalArgumentException.class, CURSOR_HERE()->);
}

IMHO it would be better if the cursor could be after the -> or if I could jump to this position with tab.
Comment 1 Lars Vogel CLA 2021-11-03 10:01:42 EDT
Gayan, WDYT?
Comment 2 Gayan Perera CLA 2021-11-03 14:48:22 EDT
(In reply to Lars Vogel from comment #1)
> Gayan, WDYT?

I can have a look at it tomorrow.
Comment 3 Eclipse Genie CLA 2021-11-03 16:08:36 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187285
Comment 5 Noopur Gupta CLA 2021-11-08 01:44:28 EST
Thanks, Gayan.