I recently ran into a reasonably powerful use case for structural
replace. I needed to implement a jdbc result set that would be wrapper
for our vendor's jdbc resultset -- but I would intercept the query on
the execute call. And since resultset has soooo many methods in it, I
decided to try to use structural replace in the following way:
1) create a class that implements resultSet.
1.5) let IDEA generate all the methods
2) add a private resultSet member to the class
3) now using structural replace, modify each void empty method to call
the private resultSet method.
4) and likewise fix the setters/getters
5) And finally modify the methods that needed modification
BUT, I couldn't get it to work. It seemed to find all the methods and I
was able to get a replacement template. I gave it the OK to perform the
replacement it seemed to do the replacement but the file did not
actually change. I gave up after some amount of playing with it, and I
don't know what I was doing wrong (or was it a bug)?
Can someone enlighten me?
thanks for reading,