|
Re: Many-valued references in EMF [message #1751077 is a reply to message #1751069] |
Wed, 04 January 2017 10:23 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
You can override org.eclipse.emf.edit.provider.ItemProviderAdapter.isWrappingNeeded(Object) to always return true. In that case, org.eclipse.emf.edit.provider.ItemProviderAdapter.createWrapper(EObject, EStructuralFeature, Object, int) will be called and will hit:
else if (!((EReference)feature).isContainment())
{
value = new DelegatingWrapperItemProvider(value, object, feature, index, adapterFactory);
} And that will ensure that the wrapper knows the parent, but otherwise delegates to the item provider of the value for labels, children, and properties. After all, such a referenced "child" could appear more than once in the tree, so the wrapper ensures each occurrence knows the parent under which it is being shown in the tree.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03454 seconds