Reputation: 263
I have to EMF models. A and B.
A's elements reference B's various elements and the main model element from which I create the instances is in B, containing all the other model elements. Meaning that the main model is the B, and when I create an instance based on the B's main model element, I should be able create children in B-instance from A's referencing elements.
But since they happen to be in two different EMF projects, I want to add the A in B (somehow reference it from within the B maybe?), without just defining a new EPackage in B and copying the A into it. That is a design issue for right now, that both should be in different projects.
What is the best way to do it? Do you have any tips?
Thanks.
Upvotes: 0
Views: 520
Reputation: 296
Generate your models using annotated interfaces, or if it is not possible write 2 new simple models (using annotated interfaces) just to see how it works. For example, write interfaces for model B in plugin B and generate model B. Write interfaces for model A in plugin A, in A's MANIFEST.MF add plugin B as a dependency and generate model A. Now in A.genmodel you'll see links to your main model B.
Upvotes: 1