Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF: Generated classes - Copyright details
EMF: Generated classes - Copyright details [message #501489] Wed, 02 December 2009 14:43 Go to next message
Stancho  is currently offline Stancho Friend
Messages: 6
Registered: December 2009
Junior Member
Hi all,

I am using genmodel to generate Model Code.
I set Copyright text and it is generated correctly but I have $Id$ at the end of every copyright header.

How can I remove this $Id$?

Thanks in advance,
Stancho
Re: EMF: Generated classes - Copyright details [message #501497 is a reply to message #501489] Wed, 02 December 2009 14:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000003080805010705010902
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Stancho,

The Header.javajetinc template looks like this so if you've set the
copyright property property on the GenModel or include copyright
annotations in the Ecore model, those should end up being used.

/**
<%{GenBase copyrightHolder = argument instanceof GenBase ?
(GenBase)argument : argument instanceof Object[] &&
((Object[])argument)[0] instanceof GenBase ?
(GenBase)((Object[])argument)[0] : null;%>
<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
*
< %=copyrightHolder.getCopyright(copyrightHolder.getGenModel() .getIndentation(stringBuffer))% >
<%} else {%>
* <copyright>
* </copyright>
*
* <%="$"%>Id<%="$"%>
<%}}%>
*/

Which version of EMF are you using?


Stancho wrote:
> Hi all,
>
> I am using genmodel to generate Model Code.
> I set Copyright text and it is generated correctly but I have $Id$ at
> the end of every copyright header.
>
> How can I remove this $Id$?
>
> Thanks in advance,
> Stancho

--------------000003080805010705010902
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Stancho,<br>
<br>
The Header.javajetinc template looks like this so if you've set the
copyright property property on the GenModel or include copyright
annotations in the Ecore model, those should end up being used.<br>
<blockquote><small>/**<br>
&lt;%{GenBase copyrightHolder = argument instanceof GenBase ?
(GenBase)argument : argument instanceof Object[] &amp;&amp;
((Object[])argument)[0] instanceof GenBase ?
(GenBase)((Object[])argument)[0] : null;%&gt;<br>
&lt;%if (copyrightHolder != null &amp;&amp;
copyrightHolder.hasCopyright()) {%&gt;<br>
 *
&lt;%=copyrightHolder.getCopyright(copyrightHolder.getGe nModel().getIndentation(stringBuffer))%&gt; <br>
&lt;%} else {%&gt;<br>
 * &lt;copyright&gt;<br>
 * &lt;/copyright&gt;<br>
 *<br>
 * &lt;%="$"%&gt;Id&lt;%="$"%&gt;<br>
&lt;%}}%&gt;<br>
 */</small><br>
</blockquote>
Which version of EMF are you using?<br>
<br>
<br>
Stancho wrote:
<blockquote cite="mid:hf5uee$vl5$1@build.eclipse.org" type="cite">Hi
all,
<br>
<br>
I am using genmodel to generate Model Code.
<br>
I set Copyright text and it is generated correctly but I have $Id$ at
the end of every copyright header.
<br>
<br>
How can I remove this $Id$?
<br>
<br>
Thanks in advance,
<br>
Stancho
<br>
</blockquote>
</body>
</html>

--------------000003080805010705010902--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF: Generated classes - Copyright details [message #501502 is a reply to message #501497] Wed, 02 December 2009 15:17 Go to previous messageGo to next message
Stancho  is currently offline Stancho Friend
Messages: 6
Registered: December 2009
Junior Member
Hi Ed Merks,

Thanks for your reply!

I'm using version 2.4.
Re: EMF: Generated classes - Copyright details [message #501512 is a reply to message #501502] Wed, 02 December 2009 15:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Stancho,

I think this was changed in 2.5. Before that you'd have to fiddle with
the template itself and use dynamic templates.


Stancho wrote:
> Hi Ed Merks,
>
> Thanks for your reply!
>
> I'm using version 2.4.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF: Generated classes - Copyright details [message #501515 is a reply to message #501512] Wed, 02 December 2009 15:56 Go to previous messageGo to next message
Stancho  is currently offline Stancho Friend
Messages: 6
Registered: December 2009
Junior Member
Ed,

So the best choice is to update my EMF to 2.5, isn't it?

How can I use these dynamic templates?

Thanks,
Stancho


[Updated on: Wed, 02 December 2009 15:59]

Report message to a moderator

Re: EMF: Generated classes - Copyright details [message #501529 is a reply to message #501515] Wed, 02 December 2009 16:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040000010408060304020608
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Stancho,

See 2.30 What are Dynamic Templates?
< http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F>

Note that once the .java file exists, the copyright header will not be
touched again, unless you change the merge rules to do that, which can
also be done with the dynamic templates approach.


Stancho wrote:
> Ed,
>
> So the best choice is to update my EMF to 2.5, is it?
>
> How can I use these dynamic templates?
>
> Thanks,
> Stancho
>
>
>

--------------040000010408060304020608
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Stancho,<br>
<br>
See <a
href=" http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F"><span
class="tocnumber">2.30</span> <span class="toctext">What are Dynamic
Templates?</span></a><br>
<br>
Note that once the .java file exists, the copyright header will not be
touched again, unless you change the merge rules to do that, which can
also be done with the dynamic templates approach.<br>
<br>
<br>
Stancho wrote:
<blockquote cite="mid:hf62nu$e9t$1@build.eclipse.org" type="cite">Ed,
<br>
<br>
So the best choice is to update my EMF to 2.5, is it?
<br>
<br>
How can I use these dynamic templates?
<br>
<br>
Thanks,
<br>
Stancho
<br>
<br>
<br>
<br>
</blockquote>
</body>
</html>

--------------040000010408060304020608--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF: Generated classes - Copyright details [message #621871 is a reply to message #501497] Wed, 02 December 2009 15:17 Go to previous message
Stancho  is currently offline Stancho Friend
Messages: 6
Registered: December 2009
Junior Member
Hi Ed Merks,

Thanks for your reply!

I'm using version 2.4.
Re: EMF: Generated classes - Copyright details [message #621872 is a reply to message #621871] Wed, 02 December 2009 15:28 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Stancho,

I think this was changed in 2.5. Before that you'd have to fiddle with
the template itself and use dynamic templates.


Stancho wrote:
> Hi Ed Merks,
>
> Thanks for your reply!
>
> I'm using version 2.4.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF: Generated classes - Copyright details [message #621873 is a reply to message #501512] Wed, 02 December 2009 15:56 Go to previous message
Stancho  is currently offline Stancho Friend
Messages: 6
Registered: December 2009
Junior Member
Ed,

So the best choice is to update my EMF to 2.5, is it?

How can I use these dynamic templates?

Thanks,
Stancho
Re: EMF: Generated classes - Copyright details [message #621874 is a reply to message #621873] Wed, 02 December 2009 16:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040000010408060304020608
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Stancho,

See 2.30 What are Dynamic Templates?
< http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F>

Note that once the .java file exists, the copyright header will not be
touched again, unless you change the merge rules to do that, which can
also be done with the dynamic templates approach.


Stancho wrote:
> Ed,
>
> So the best choice is to update my EMF to 2.5, is it?
>
> How can I use these dynamic templates?
>
> Thanks,
> Stancho
>
>
>

--------------040000010408060304020608
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Stancho,<br>
<br>
See <a
href=" http://wiki.eclipse.org/index.php/EMF/FAQ#What_are_Dynamic_T emplates.3F"><span
class="tocnumber">2.30</span> <span class="toctext">What are Dynamic
Templates?</span></a><br>
<br>
Note that once the .java file exists, the copyright header will not be
touched again, unless you change the merge rules to do that, which can
also be done with the dynamic templates approach.<br>
<br>
<br>
Stancho wrote:
<blockquote cite="mid:hf62nu$e9t$1@build.eclipse.org" type="cite">Ed,
<br>
<br>
So the best choice is to update my EMF to 2.5, is it?
<br>
<br>
How can I use these dynamic templates?
<br>
<br>
Thanks,
<br>
Stancho
<br>
<br>
<br>
<br>
</blockquote>
</body>
</html>

--------------040000010408060304020608--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF: Generated classes - Copyright details
Next Topic:Is this possible with EMFCompare?
Goto Forum:
  


Current Time: Fri Mar 29 05:55:17 GMT 2024

Powered by FUDForum. Page generated in 0.04071 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top