Skip to main content


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: 14
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: 253
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: 80
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 messageGo to next message
Niels Brouwers is currently offline Niels BrouwersFriend
Messages: 80
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.
Re: Execute migration with Edapt [message #1770950 is a reply to message #1046903] Sat, 19 August 2017 11:10 Go to previous messageGo to next message
Bestoon Jaff is currently offline Bestoon JaffFriend
Messages: 13
Registered: August 2017
Junior Member
Hi Niels Brouwers,

I'm new to EMF and EDpat, and currently experiencing the same sort of problem you had when you first tried to use EDapt. I also performed all the steps you mentioned in your bullet points list, but I get stuck when it comes to executing the migrator, could you please send me an example project of how you used EDapt successfully?

Your help would be highly appreciated.

Awaiting your reply please,

Thanks,

Bestoon Jaff
Re: Execute migration with Edapt [message #1770952 is a reply to message #897903] Sat, 19 August 2017 11:17 Go to previous messageGo to next message
Bestoon Jaff is currently offline Bestoon JaffFriend
Messages: 13
Registered: August 2017
Junior Member
Hi Maximilian,

I think lots of people have had troubles and difficulties following the library example of the EDapt tutorial, especially the Migrator section of that tutorial.


Could you please kindly update the library tutorial and add more details of how one can register a history in the migrator extension point?

I.e. could you kindly review the Migrator section and add the missing detail which has mad troubles for people trying to use EDapt tool?


Thanks a lot in advance,

Kind Regards,

Bestoon Jaff
Re: Execute migration with Edapt [message #1771061 is a reply to message #1770952] Mon, 21 August 2017 14:40 Go to previous messageGo to next message
Johannes Faltermeier is currently offline Johannes FaltermeierFriend
Messages: 101
Registered: December 2013
Senior Member

Hi,

we added an image of a registered history, which should help.
However this is more related to Eclipse RCP development overall. So you should maybe checkout this:
https://wiki.eclipse.org/FAQ_What_are_extensions_and_extension_points%3F

Cheers
Johannes


Johannes Faltermeier

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Execute migration with Edapt [message #1771126 is a reply to message #1771061] Tue, 22 August 2017 09:56 Go to previous message
Bestoon Jaff is currently offline Bestoon JaffFriend
Messages: 13
Registered: August 2017
Junior Member
Hi Johannes,

Thank you very much for your kind reply. Given that some of us (me included) are new to EMF and Edapt that is why we couldn't follow the tutorial successfully. I know that for people already familar with EMF, it could be straightforward to follow such a tutorial.


Thanks once more.


Btw, my NPE issue has not yet resolved :-( I replied to your message from the other post and attached my trial version of the library. Here I re-attached the project and I do very much appreciate if you could take a look and see what is wrong with it. I compared it to the sample library project which ships with EDapt 1.2.2, but could not find the source of the problem. Your help is highly appreciated.

Thanks,

Jaff

Previous Topic:Change all References from One Resource to another
Next Topic:Null Pointer Exception after Migrating an Ecore model instance using EDapt
Goto Forum:
  


Current Time: Thu Mar 28 20:26:24 GMT 2024

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

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

Back to the top