Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Customize emf generated genmodel to modify generated model code(How to customize emf based genmodel file so that the generated java model code code can be modified to remove model change notification codes from generated java model)
Customize emf generated genmodel to modify generated model code [message #1786374] Wed, 02 May 2018 09:27 Go to next message
Manoj Baruah is currently offline Manoj BaruahFriend
Messages: 1
Registered: May 2018
Junior Member
How to customize emf based genmodel file so that the generated java model code can be modified to remove model change notification codes from generated java model.

e.g-> Once I generate the models from .genmodel file, the following methods also gets added to the java model:

> protected EClass eStaticClass()

>if (eNotificationRequired())
> eNotify(new ENotificationImpl(this, Notification.SET...


>public Object eGet(int featureID, boolean resolve, boolean coreType)

My question how can I modify genmodel or any other way so that the above code does not gets generated in the generated java code.

Thank you,
Manoj
Re: Customize emf generated genmodel to modify generated model code [message #1786397 is a reply to message #1786374] Wed, 02 May 2018 15:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
The GenModel has a Suppress Notification property you can set to true.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Customize emf generated genmodel to modify generated model code [message #1786400 is a reply to message #1786397] Wed, 02 May 2018 16:13 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

Yes. But see https://bugs.eclipse.org/bugs/show_bug.cgi?id=414352#c3

"In fact, I think the whole option is pretty much bogus, but it seemed to make someone at IBM happy many years ago."

Regards

Ed Willink
Previous Topic:[CDO] Problem with reconnecting CDO Session
Next Topic:Unexpected results with EObject::eGet(..)
Goto Forum:
  


Current Time: Tue Apr 23 12:30:03 GMT 2024

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

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

Back to the top