-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix move refactor to recognize super class name collision (#1704)
- fix MoveInstanceMethodProcessor to recognize when a member being moved has same name as a member of a super class of the target and change existing references to use super qualifier - add new test to MoveInstanceMethodTests - fixes #1676
- Loading branch information
Showing
4 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test80/in/A.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package p1; | ||
|
||
class A { | ||
B b; | ||
|
||
void method() { | ||
System.out.println("A class method"); | ||
} | ||
} | ||
|
||
class ParentClass { | ||
void method() { | ||
System.out.println("ParentClass method"); | ||
} | ||
} | ||
|
||
class B extends ParentClass { | ||
void test() { | ||
method(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test80/out/A.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package p1; | ||
|
||
class A { | ||
B b; | ||
} | ||
|
||
class ParentClass { | ||
void method() { | ||
System.out.println("ParentClass method"); | ||
} | ||
} | ||
|
||
class B extends ParentClass { | ||
void test() { | ||
super.method(); | ||
} | ||
|
||
void method() { | ||
System.out.println("A class method"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters