-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for #1014: preview for potential matches during rename refactor
- Loading branch information
1 parent
f205fad
commit a15850d
Showing
22 changed files
with
461 additions
and
227 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
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
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
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
13 changes: 7 additions & 6 deletions
13
...est/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameField/test14/in/A.groovy
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
package p; | ||
import groovy.transform.CompileStatic | ||
package p | ||
|
||
class MyBean { | ||
Class foo | ||
|
||
public String setBar(Class bar) { | ||
foo = bar | ||
} | ||
} | ||
|
||
@CompileStatic | ||
@groovy.transform.CompileStatic | ||
class A { | ||
def f = new MyBean() | ||
def one = new MyBean() | ||
|
||
void main() { | ||
MyBean b2 = new MyBean(foo: (new MyBean()).foo) | ||
def two = new MyBean(foo: (new MyBean()).foo) | ||
} | ||
} | ||
} |
17 changes: 9 additions & 8 deletions
17
...st/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameField/test14/out/A.groovy
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
package p; | ||
import groovy.transform.CompileStatic | ||
package p | ||
|
||
class MyBean { | ||
Class baz | ||
Class fooBar | ||
|
||
public String setBar(Class bar) { | ||
baz = bar | ||
fooBar = bar | ||
} | ||
} | ||
|
||
@CompileStatic | ||
@groovy.transform.CompileStatic | ||
class A { | ||
def f = new MyBean() | ||
def one = new MyBean() | ||
|
||
void main() { | ||
MyBean b2 = new MyBean(baz: (new MyBean()).baz) | ||
def two = new MyBean(fooBar: (new MyBean()).fooBar) | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...est/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameField/test15/in/A.groovy
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,14 @@ | ||
package p | ||
|
||
class MyBean { | ||
Integer foo = 0 | ||
|
||
Integer getFoo() { | ||
return foo | ||
} | ||
} | ||
|
||
void meth(MyBean bean) { | ||
bean.foo += 1 | ||
bean.with { foo += 1 } | ||
} |
14 changes: 14 additions & 0 deletions
14
...st/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameField/test15/out/A.groovy
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,14 @@ | ||
package p | ||
|
||
class MyBean { | ||
Integer fooBar = 0 | ||
|
||
Integer getFoo() { | ||
return fooBar | ||
} | ||
} | ||
|
||
void meth(MyBean bean) { | ||
bean.fooBar += 1 | ||
bean.with { fooBar += 1 } | ||
} |
15 changes: 15 additions & 0 deletions
15
...st/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test11/in/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
void setFoo(Integer foo) { | ||
this.foo = foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.foo += 1 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...t/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test11/out/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
void setFooBar(Integer foo) { | ||
this.foo = foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.fooBar += 1 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...st/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test12/in/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
void setFoo(Integer foo) { | ||
this.foo = foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.with { foo += 1 } | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...t/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test12/out/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
void setFooBar(Integer foo) { | ||
this.foo = foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.with { fooBar += 1 } | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...st/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test13/in/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
Integer getFoo() { | ||
return foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.foo += 1 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...t/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test13/out/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
Integer getFooBar() { | ||
return foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.foo += 1 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...st/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test14/in/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
Integer getFoo() { | ||
return foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.with { foo += 1 } | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...t/org.codehaus.groovy.eclipse.refactoring.test/resources/RenameMethod/test14/out/A.groovy
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,15 @@ | ||
package p; | ||
|
||
class A { | ||
Integer foo | ||
|
||
Integer getFooBar() { | ||
return foo | ||
} | ||
} | ||
|
||
class B { | ||
void m(A a) { | ||
a.with { foo += 1 } | ||
} | ||
} |
Oops, something went wrong.