Unable to define multiple child creation extenders [message #1851949] |
Fri, 22 April 2022 14:07 |
Bruno Curzi-Laliberté Messages: 14 Registered: January 2022 |
Junior Member |
|
|
Hello all,
I am unable to define multiple child creation extenders for my metamodel.
I can do so once, but not twice, no matter how simple the extension is.
Let me give the simplest example with 3 metamodels.
A = base, B/C = extenders.
In A I define classes 1,2,3, 1 owns a reference to a 2 and a 3
In metamodels B and C, after adding a dependency to metamodel A, I define respectively classes extending 2 and 3
In my editor I can create a model of type A with a root element of type 1, right click add child and I can see 2,3 and the class extending 3 but not the class extending 2. Its as if whatever project extends A last has precedence over whatever extensions others declare.
Note that in my example there should be no conflict as metamodels B and C extend classes 2 and 3, I don't see how this could happen, I saw some bug reports linked in similar posts but didn't understand how to manually fix the models as indicated.
I will attach a zip containing the 3 models, I tested on my end that I can generate All and run as eclipse application successfully and reproduce the issue, you should be able to create children of type NewEClass2, NewClass3 & Ext2 but not of type Ext.
I noticed some errors in console but don't know what to make of it.
!ENTRY org.eclipse.emf.ecore 2 0 2022-04-22 10:05:38.888
!MESSAGE Both 'A' and 'B' register a package for 'http://www.example.org/a'
!ENTRY org.eclipse.emf.ecore 2 0 2022-04-22 10:05:38.894
!MESSAGE Both 'B' and 'C' register a package for 'http://www.example.org/a'
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
!ENTRY org.eclipse.emf.ecore 2 0 2022-04-22 10:05:43.880
!MESSAGE a.impl.AFactoryImpl cannot be cast to a.AFactory
!STACK 0
java.lang.ClassCastException: a.impl.AFactoryImpl cannot be cast to a.AFactory
at a.impl.AFactoryImpl.init(AFactoryImpl.java:30)
[Updated on: Fri, 22 April 2022 14:07] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03958 seconds