Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317234 - Child Creator Extender and multiple inheritance seems broken
Summary: Child Creator Extender and multiple inheritance seems broken
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Edit (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-17 15:19 EDT by Hallvard Traetteberg CLA
Modified: 2013-07-10 11:26 EDT (History)
1 user (show)

See Also:


Attachments
Set of minimal plugin projects with minimal models that has this problem (210.93 KB, application/x-zip)
2010-06-17 15:19 EDT, Hallvard Traetteberg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hallvard Traetteberg CLA 2010-06-17 15:19:32 EDT
Created attachment 172152 [details]
Set of minimal plugin projects with minimal models that has this problem

I try to use extensible provider factory and child creator extenders, so a foreign model's classes can be intantiated as children of base model. However, my use of multiple inheritance, seems to confuse the mechanism. Using the debugger, it seems the doSwitch method in the base model's Switch, does not find a superclass since it's not in the main supertype chain.

I have created (and attached) a set of minimal plugin projects with minimal models that has this problem. If you create a new file with a Container at the root and with a Composite inside, you'll see that you can create a Problem instance inside the Cointainer, but not inside Composite. Both Container and Composite inherit from AbstractContainer, which has the feature into which the Problem instances is supposed to be added.
Comment 1 Ed Merks CLA 2011-11-30 03:43:38 EST
The example seems not very minimal.  I also get a compile error in WazaabiItemProviderAdapterFactory where WazaabiPackage is imported twice. Two packages with the same name makes the example all the more confusing. :-(

It looks like there really needs to be a generated helper for the SWT Wasaabi package because inheritance alone isn't going to do the tree.  I'll look more closely at the templates and the GenModel code to see if this is relatively easy to fix...
Comment 2 Ed Merks CLA 2013-01-08 12:23:40 EST
A fix is committed to master:

http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=032ebfeb72ed4a7f8c5744cac974b970fd4f79bc

Note that the Wazzabi SWT model didn't declare it needed an extensible provider factory.
Comment 3 Ed Merks CLA 2013-07-10 11:26:14 EDT
The changes are available in Kepler.