Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [EDAPT] Edapt in a Spring application
[EDAPT] Edapt in a Spring application [message #1802408] |
Fri, 08 February 2019 12:24 |
Jerome Wirth Messages: 2 Registered: February 2019 |
Junior Member |
|
|
I'm relatively new to the EDAPT topic, but I try my best to explain the problem.
We have a Spring Boot Application, that uses an EMF-Modell. The model changed over time and now we would like to add a migrator for old models. It sounds perfect for EDAPT, but it seems that EDAPT is only usable within eclipse applications?
It's hard to find resources for the EDAPT project, besides the project page itself, that's why I ask here:
Is it possible to add EDAPT to an Spring Application? Till now I was able to create the history for my ecore-Model, but when I want to load a migrator its always null because there is no eclipse platform running.
On the other hand, I tried to register my own migrator, but I don't know how and the only other example I found for this, needed a running eclipse platform too.
|
|
| | |
Re: [EDAPT] Edapt in a Spring application [message #1802890 is a reply to message #1802697] |
Mon, 18 February 2019 14:27 |
|
Hi,
you can get the source code and setup an IDE as described here:
https://www.eclipse.org/edapt/communication.php
Code-wise the entry point would be
org.eclipse.emf.edapt.migration.execution.Migrator.main(String[])
and
org.eclipse.emf.edapt.internal.migration.execution.internal.MigratorCommandLine.MigratorCommandLine(String[])
which is the constructor that parses the arguments passed to this Migrator main method.
Using this plain java application you may migrate models without an osgi-runtime. However this is not well tested and there are missing features (e.g. passing in custom EFactories is only supported from an extension point as of now). It should work for simple use cases.
If you need to fix or extend something, the best way to submit any patches is Gerrit:
https://wiki.eclipse.org/Gerrit#User_Account
https://wiki.eclipse.org/Gerrit#Gerrit_setup
Also note, that you can also contribute additional documentation. Simply open a bugzilla (https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Edapt) and attach your extension.
If you have questions about something, best thing would be to ask here, to open a bugzilla , or to push your changes to Gerrit and we can discuss it there.
Cheers,
Johannes
Example usage:
String[] args = new String[] { //
"\"/home/user/model.xmi\"", // file path to model which needs to be migrated
"-h", "\"/home/user/myplugin/model/task.history\"", // file path to the history
"-s", "0", // source release
"-t", "1", // target release
"-v", "CUSTOM_MIGRATION", // validation level
// operation libraries
"-l", "org.eclipse.emf.edapt.internal.declaration.BaseLibrary", //
"-l", "org.eclipse.emf.edapt.declaration.delegation.DelegationOperations", //
"-l", "org.eclipse.emf.edapt.declaration.generalization.GeneralizationOperations", //
"-l", "org.eclipse.emf.edapt.declaration.inheritance.InheritanceOperations", //
"-l", "org.eclipse.emf.edapt.declaration.merge.MergeOperations", //
"-l", "org.eclipse.emf.edapt.declaration.simple.NonStructuralPrimitives", //
"-l", "org.eclipse.emf.edapt.declaration.replacement.ReplacementOperations", //
"-l", "org.eclipse.emf.edapt.declaration.creation.StructuralPrimitives", };
Migrator.main(args);
Johannes Faltermeier
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Goto Forum:
Current Time: Thu Sep 19 04:43:45 GMT 2024
Powered by FUDForum. Page generated in 0.03800 seconds
|