Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » JMerge is not overwriting generated methods in the target
JMerge is not overwriting generated methods in the target [message #396995] Mon, 28 November 2005 18:16 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: July 2009
Junior Member
JMerge is not overwriting generated methods in the target

I’m having problem making JMerge overwrite the generated methods in the
target. It generates the method just fine after I delete it from the
target. But it does not overwrite the method after I change it a little,
for example, put a line of comment in the method body. According to this
article: http://www-128.ibm.com/developerworks/library/os-ecemf3/, JMerge
is supposed to overwrite my changes.

I have tried this with several different merge.xml. From the simplest one
in the above article with only one pull rule which simply overwrites all
methods, to a completed one from the sample
(plugins\org.eclipse.emf.source_2.1.0\src\org.eclipse.emf.an t_2.1.0\examples\jmerger)
which supports tags like generated, begin/end-user-code,
begin/end-user-doc. But JMerge behaves the same for me: it does not
overwrite the existing methods if they are already there in the target.

It’s interesting to notice that JMerge is overwriting the generated
methods in EMF.Editor just fine. I made similar change to a generated
method and it got overwritten as expected.

Is the internal JMerge that EMF uses configured differently than the one I
use in my project? Other than merge.xml are there other ways to configure
JMerge?

I tried to search for the interal merge.xml that EMF uses to generate its
Editor, .Edit etc. but with no luck. The only thing I found was in the
above JMerge example folder.

I’m using EMF 2.1.0 and eclipse 3.1.0. My program is coded almost exactly
the same as the sample in the article with some minor changes to avoid
some deprecated methods. I was able to debug into merger.merge().

Any comments and help will be greatly appreciated.
Re: JMerge is not overwriting generated methods in the target [message #396996 is a reply to message #396995] Mon, 28 November 2005 19:12 Go to previous message
No real name is currently offline No real nameFriend
Messages: 2
Registered: July 2009
Junior Member
Just found the answer to this issue. There are 3 methods in my JET
template. Only one of them has the //begin/end-user-code tags. After I
added them to the other 2, everything is working just fine.
Previous Topic:@model interface versus abstract
Next Topic:Simple management of custom Command descriptions
Goto Forum:
  


Current Time: Fri Apr 26 01:27:30 GMT 2024

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

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

Back to the top