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

Bug 247794

Summary: Make ResourceImpl.ContentsEList<E> public static
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: smcduff
Version: 2.5.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 247795    
Attachments:
Description Flags
Introduce a static base class. none

Description Eike Stepper CLA 2008-09-18 03:46:19 EDT
We'd like to reuse the functionality of this list in a Resource implementation that does not extend ResourceImpl.
Comment 1 Ed Merks CLA 2008-09-18 07:55:08 EDT
I think I'd rather understand why you aren't extending it.  The API definition for Resource says:

 * Clients must extend the default {@link org.eclipse.emf.ecore.resource.impl.ResourceImpl implementation},
 * or one of its derived classes,
 * since methods can and will be added to this API.
Comment 2 Eike Stepper CLA 2008-09-18 08:08:08 EDT
Oh, you're so mean!! :P

I suggest to modify the JavaDoc:
1) Add more p and b tags to ease the reading
2) Give an explicit guarantee that the framework will never cast to ResourceImpl

With 2) we can at least conciously decide to take over responsibility of keeping up with interface changes ourselves ;-)
Comment 3 Ed Merks CLA 2008-12-23 09:27:37 EST
Created attachment 121138 [details]
Introduce a static base class.

I feel like I'm pandering to the wicked since I really don't want Resources to be EObjects.  This solution is not quite ideal.  I could add eNotificationRequired to Resource.Internal, but adding setLoaded is hard because the method is protected in the Impl and if I make it public, it can break downstream clients.

Is this still useful?  At least you don't have to copy the whole class...
Comment 4 Ed Merks CLA 2008-12-23 09:35:40 EST
Maybe BasicEContentsList is a better name...
Comment 5 Ed Merks CLA 2009-01-06 05:11:59 EST
I'll return this as won't fix for the time being until I know for sure that you guys need this and will use it.  Please reopen if that's the case.