Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EFactoryImpl.create query
EFactoryImpl.create query [message #1783745] Fri, 16 March 2018 13:46 Go to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

Why does EFactoryImpl.create climb the eSuperType hierarchy looking for an EClass with an instance class name, and if found create that instead. This seems to give an asymmetry between genmodelled and dynamic execution where for the genmodeled case I have EObject as a first super and an interface with instance class as the second super. In contrast dynamically, there is no EObject first super and so the creation fails at the attempt to create the abstract interface.

Regards

Ed Willink

Re: EFactoryImpl.create query [message #1783763 is a reply to message #1783745] Fri, 16 March 2018 16:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29545
Registered: July 2009
Senior Member
If there is a super type with an instance class set, a created instance of that EClass (and hence of any EClass sublcasses) must also be an instance of that EClass's instance class. So clearly it's necessary to create an instance based an EClass with a instance class set (which will of course generally be a generated implementation class); if there is no such EClass amoung the super types, any EObject implementation will suffice. Are you questioning the need for finding such an EClass or questioning the (simple, obvious, efficient) algorithm by which its chosen becomes in some specific model you've decided to explicitly extend EObject and decided to make it first as well.
Re: EFactoryImpl.create query [message #1783770 is a reply to message #1783763] Fri, 16 March 2018 17:33 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

Oops. Sorry my bad. My Java 'interface' class was actually an 'abstract class'.

Regards

Ed Willink
Re: EFactoryImpl.create query [message #1783786 is a reply to message #1783770] Sat, 17 March 2018 09:56 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

My bad again. I was confusing create and createInstance while attempting to create a repro.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=532561 raised.

Regards

Ed Willink
Previous Topic:CDO/net4j communication
Next Topic:[CDO] Way to open and close repository thanks to an admin repository
Goto Forum:
  


Current Time: Sat Sep 22 17:36:12 GMT 2018

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

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

Back to the top