|
|
Re: [Edapt] ClassCastException when migrating models with InstanceClassName-attributes [message #1815670 is a reply to message #1814797] |
Tue, 08 October 2019 08:43 |
|
Hi,
I think there is no way to avoid a custom EFactory here when working with Dynamic EMF. However I think you could structure your Ecore a bit differently to avoid this issue.
If I understood your use case correctly you want to implement a custom Java interface for some EClasses.
I would suggest to create an empty EClass for this interface, set interface to true, but don't add an instance type name in the ecore.
Add this new EClass as a supertype for the appropriate EClasses and generate the code.
Go to the generated Java interface you just created and add an extends for your actual Java interface in the code. Change @generated to @generated NOT.
As this interface EClass is empty and should stay empty in the model, there is no harm switching to @generated NOT, as this should not change in the future. Regenerating will not remove this extends.
This should help to avoid those issues with dynamic EMF.
I hope this helps.
Cheers, Johannes
Johannes Faltermeier
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Powered by
FUDForum. Page generated in 0.02025 seconds