|
Re: Merging two Sirius models [message #1828819 is a reply to message #1828809] |
Fri, 19 June 2020 08:35 |
|
Hi Avi,
There are several approaches which are possible right now depending on your context:
* A single Sirius project/session can reference as many separate semantic models as you want, and they can be of different types. You can have both ".melodymodeler" and ".safety" (or whatever) inside the same Sirius project/session, and they can reference each other (or not) at the semantic level if it makes sense. This approach is often used to "augment" or "decorate" an existing model without changing its metamodel: you can keep a "core" model clean, and store separately another model which references elements in the core with additional information. Once both are loaded inside the Sirius session, you can navigate both ways and have your Sirius representations which take all the information into account.
* If having separate files for the different models is a problem (as it opens the possibility for inconsistencies if they are not always saved together), you can put multiple models right inside the same file. EMF and Sirius support it (Resources with multiple roots), but some tools sometimes assume a Resource has a single root and will not "see" the other ones.
* I know KitAlpha, which is used to implement Capella, offers lower-level mechanisms to extends existing metamodels with additional "viewpoints" without modifying them, but I'm not familiar enough with this to give mode details. See https://www.eclipse.org/kitalpha/ for more details.
* Finally, Sirius supports the notion of FeatureExtension. It is not well documented, but it is an extension point that you can use to put additional data directly inside Sirius's aird models. It is normally used to store information which are more related to how users want to display/customize your Sirius representations than to store actual semantic information. See the org.eclipse.sirius.featureExtensions extension point and org.eclipse.sirius.business.api.featureextensions.FeatureExtensionsManager.
Hope this helps,
Pierre-Charles David
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.04405 seconds