Skip to content

Camel-case code assist not working for property name completion in map-style constructor invocation #358

@mauromol

Description

@mauromol

Issue #331 added code assist for property name completion in map-style constructor invocation when the user starts to type the name of a property. However, the current implementation seems to correctly suggest results with a prefix-only guess, not with camel-case (which in Eclipse is usually found elsewhere in code assist, Groovy included).

Consider the slightly modified example:

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

And:

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

When you invoke code assist at "|", no suggestion is shown.
Please note that:

  • if you do the same after b instance has been created, to directly reference b.thisIsAPropertyWithALongName, camel-case completion works there (i.e.: b.tIAP| <= invoke code assist here)
  • the case in which the property is defined by a setter only (like for MyBean.bar property) should also be covered

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