Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to refer two different meta models (like autosar422 and 446)in one project
How to refer two different meta models (like autosar422 and 446)in one project [message #1821522] Fri, 14 February 2020 05:22 Go to next message
Ramesh Javalagatti is currently offline Ramesh JavalagattiFriend
Messages: 17
Registered: November 2018
Junior Member
In my eclipse modeling project I am trying to access two different autosar meta models(autosar446 and autosar422), but the meta model descriptor id for both version is same, so how can I use both within the same project (I observed that since the id is same emf.sphinx is unable to differentiate the model).
Re: How to refer two different meta models (like autosar422 and 446)in one project [message #1821523 is a reply to message #1821522] Fri, 14 February 2020 06:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
It sounds like a Sphinx question best asked in the Sphinx forum:

https://www.eclipse.org/forums/index.php/f/171/

EMF itself registers models (in EPackage.Registry.INSTANCE) via the nsURI and those must be unique; there's no "id" involved.



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to refer two different meta models (like autosar422 and 446)in one project [message #1821524 is a reply to message #1821522] Fri, 14 February 2020 06:30 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I assume by "meta model descriptor id" you mean the namespace URI, such as

in Ecore: <ecore:EPackage ... nsURI="http://www.eclipse.org/emf/2002/Ecore" ...>

in UML: <uml:Package ... URI="http://www.omg.org/spec/UML/20131001 ...">

These are the fundamental identity and cannot have duplicates. If there are duplicates, you will find that as when two people have the same same passport number, different institutions will misbehave in unpredictable ways. Since UML has changed, UML uses a timestamp to disambiguate. Ecore has successfully achieved upward compatibility for evolution and so has a frozen URI.

In many EMF tools metamodel schizophrenia sets in when 'duplicates' are loaded and perhaps catastrophic, perhaps obscure failures result. For OCL-based two tools the two metamodels will be merged as one giving differently stupid results.

As a minimum you should report the mega-incompetence to the Autosar authorities. You can workaround the issue by re-URI-ing at least one of the conflicts.

However I suspect that this may just be a misunderstanding on your part.

Regards

Ed Willink

Previous Topic:Eclipse crashes when editing Ecore models
Next Topic:Thanks for Jet Editor
Goto Forum:
  


Current Time: Fri Mar 29 08:58:54 GMT 2024

Powered by FUDForum. Page generated in 0.04034 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top