Reference Model A classes in Model B without regenerating Model A [message #1803209] |
Mon, 25 February 2019 10:48 |
Lars D Messages: 7 Registered: September 2018 |
Junior Member |
|
|
I am trying to reference an ecore Model A in another ecore Model B.
A class in Model A is e.g. ClassA in packageA.
A second class ClassB in ModelB should use ClassA as a ESuper Type.
The generated ClassA of Model A contains code that is not generated (marked @generated NOT).
I can load the Model A in Model B via the "Load Resource..." wizard. I then can use the ClassA as a Esuper Type for ClassB.
When I open the .genmodel of ModelB it offers me to generate packageA as well as packageB.
However I only want to generate packageB that contains ClassB. ClassA should be referenced from another plugin where it was already generated.
This seems like a simple problem. A class in Model B should reference a class in Model A in another package that is in another plugin.
For Example I have a generated package from Model A with the name "org.mydomain.modelA" which contains Class A.
My second package from Model B should be generated as "org.mydomain.modelB". The ClassB in this package should import the generated ClassA as "import org.mydomain.modelA.ClassA".
[Updated on: Mon, 25 February 2019 10:50] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Reference Model A classes in Model B without regenerating Model A [message #1803298 is a reply to message #1803291] |
Tue, 26 February 2019 13:13 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Lars, when you sayQuote:Another important aspect is to set the All->Bundle Manifest Property of the B.genmodel to false. Otherwise it will update the exported packages to include the generated packages from Model A, which are located in another plugin. it seems clear to me that you still have not properly configured your B.genmodel to use A.genmodel. Do that properly and you won't have any problems like what you're describing.
From the context menu of B.genmodel, invoke Reload... When you get to the last page "Package Selection" use the Add... button to load A.genmodel and then checkmark the packageA which will remove packageA from the "Root packages" viewer. Best you do this and avoid all future problems that you are likely to have....
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.35431 seconds