I have a scenario where a file contains string literals which I would like to replace with Constants defined in another file.
String ABC = "abc";
String XYZ = "xyz";
I would like to invoke action which would replace all the string literals defined in X.java
with corresponding constants defined in Constants.java. Basically the action should take two inputs
1. the file on which it works (the file in which literals changed)
2. the file in which to search for Constant corresponding to a literal
Please let me know if any one knows of existing plugging or any way of achieving it easily