|Re: [p2-dev] @noimplement on IMetadataRepository ?|
EMF has the same issue about subclassing EObject/InternalEObject rather than extending the base class, i.e., BasicEObjectImpl or one of its derivatives. Yes, it's a harsh limitation, one we share with IMetaDataRepository and the other Eclipse APIs to which you refer. Of course we could change the generator effectively to copy BasicEObjectImpl into some other class we extend, but that still leaves the client with a copy rather than a reusable base we can modify in the future. In any case, we must realize that an abstract base isn't a panacea for API migration given it's not always possible for an abstract base to implement fully whatever new thing is added to the API, e.g., the EObject.eInvoke API that was added this release.
John Arthorne wrote:
Yes, clients are supposed to subclass AbstractMetadataRepository rather than implementing the interface directly. The restriction is there so that we can add methods to this interface in the future - an interface implemented directly by clients can never be evolved in a compatible way. This sounds like quite a harsh limitation of EMF - many Eclipse APIs are moving towards abstract base classes rather than interfaces to allow for compatible API evolution.