Bug 577040 - Cursor positioning in lambda completion
Summary: Cursor positioning in lambda completion
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.22   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.23 M3   Edit
Assignee: Gayan Perera CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-03 10:01 EDT by Lars Vogel CLA
Modified: 2021-11-08 01:44 EST (History)
3 users (show)

See Also:


Attachments

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