|
Re: new jmerger and annotations? [message #416792 is a reply to message #416787] |
Tue, 19 February 2008 14:36 |
Marcelo Paternostro Messages: 602 Registered: July 2009 |
Senior Member |
|
|
Hi Ronald,
"Yes and no" (the kind of answer we all hate ;-) )
It does support merging annotations. The problem is that, as the code
is now, JMerger cannot distinguish annotations using their fully
qualified name. So it would merge, for example, "@Generated"
annotations even if they were defined in different packages.
If this is not a problem in your scenario, there are 2 JUnit tests in
which we show how you can tweak a merge rule file to work the
annotations. See the tests in
"data/merge.input/java5/various/annotations*" in this project:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf/tests/org.eclipse.emf.test.tools/?root=Modeling _Project
Btw, in the thread "JMerge with FreeMarker or Velocity generation?" from
2/14/2008 7:13 PM, I explain how the JMerger tests work.
Cheers,
Marcelo
Ronald wrote:
> Hi all,
>
> I noticed that the latest stable EMF build is 2.4.0M5 (Sat, 9 Feb 2008 --
> 00:50 (-0500)).
>
> Can the jmerger in this build already handle annotations? I still use the
> old and depricated jmerger, but as I'd like to generate classes with
> hibernate annotations, I'd love to get my hands on the new jmerger.
>
> Ronald
>
>
|
|
|
Re: new jmerger and annotations? [message #416893 is a reply to message #416792] |
Tue, 19 February 2008 17:33 |
Ronald Messages: 68 Registered: July 2009 |
Member |
|
|
Marcelo,
Thanks for your extensive answer. I'll have a look at the things you
mentioned.
Ronald
"Marcelo Paternostro" <marcelop@ca.ibm.com> schreef in bericht
news:fpeph8$dab$1@build.eclipse.org...
> Hi Ronald,
>
> "Yes and no" (the kind of answer we all hate ;-) )
>
> It does support merging annotations. The problem is that, as the code is
> now, JMerger cannot distinguish annotations using their fully qualified
> name. So it would merge, for example, "@Generated" annotations even if
> they were defined in different packages.
>
> If this is not a problem in your scenario, there are 2 JUnit tests in
> which we show how you can tweak a merge rule file to work the annotations.
> See the tests in "data/merge.input/java5/various/annotations*" in this
> project:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf/tests/org.eclipse.emf.test.tools/?root=Modeling _Project
>
> Btw, in the thread "JMerge with FreeMarker or Velocity generation?" from
> 2/14/2008 7:13 PM, I explain how the JMerger tests work.
>
> Cheers,
> Marcelo
>
> Ronald wrote:
>> Hi all,
>>
>> I noticed that the latest stable EMF build is 2.4.0M5 (Sat, 9 Feb 2008 --
>> 00:50 (-0500)).
>>
>> Can the jmerger in this build already handle annotations? I still use the
>> old and depricated jmerger, but as I'd like to generate classes with
>> hibernate annotations, I'd love to get my hands on the new jmerger.
>>
>> Ronald
|
|
|
Powered by
FUDForum. Page generated in 0.04717 seconds