Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » new jmerger and annotations?
new jmerger and annotations? [message #416787] Tue, 19 February 2008 11:12 Go to next message
Ronald is currently offline RonaldFriend
Messages: 68
Registered: July 2009
Member
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 #416792 is a reply to message #416787] Tue, 19 February 2008 14:36 Go to previous messageGo to next message
Marcelo Paternostro is currently offline Marcelo PaternostroFriend
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 Go to previous message
Ronald is currently offline RonaldFriend
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
Previous Topic:Extarcting activity model and state machine information
Next Topic:Unable to get the ecore namespace and schema
Goto Forum:
  


Current Time: Thu Apr 25 14:15:41 GMT 2024

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

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

Back to the top