| Summary: | Rename refactoring results in fully qualified names | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Ed Merks <Ed.Merks> |
| Component: | Core | Assignee: | Jan Koehnlein <jan> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jan, mkomor, moritz.eysholdt, sebastian.zarnekow, sven.efftinge, xtend-inbox |
| Version: | 2.2.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M7 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
*** Bug 365182 has been marked as a duplicate of this bug. *** A first shot commited to MASTER. Now writing more tests... Pushed tests to MASTER. Woohoo, nice! Requested via bug 522520. -M. |
This appears to be a general problem with Xtext's support for rename refactoring. I have the same problem in Xcore as I see in Xtend... Consider what happens when you have two Xtend files in two different packages. package com.example class Foo { } and package com.example.a import com.example.Foo class A extends Foo { } If you rename Foo to FooBar, you end with with A like this: package com.example.a import com.example.FooBar class A extends com.example.FooBar { } When I look at how this works in the underlying framework, the rewrites are collected for preview purposes before they are applied to the real resources or model instances. So when the reference to FooBar is serialized in A, there is no import for it yet, i.e., the old "import com.example.Foo" doesn't help to convince the serializer to produce FooBar rather than com.example.FooBar.