| Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » <jav:merge> EMF rules
 Goto Forum:| 
| <jav:merge> EMF rules [message #53266] | Tue, 26 September 2006 12:27  |  | 
| Eclipse User  |  |  |  |  | <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 12:40   |  | 
| Eclipse User  |  |  |  |  | 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 #53398 is a reply to message #53344] | Tue, 26 September 2006 12:49  |  | 
| Eclipse User  |  |  |  |  | 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 #592218 is a reply to message #53266] | Tue, 26 September 2006 12:37  |  | 
| Eclipse User  |  |  |  |  | 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 #592224 is a reply to message #53266] | Tue, 26 September 2006 12:40  |  | 
| Eclipse User  |  |  |  |  | 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 #592242 is a reply to message #53344] | Tue, 26 September 2006 12:49  |  | 
| Eclipse User  |  |  |  |  | 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 :-) )
 >>
 >
 >
 >
 |  |  |  | 
 
 
 Current Time: Fri Oct 31 05:19:29 EDT 2025 
 Powered by FUDForum . Page generated in 0.12349 seconds |