Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 178708

Summary: EditingDomain.getNewChildDescriptors() should return Collection<?>
Product: [Modeling] EMF Reporter: Dave Steinberg <davidms>
Component: EditAssignee: Dave Steinberg <davidms>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P1    
Version: 2.3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dave Steinberg CLA 2007-03-21 21:32:46 EDT
The EditingDomain.getNewChildDescriptors() API was intended to be generic and flexible. The idea was to allow an item provider to use arbitrary objects as descriptors for the children that can be created. When those same descriptors are passed back to createCommand(), the item provider knows what they are and how to interpret them. The default ItemProviderAdapter implentation knows how to deal with CommandParameters, but that was never intended to be exposed in the API.

When generics were introduced into the API, the return type was mistakenly changed to Collection<CommandParameter>. It should have been the more generic Collection<?>. The same is true for IEditingDomainItemProvider.getNewChildDescriptors() and its implementations. Similarly, the ItemProviderAdapter.collectNewChildDescriptors() template method should take a Collection<Object> argument, since the method's overrides must be able to add to it.

Downstream clients should be aware that this change will also need to be reflected in the collectNewChildDescriptors() override generated in each item provider, as well as in the selectionChanged(), generateCreateChildActions() and generateCreateSiblingActions() methods of generated action bar contributors. The templates must be updated and all code regenerated, since the change is source-incompatible.
Comment 1 Dave Steinberg CLA 2007-03-21 23:05:28 EDT
The change has been committed to CVS.
Comment 2 Nick Boldt CLA 2007-04-03 09:50:41 EDT
Fixed in I200703221305.
Comment 3 Nick Boldt CLA 2008-01-28 16:40:31 EST
Move to verified as per bug 206558.