Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » <jav:merge> EMF rules
<jav:merge> EMF rules [message #53266] Tue, 26 September 2006 16:27 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
<java:merge> tag uses the emf rules URL . I dont have any idea of whats
an EMF rule is all about . Can one one tell me whats that and how to do
that ( any ref documentation will be good) . Is this covered as part of
EMF book ( i hav ordered one :-) )
Re: <jav:merge> EMF rules [message #53293 is a reply to message #53266] Tue, 26 September 2006 16:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------000208000402000404090701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kamesh,

The only documentation is this:

http://www-128.ibm.com/developerworks/library/os-ecemf3/

The newsgroup search facility can be quite handy for searching for answers:

http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail
< http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail>


Kamesh Sampath wrote:
> <java:merge> tag uses the emf rules URL . I dont have any idea of
> whats an EMF rule is all about . Can one one tell me whats that and
> how to do that ( any ref documentation will be good) . Is this covered
> as part of EMF book ( i hav ordered one :-) )


--------------000208000402000404090701
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kamesh,<br>
<br>
The only documentation is this: <br>
<blockquote>&nbsp;<a
href="http://www-128.ibm.com/developerworks/library/os-ecemf3/">http://www-128.ibm.com/developerworks/library/os-ecemf3/</a><br>
</blockquote>
The newsgroup search facility can be quite handy for searching for
answers:<br>
<blockquote><a
href="http://www.eclipse.org/search/search.cgi?q=JMerge&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail ">http://www.eclipse.org/search/search.cgi?q=JMerge&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail </a><br>
</blockquote>
<br>
Kamesh Sampath wrote:
<blockquote cite="midefbkdl$ol5$2@utils.eclipse.org" type="cite"><a class="moz-txt-link-rfc2396E" href="java:merge">&lt;java:merge&gt;</a>
tag uses the emf rules URL . I dont have any idea of whats an EMF rule
is all about . Can one one tell me whats that and how to do that ( any
ref documentation will be good) . Is this covered as part of EMF book (
i hav ordered one :-) )
<br>
</blockquote>
<br>
</body>
</html>

--------------000208000402000404090701--
Re: <jav:merge> EMF rules [message #53319 is a reply to message #53266] Tue, 26 September 2006 16:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Kamesh,

And no, the book does not cover this in detail, however it describes the
code generation patterns and describes how merging works in order to
update the results after you regenerate. It's all really quite simple,
especially if you follow the patterns used by EMF, in which case you can
just reuse the emf-merge.xml in org.eclipse.emf.codegen.ecore/templates.


Kamesh Sampath wrote:
> <java:merge> tag uses the emf rules URL . I dont have any idea of
> whats an EMF rule is all about . Can one one tell me whats that and
> how to do that ( any ref documentation will be good) . Is this covered
> as part of EMF book ( i hav ordered one :-) )
Re: <jav:merge> EMF rules [message #53344 is a reply to message #53266] Tue, 26 September 2006 16:40 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Since you mention the EMF book, the JMerge rules are summarized pretty well
in section 9.9 Customizing Generated Classes, pp 210-212.

Basically, if you have used the EMF code generator, you are familiar with
the JMerge rules:

1) the generator emitts classes, methods and fields with a Java doc comment
including @generated
2) to modify the element (and not have it obliterated next time you code
generate), you remove or deface the @generated tag.

By default, <java:merge> uses the same rules as the EMF code generator. To
use it effectively, you should insert @generated tags in the Java doc of all
classes, methods and fields you generate in .java files that you expect
users to modify. You don't need @generated tags on methods you one-time
generate, nor in Java files that are not for user editing (you shouldn't use
java:merge in this case - you always want to overwrite).

Writing custom JMerge rules is a more complex task. IBM Developerworks as a
starter article on the subject:

http://www-128.ibm.com/developerworks/library/os-ecemf3/


"Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
news:efbkdl$ol5$2@utils.eclipse.org...
> <java:merge> tag uses the emf rules URL . I dont have any idea of whats an
> EMF rule is all about . Can one one tell me whats that and how to do that
> ( any ref documentation will be good) . Is this covered as part of EMF
> book ( i hav ordered one :-) )
Re: <jav:merge> EMF rules [message #53372 is a reply to message #53293] Tue, 26 September 2006 16:48 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
thanks ed.

I found a article on eclipse for FormsEditor , hope that will be really
helpful to the community . :-)

http://www.conceptualprocessengineering.com/library/

enjoy modelling with EMF ( ejnoying modelling frameowrk :-) )

Thanks ,
Kamesh

Ed Merks wrote:
> Kamesh,
>
> The only documentation is this:
>
> http://www-128.ibm.com/developerworks/library/os-ecemf3/
>
> The newsgroup search facility can be quite handy for searching for
> answers:
>
> http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail
> < http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail>
>
>
> Kamesh Sampath wrote:
>> <java:merge> tag uses the emf rules URL . I dont have any idea of
>> whats an EMF rule is all about . Can one one tell me whats that and
>> how to do that ( any ref documentation will be good) . Is this
>> covered as part of EMF book ( i hav ordered one :-) )
>
Re: <jav:merge> EMF rules [message #53398 is a reply to message #53344] Tue, 26 September 2006 16:49 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
thanks paul .

Paul Elder wrote:
> Since you mention the EMF book, the JMerge rules are summarized pretty well
> in section 9.9 Customizing Generated Classes, pp 210-212.
>
> Basically, if you have used the EMF code generator, you are familiar with
> the JMerge rules:
>
> 1) the generator emitts classes, methods and fields with a Java doc comment
> including @generated
> 2) to modify the element (and not have it obliterated next time you code
> generate), you remove or deface the @generated tag.
>
> By default, <java:merge> uses the same rules as the EMF code generator. To
> use it effectively, you should insert @generated tags in the Java doc of all
> classes, methods and fields you generate in .java files that you expect
> users to modify. You don't need @generated tags on methods you one-time
> generate, nor in Java files that are not for user editing (you shouldn't use
> java:merge in this case - you always want to overwrite).
>
> Writing custom JMerge rules is a more complex task. IBM Developerworks as a
> starter article on the subject:
>
> http://www-128.ibm.com/developerworks/library/os-ecemf3/
>
>
> "Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
> news:efbkdl$ol5$2@utils.eclipse.org...
>
>> <java:merge> tag uses the emf rules URL . I dont have any idea of whats an
>> EMF rule is all about . Can one one tell me whats that and how to do that
>> ( any ref documentation will be good) . Is this covered as part of EMF
>> book ( i hav ordered one :-) )
>>
>
>
>
Re: <jav:merge> EMF rules [message #592198 is a reply to message #53266] Tue, 26 September 2006 16:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000208000402000404090701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kamesh,

The only documentation is this:

http://www-128.ibm.com/developerworks/library/os-ecemf3/

The newsgroup search facility can be quite handy for searching for answers:

http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail
< http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail>


Kamesh Sampath wrote:
> <java:merge> tag uses the emf rules URL . I dont have any idea of
> whats an EMF rule is all about . Can one one tell me whats that and
> how to do that ( any ref documentation will be good) . Is this covered
> as part of EMF book ( i hav ordered one :-) )


--------------000208000402000404090701
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kamesh,<br>
<br>
The only documentation is this: <br>
<blockquote>&nbsp;<a
href="http://www-128.ibm.com/developerworks/library/os-ecemf3/">http://www-128.ibm.com/developerworks/library/os-ecemf3/</a><br>
</blockquote>
The newsgroup search facility can be quite handy for searching for
answers:<br>
<blockquote><a
href="http://www.eclipse.org/search/search.cgi?q=JMerge&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail ">http://www.eclipse.org/search/search.cgi?q=JMerge&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail </a><br>
</blockquote>
<br>
Kamesh Sampath wrote:
<blockquote cite="midefbkdl$ol5$2@utils.eclipse.org" type="cite"><a class="moz-txt-link-rfc2396E" href="java:merge">&lt;java:merge&gt;</a>
tag uses the emf rules URL . I dont have any idea of whats an EMF rule
is all about . Can one one tell me whats that and how to do that ( any
ref documentation will be good) . Is this covered as part of EMF book (
i hav ordered one :-) )
<br>
</blockquote>
<br>
</body>
</html>

--------------000208000402000404090701--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: <jav:merge> EMF rules [message #592218 is a reply to message #53266] Tue, 26 September 2006 16:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Kamesh,

And no, the book does not cover this in detail, however it describes the
code generation patterns and describes how merging works in order to
update the results after you regenerate. It's all really quite simple,
especially if you follow the patterns used by EMF, in which case you can
just reuse the emf-merge.xml in org.eclipse.emf.codegen.ecore/templates.


Kamesh Sampath wrote:
> <java:merge> tag uses the emf rules URL . I dont have any idea of
> whats an EMF rule is all about . Can one one tell me whats that and
> how to do that ( any ref documentation will be good) . Is this covered
> as part of EMF book ( i hav ordered one :-) )


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: <jav:merge> EMF rules [message #592224 is a reply to message #53266] Tue, 26 September 2006 16:40 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Since you mention the EMF book, the JMerge rules are summarized pretty well
in section 9.9 Customizing Generated Classes, pp 210-212.

Basically, if you have used the EMF code generator, you are familiar with
the JMerge rules:

1) the generator emitts classes, methods and fields with a Java doc comment
including @generated
2) to modify the element (and not have it obliterated next time you code
generate), you remove or deface the @generated tag.

By default, <java:merge> uses the same rules as the EMF code generator. To
use it effectively, you should insert @generated tags in the Java doc of all
classes, methods and fields you generate in .java files that you expect
users to modify. You don't need @generated tags on methods you one-time
generate, nor in Java files that are not for user editing (you shouldn't use
java:merge in this case - you always want to overwrite).

Writing custom JMerge rules is a more complex task. IBM Developerworks as a
starter article on the subject:

http://www-128.ibm.com/developerworks/library/os-ecemf3/


"Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
news:efbkdl$ol5$2@utils.eclipse.org...
> <java:merge> tag uses the emf rules URL . I dont have any idea of whats an
> EMF rule is all about . Can one one tell me whats that and how to do that
> ( any ref documentation will be good) . Is this covered as part of EMF
> book ( i hav ordered one :-) )
Re: <jav:merge> EMF rules [message #592233 is a reply to message #53293] Tue, 26 September 2006 16:48 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
thanks ed.

I found a article on eclipse for FormsEditor , hope that will be really
helpful to the community . :-)

http://www.conceptualprocessengineering.com/library/

enjoy modelling with EMF ( ejnoying modelling frameowrk :-) )

Thanks ,
Kamesh

Ed Merks wrote:
> Kamesh,
>
> The only documentation is this:
>
> http://www-128.ibm.com/developerworks/library/os-ecemf3/
>
> The newsgroup search facility can be quite handy for searching for
> answers:
>
> http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail
> < http://www.eclipse.org/search/search.cgi?q=JMerge&cmd=Se arch%21&form=extended&wf=574a74&ps=10&m=all& amp;t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm= wrd&t=News&t=Mail>
>
>
> Kamesh Sampath wrote:
>> <java:merge> tag uses the emf rules URL . I dont have any idea of
>> whats an EMF rule is all about . Can one one tell me whats that and
>> how to do that ( any ref documentation will be good) . Is this
>> covered as part of EMF book ( i hav ordered one :-) )
>
Re: <jav:merge> EMF rules [message #592242 is a reply to message #53344] Tue, 26 September 2006 16:49 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
thanks paul .

Paul Elder wrote:
> Since you mention the EMF book, the JMerge rules are summarized pretty well
> in section 9.9 Customizing Generated Classes, pp 210-212.
>
> Basically, if you have used the EMF code generator, you are familiar with
> the JMerge rules:
>
> 1) the generator emitts classes, methods and fields with a Java doc comment
> including @generated
> 2) to modify the element (and not have it obliterated next time you code
> generate), you remove or deface the @generated tag.
>
> By default, <java:merge> uses the same rules as the EMF code generator. To
> use it effectively, you should insert @generated tags in the Java doc of all
> classes, methods and fields you generate in .java files that you expect
> users to modify. You don't need @generated tags on methods you one-time
> generate, nor in Java files that are not for user editing (you shouldn't use
> java:merge in this case - you always want to overwrite).
>
> Writing custom JMerge rules is a more complex task. IBM Developerworks as a
> starter article on the subject:
>
> http://www-128.ibm.com/developerworks/library/os-ecemf3/
>
>
> "Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
> news:efbkdl$ol5$2@utils.eclipse.org...
>
>> <java:merge> tag uses the emf rules URL . I dont have any idea of whats an
>> EMF rule is all about . Can one one tell me whats that and how to do that
>> ( any ref documentation will be good) . Is this covered as part of EMF
>> book ( i hav ordered one :-) )
>>
>
>
>
Previous Topic:<jav:merge> EMF rules
Next Topic:Adding Exceptions and default java document comments for classes
Goto Forum:
  


Current Time: Wed Jan 15 07:02:31 GMT 2025

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

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

Back to the top