Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Execute migration with Edapt
Execute migration with Edapt [message #897817] Wed, 25 July 2012 09:40 Go to next message
excellion fdfds is currently offline excellion fdfdsFriend
Messages: 9
Registered: July 2012
Junior Member
Hello!

I installed the project Edapt http://www.eclipse.org/edapt/, creates the history of my ecore model and prepared a new "release Edapt". In the tutorial http://www.eclipse.org/edapt/libraryexample.php I'm at the point "Migrator".
I.e. the execution of operations to convert my data files from old to new Ecore model.

Quote:
The migration execution can be integrated directly into the editor code, as Listing 3 shows. The method checkMigration must be called at the beginning of the method createModel in the library editor.


But i don't have the méthod "createModel", because i don't have the project "xxx.editor". i have the xxx.model (with .ecore), xxx.edit and xxx.diagram (generated with .gmfgen).

I don't find how launch the migration with Edapt...

Any suggestions?
Re: Execute migration with Edapt [message #897903 is a reply to message #897817] Wed, 25 July 2012 11:59 Go to previous messageGo to next message
Maximilian Koegel is currently offline Maximilian KoegelFriend
Messages: 225
Registered: July 2009
Senior Member
Hi,

the example is about integrating the migration into the editor that can
be generated from the genmodel with EMF. To generate the editor open the
genmodel and select "Generate Editor" from the context menu.
I do not know about your application scenario, but probably you do not
want to use the editor since you did not generate it. The example code
in Listing 3 however demonstrates what you need to do to integrate it
into any kind of editor/application that loads EMF models from
XMI-Resources. If you pass in the URI of the XMIFile it will be migrated
if a migration plugins has been generated with Edapt and is enabled in
the launch config.

Cheers,
Maximilian

Am 25.07.2012 11:40, schrieb excellion fdfds:
> Hello!
>
> I installed the project Edapt http://www.eclipse.org/edapt/, creates the
> history of my ecore model and prepared a new "release Edapt". In the
> tutorial http://www.eclipse.org/edapt/libraryexample.php I'm at the
> point "Migrator".
> I.e. the execution of operations to convert my data files from old to
> new Ecore model.
>
> Quote:
>> The migration execution can be integrated directly into the editor
>> code, as Listing 3 shows. The method checkMigration must be called at
>> the beginning of the method createModel in the library editor.
>
>
> But i don't have the méthod "createModel", because i don't have the
> project "xxx.editor". i have the xxx.model (with .ecore), xxx.edit and
> xxx.diagram (generated with .gmfgen).
>
> I don't find how launch the migration with Edapt...
>
> Any suggestions?


--
Maximilian Kögel

Get Professional Eclipse Support: http://eclipsesource.com/munich
Re: Execute migration with Edapt [message #1046891 is a reply to message #897903] Mon, 22 April 2013 14:01 Go to previous messageGo to next message
Niels Brouwers is currently offline Niels BrouwersFriend
Messages: 67
Registered: July 2009
Member
Hi,

just like the starter of this topic, I am experiencing problems trying to execute the migrator. I am following the Edapt tutorial as found on the website.

What I've done so far:


  • Created an example ecore model
  • Created a 1.0 release (also reflected in the nsUri) with Edapt
  • Generated all the model, edit and editor plugins from the ecore model
  • Started up a new Eclipse instance and tested the creation of a model instance using the generated editor
  • Made a small modification to the meta-model, and created a 1.1 release with Edapt, including changing the nsUri.
  • Verified to see whether the model instance created earlier could not be opened in the run-time instance due to the NsUri being changed.
  • Then, tried to modify the editor code in the createModel method to execute the model migrator. Opening the model with the modified editor now results in the error message "No migrator found".


Debugging the code it became clear the the MigratorRegistry does not contain a suitable migrator for the 1.0 version of the meta-model. I've looked at implementing the 'org.eclipse.emf.edapt.migrators' extension point, but fail to achieve in this.

Can someone please look at the enclosed attachment and see what I am doing wrong here? Furthermore, is there any documentation besides the tutorial available? The documentation link on the website points to a non-existing website.

Thank you in advance!



Kind regards,
Niels Brouwers.
Re: Execute migration with Edapt [message #1046903 is a reply to message #1046891] Mon, 22 April 2013 14:16 Go to previous message
Niels Brouwers is currently offline Niels BrouwersFriend
Messages: 67
Registered: July 2009
Member
Never mind. Got it to work! Apparently the path defined in the extension point was wrong.... Mad


Kind regards,
Niels Brouwers.
Previous Topic:[EMF Facet] How to access model instances?
Next Topic:teneo hibernate example
Goto Forum:
  


Current Time: Mon Dec 22 17:42:55 GMT 2014

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

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