Skip to content

Property reference in with { } closure not renamed #1091

@mauromol

Description

@mauromol

Consider this:

package test62

class GBean {
	String fooBar
	String bar
}

and this:

package test62
class Test62 {
	void doSomething() {
		def g = new GBean()
		g.with { 
			fooBar = 'foo'
			bar = 'bar'
		}
	}
}

Now go to GBean, highlight GBean.fooBar, hit Alt+Shift+R and rename fooBar to foo: the reference in Test62.doSomething() is not renamed.
The strange thing is that if you do the opposite (source is foo, rename to fooBar), it works correctly.

Another strange behaviour (but I think it's for the same reason): if you issue Alt+Shift+R from Test62 instead of GBean and you try to rename fooBar to foo, after the operation is finished the editor replaces foo with fooBar.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions