Skip to content

Missing property suggestion in map-style constructor invocation code assist when such property is defined just by its setter #330

@mauromol

Description

@mauromol

This is a regression I discovered while re-testing the old GRECLIPSE-1772.

Consider the following:

package c
class MyBean {
	String foo
	void setBar(String bar) {
		foo = bar.toUpperCase()
	}
}

And:

package c
class ConstructorTest {
	static main(args) {
		MyBean b = new MyBean(|)
	}
}

Invoke code assist at "|": the property MyBean.bar is not suggested as a possible map-style constructor argument, only MyBean.foo is.

Also, I personally think that the code assist should not automatically add the trailing ",", I would find more comfortable to decide myself if I really need a comma (to enter another key-value pair).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions