What are the ways in Intellij IDEA to automate repeated editing operations?
For example I have a file with few dozens of entries like the following:
public static final Test1 = new Test(A a1, B b);
public static final Test2 = new Test(A a2, B b);
public static final Test3 = new Test(A a3, B b);
public static final Test4 = new Test(A a4, B b);
I would like to replace all B b in a file, and pass a null parameter instead. It is easy to do in editors like gvim where normally you would record a macro and repeat it. What are the usual ways to do such automation where refactoring capabilities of Intellij are limited?
If you can identify a pattern you can always copy the text over to textpad or something similar and do a regex replace then copy the text back. I do it very often.
For your particular example, try this in textpad –