Structural Search and Replace for method

Im trying to write a SSR for an entire method - ideally we would have liked to have deleted the method from the interface, and have this cascade down, but this doesnt seem to work (should it?)

Anyway, we think that SSR should be able to do this, and the doc that Maxim wrote mentions this very useful feature, but alas, there's no example.

So, how do I match a method in a class that implements some interface 'bar'

public class foo implements bar {

public X someFunc() {
return blah;
}

}

We want to find method 'someFunc' and replace it with nothing.

So far, we have run a search to find instances of 'someFunc' within the hierarchy, but we cant seem to expand this to match the entire method.
We have:
class $Class$ implements $interface$ {
public X $methodName$() ;
}

We set $interface$ and $methodName$ to the relevant text, but we need to match the entire method.


Any tips or guidance much appreciated.

Nick

Please sign in to leave a comment.