Bug 247794 - Make ResourceImpl.ContentsEList<E> public static
Summary: Make ResourceImpl.ContentsEList<E> public static
Status: RESOLVED WONTFIX
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.5.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 247795
  Show dependency tree
 
Reported: 2008-09-18 03:46 EDT by Eike Stepper CLA
Modified: 2009-01-06 05:11 EST (History)
1 user (show)

See Also:


Attachments
Introduce a static base class. (4.21 KB, patch)
2008-12-23 09:27 EST, Ed Merks CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.