Structural Search and Replace imports

Ok, I will readily admit I'm a complete idiot, but I can't get Structural search/replace to replace a given import with a set of imports. I want to replace:

import com.mycompany.util.ClassA;

with

import com.mycompany.util.ClassA;
import com.mycompany.util.ClassB;
import com.mycompany.util.ClassC;

in all my source files. How in the (hell) do you do this? No matter what combination of variables (or not) I try, IDEA tells me it can't find 'import com.mycompany.util.ClassA;' in the files.

I've tried entering plain text in the search replace fields (exactly as above). I've also tried defining variables for the class names, and then trying different values in the "Edit Variables" panel. Nothing seems to work. :(

1 comment
Comment actions Permalink

Sorry, it does not work with imports yet.

Eric H. wrote:

Ok, I will readily admit I'm a complete idiot, but I can't get Structural search/replace to replace a given import with a set of imports. I want to replace:

import com.mycompany.util.ClassA;

with

import com.mycompany.util.ClassA;
import com.mycompany.util.ClassB;
import com.mycompany.util.ClassC;

in all my source files. How in the (hell) do you do this? No matter what combination of variables (or not) I try, IDEA tells me it can't find 'import com.mycompany.util.ClassA;' in the files.

I've tried entering plain text in the search replace fields (exactly as above). I've also tried defining variables for the class names, and then trying different values in the "Edit Variables" panel. Nothing seems to work. :(



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.