On the handling of EMF Ecore Sub-Packages by the ModelServer #41
-
|
Assume I have an eClass P in the root package of my metamodel MM with the registered URI 'www.my.org/MM' in plugin.xml under the 'org.eclipse.emf.ecore.generated_package' extension point. In the same model I have an eClass R in a sub-package SP of the same metamodel with registered URI 'www.my.org/MM/SP'. Now, when I receive the content of an example model via the model server API instances of R carry the eClass property of 'www.my.org/MM#//SP/R' instead of the expected value of 'www.my.org/MM/SP#//R' (Sub-package identifier are moved behind the # symbol). Instances of P are referenced by 'www.my.org/MM#//P'. The XML namespaces in my model file are correctly pointing to the URI of the extension point registration. Also all my EPackage instances are wrapped and are registered with the model server using the ModelServerLauncher.addEPackageConfiguration() method. I know that most EMF examples out there use a single top-level package, but unfortunately this is not a good assumption. The default case for EMF models should be multiple ECore models forming an acyclic dependency graph; each with an arbitrary number of nested sub-packages. original thread by hoelzl-florian |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @hoelzl-florian(hoelzl-florian) , |
Beta Was this translation helpful? Give feedback.
Hi @hoelzl-florian(hoelzl-florian) ,
The ModelServer does not support SubPackages. We are happy to accept a PR to fix this.
The reason is 'they're evil' see our blogpost on this here: https://eclipsesource.com/blogs/2013/03/19/emf-dos-and-donts-5/