|
Re: [Edapt] Edapt validation for earlier releases [message #1743571 is a reply to message #1743189] |
Fri, 16 September 2016 13:24 |
|
Hi,
I am not sure if I fully understand your problem: When a migration is performed model.checkConformance() is called after the model has been loaded for the first time. As I understood your problem, this is what you want to achieve?
Moreover it is possible to set a different validation level (see org.eclipse.emf.edapt.internal.migration.execution.ValidationLevel) on the migrator with the #setLevel method, so you could tell edapt to check the confirmance after any change.
Also, since a CustomMigration does not have to be attached to any metamodel change, you could also add a check conformance migration at the beginning of every release.
Kind regards
Johannes
Johannes Faltermeier
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
Re: [Edapt] Edapt validation for earlier releases [message #1743846 is a reply to message #1743731] |
Tue, 20 September 2016 08:46 |
|
Hi,
I haven't tested it, but the following should work.
After you have created a Migrator and before starting the migration you can call
org.eclipse.emf.edapt.migration.execution.Migrator.getMetamodel(Release)
The Migrator also offers methods to access the Release you need, e.g. based on a NS-URI.
You can get the NS-URI with org.eclipse.emf.edapt.migration.ReleaseUtils.getNamespaceURI(URI).
Then you can use
org.eclipse.emf.edapt.internal.migration.internal.Persistency.loadModel(URI, Metamodel, IResourceSetFactory)
to get a Model instance on which you can call #checkConformance().
I hope this will help.
Cheers
Johannes
Johannes Faltermeier
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03242 seconds