Community
Participate
Working Groups
When EMF code is generated an $Id$ CVS variable is generated in the comment header. Although this is handy way to get timestamp information into the source code, it makes comparing two versions of generated EMF code difficult, since all files will have a least the timestamp different. EMF should give the developer the choice of whether the $Id$ variable is emitted or not. This could be done through a genmodel setting. It could also be done by not emitting the $Id$ comment when the genmodel has a copyright comment string defined. Thanks!
Contributions/patches will be welcome.
Created attachment 142796 [details] Patch to make $Id$ flag conditional Here's what I'd recommend. I think it's the simplest possible change: just move the $Id$ tag into the no-copyright-specified block. This way, if people specify a custom copyright statement, they won't get the tag. If they want it, they can put it there themselves. This seems like a good idea in general since people might not be using CVS or may want to customize the tags they're getting. Because we don't update existing copyright comments on merge, it doesn't seem like it will do any damage. It will only affect new files. And I'd be happy to add an entry to the Bleeding Edge warning people of the change, if that seems like a good idea. Ed, what do you think?
James, if made, this change would bump org.eclipse.emf.codegen.ecore to 2.6.0, requiring the dependency in org.eclipse.emf.uml.codegen.ecore to be updated as well. And this change would cause all your specialized templates to be rebuilt, but only affecting the generated copyright statements (when copyright text is specified) as described above. Any concerns?
Dave, thanks for the 'heads up'. I'll have to make appropriate updates in UML2 when you deliver this. When were you planning on putting this in?
James, Whenever possible, but with no great rush. I'm just trying to deal with some low hanging fruit in my spare moments. Do you have a preference?
This sounds like a good approach Dave!
Thanks Ed. I've got the changes ready to go (including updating all the expected results in the generator tests), but I'll hold off on commiting it (or any other codegen changes) until James is back from vacation. UML has a strict dependency on codegen.ecore 2.5, so they'll need to respond immediately to avoid breakage.
The change is committed to CVS for EMF 2.6. James, you'll now need to update your dependency on org.eclipse.emf.codegen.ecore, and your templates should update themselves.
Fix available in HEAD: 2.6.0M1 (S200908122048).