Hi,
We need to extend a previously defined object ObjectA which has a number of methods for which we have implemented the generated empty body. When adding new methods and generating the code for this it will also overwrite the existing ones. What are possible strategies to integrate this into a development process? I can imagine generating the new code on a temp location and doing a manual merge using some supporting tool like Kdiff3. Are there other, better, approaches in use?
Regards.
Yves
Overwriting generated code.
Moderator: uamodeler
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Overwriting generated code.
UaModeler has four modes for overwriting files. Please see documentation.
"Overwrite all" is the default setting. In this mode all files are overwritten but the files that are expected to add own code. Especially the method implmentation files are not overwritten, so the own code does not get lost.
But if you are adding new methods the new method stubs will not be generated. In this case you have to create the methods by your own. The best practice depends on the selected SDK and own preferences. You might copy the stubs from generated header files, use diff tools kdiff or use ide features to add methods that are defined by an interface.
"Overwrite all" is the default setting. In this mode all files are overwritten but the files that are expected to add own code. Especially the method implmentation files are not overwritten, so the own code does not get lost.
But if you are adding new methods the new method stubs will not be generated. In this case you have to create the methods by your own. The best practice depends on the selected SDK and own preferences. You might copy the stubs from generated header files, use diff tools kdiff or use ide features to add methods that are defined by an interface.
Best regards
Unified Automation Support Team
Unified Automation Support Team