Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345598 - [xtend] Refactoring sometimes ignores package/imports
Summary: [xtend] Refactoring sometimes ignores package/imports
Status: CLOSED FIXED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 380087 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-12 09:31 EDT by Jan Koehnlein CLA
Modified: 2017-10-31 10:57 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Koehnlein CLA 2011-05-12 09:31:05 EDT
Given the following Xtend files
---
package test

class Foo {
  def Bar foo() {
    new Bar()
  }
}
---
and an Xtend or Java class Bar in the same package.

Renaming the constructor call from Bar() to Baz() results in an obsoletely qualified name test.Baz() in the constructor call.
If Bar is a Java class, even the return type is qualified by the refactoring.

Same behavior for imports: Constructor calls are always fully qualified by the refactoring, type references only when the referred class is a Java class.
Comment 1 Sven Efftinge CLA 2012-01-31 06:18:09 EST
See also Bug #370135
Comment 2 Jan Koehnlein CLA 2012-07-19 09:43:18 EDT
Finally fixed and pushed to MASTER as well as SR1.

I had to invalidate several caches in the JVM model, which could stand some improvement if more clients are going to rename things or apply changes. 

Also wrote a bunch of tests.
Comment 3 Jan Koehnlein CLA 2012-12-05 03:25:35 EST
*** Bug 380087 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Webmaster CLA 2017-10-31 10:46:36 EDT
Requested via bug 522520.

-M.
Comment 5 Eclipse Webmaster CLA 2017-10-31 10:57:51 EDT
Requested via bug 522520.

-M.