This question is a follow-up for this.
Say I have some class Foo.
class Foo {
protected String x = "x";
public String getX() {
r
After adding the getFooX()
method to Bar
, I would use Edit > Find > Replace Structurally with the following expressions:
Search template:
$instance$.getFoo().getX()
Replacement template:
$instance$.getFooX()
It does the job perfectly. Maybe you can add some constraints to $instance$
variable to narrow the search but that would only be useful if you had multiple classess with that method name.