Skip to content

Code assist completion with "{" and method with Closure as last argument #410

@mauromol

Description

@mauromol

Ensure the option Window | Preferences | Groovy | Editor | Content Assist | Use closure literals for closure arguments is UNCHECKED.

Try the following:

package test17
class Test17 {
	void foo() {
		new Object().wit|
	}
}

Invoke code assist at "|", ensure with(Closure) is highlighted and hit "{".
Result: new Object().with({closure) (with strange selection: {closur).
Expected result:

new Object().with {
  |
}

or at least: new Object().with { | }
(with cursor at "|").

If Window | Preferences | Groovy | Editor | Content Assist | Use closure literals for closure arguments is CHECKED, the result is different, but still arguable:

new Object().with({{ it }) (with selection: i). Please note the double "{" and the strange selection.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions