Those annoying marker comments in generated code
|Status:||New||Start date:||25 May 2012|
In round-trip mode, some markers are generated in the Java code by Modelio Java Designer module, probably to help figuring out how to better reverse the code later.
Those markers are an annoyance for developers, and there is no guarantee there will be still there after a developer or two make a change in the code. I can’t believe they are actually required, there must be a way to recognize the code structure at reverse time to match the diagrams and model.
Would it be possible to make the reverse function smarter and get rid of those markers?
#1 Updated by Christophe Malgouyres over 7 years ago
First of all, you should now it is possible to generate in “release mode”, which removes all modelio-related markers from the generated code, but the “update” fonction is only available in round trip mode.
A few years ago, Java Designer worked without those markers, and had a few problems those markers helped resolve: – finding elements instead of deleting the old ones and creating new ones instead. Despite the generated code being the same, it could be a real problem if the old elements were unmasked in diagrams… Or if you want to use a diff/merge. – avoid moving elements from a package to another when the namespacings are equivalent in several parts of the model. – making element lookup a lot faster, because those id are kept indexed by Modelio.
Getting rid of the markers might not cause all those problems to reappear as regressions, as a lot of other changes in the reverse were also included since the old versions, but It can’t be guaranteed.