Let's say I have a "magic string" in four classes and I want it to be replaced in all places by one constant from some constants class. (I'm speaking about Java/Groovy classes but any other languages would be helpful too.) The best solution I can think of is to extract the constant in one class and then use the Replace in Path dialog for the others. But that doesn't solve imports of the constants class and it's quite a lot of work. Is there a better way?
I've found this documentation page but there is no mention of this functionality.
Constants
classes are usually deemed very poor design, so perhaps you want to rethink your approach. – ElectionConstant
classes are considered poor design? – Lander