jedediah jedediah - 1 year ago 129
Java Question

Replace superclass using IDEA SSR

I want to search for all classes extending

and make them extend
instead. The IDEA manual says this should work:

Search template

class $Class$ extends Foo {

Replace template

class $Class$ extends Bar {

is configured to match zero to infinity times.

The search part works fine, but the replacement always has an empty class body. I tried setting
's minimum count to 1 and that still matches all the right classes, but the class body is still empty.

Answer Source

It should be

Search Template

class $Class$ extends Foo {}

Replace Template

class $Class$ extends Bar {}

No need to add $Stuff$.

You can find the examples documentation here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download