If I make major changes to a unit I like to change its name to make it clear this is a different version and avoid confusion with other archived versions for example: CSVUtils.PAS becomes CsvUtilsNew.PAS
But all references to it from other units have to be changed manually, eg:
Unit ManiForm
Uses
CSVUtils
becomes
Unit ManiForm
Uses
CsvUtilsNew
This gets very laborious in complex projects.
Icarus is very good at finding all the references, but I cant find any tool that would automatically update all the other units.
Does anyone know of any tools which automatically update unit references?
Many thanks
I would use GExperts Grep Search and Replace.
I would use Notepad++ or UltraEdit to Search&Replace in all files (*.pas, *.dpr, *.dproj) the old unit name with the new unit name. Unless you have variables or functions that have the same name as the unit, this works very well, is fast and does not require any specialized parser.
You could also define a unit alias in your project options.
E.g. CSVUtils=CsvUtilsNew
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With