Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » edit generated java model
edit generated java model [message #989622] Fri, 07 December 2012 01:25 Go to next message
Emiliano Galitiello is currently offline Emiliano GalitielloFriend
Messages: 2
Registered: December 2012
Junior Member
Hello
First I'm sorry if this question has been posted before, I read the previous questions and none seems to fit my question.
We need to edit the generated model, for example, change the type on a field declaration.
As there are model, edit and editor plugins for emf models, we wonder what is the needed plugin to edit the java model.
If there is not such plugin, what is the better way to edit the generated model?
Thanks a lot in advance for your time.
Re: edit generated java model [message #989659 is a reply to message #989622] Fri, 07 December 2012 08:33 Go to previous messageGo to next message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
Member
For editing single elements of an ecore model instance, you can use the sample reflective model editor. To open this editor, select your generated model file -> right click -> open with -> sample reflective model editor. If you need to apply the same change many times, you should have a look at ATL.
Re: edit generated java model [message #989670 is a reply to message #989659] Fri, 07 December 2012 09:15 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

As useful complementary information: MoDisco provides the generic MoDisco Model Browser, which is particularly dedicated to the navigation through large & complex models (such as the Java ones you can obtain using the MoDisco Java Model Discoverer).
Actually, if you have MoDisco installed (which is the case I guess as you are talking about Java models), this should be the default editor for EMF models (i.e. XMI files).
In addition to all the proposed advanced navigation features, it also provides the main base editing capabilities that you will find in the EMF sample reflective model editor.
I encourage you to take a deeper look into the MoDisco Reference Documentation to get more details on this component.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: edit generated java model [message #989828 is a reply to message #989622] Sat, 08 December 2012 04:35 Go to previous messageGo to next message
Emiliano Galitiello is currently offline Emiliano GalitielloFriend
Messages: 2
Registered: December 2012
Junior Member
Andreas, Hugo: Thanks for your quick response and help.
Maybe I was not clear enough. We need to edit a java model programatically. We generate the model programatically (using modisco), and then we need to change some properties of the objects in this model (i.e. a type in a field declaration). Since that, in an EMF model, is done via the edit plugin, we were wondering what is the best way to do it in Modisco
Thanks in advance!
Re: edit generated java model [message #989962 is a reply to message #989828] Mon, 10 December 2012 09:36 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Independently from MoDisco and as for any EMF model, you have two main ways of handling your Java model programmatically:

  1. Use the API automatically generated from the Java metamodel in Ecore (provided in this case by the org.eclipse.gmt.modisco.java plugin);
  2. Use the EMF reflective (dynamic) API (cf. this article for instance).

I hope this help.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:MoDisco already supports SMM (structured metrics metamodel) ?
Next Topic:How to return multiple results for query on ecore model
Goto Forum:
  


Current Time: Sat Apr 20 00:17:02 GMT 2024

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

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

Back to the top