Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-ocl.dev] API reviews

On 04/02/2015 12:44, Ed Willink wrote:
OCL.newInstance(EPackage.Registry) now creates a very lightweight OCL,
understanding only the nsURIs in the EPackage.Registry (and any delegates).

OCL.newInstance(ResourceSet) no longer creates a distinct
externalResourceSet.
Hi Ed,

I've been thinking about this. As you may check from test cases, most OCL.newInstance(EPackage.Registry) usages come from doing ResourceSet.getPackageRegistry, which turns into returning a OCL instance with a distinct externalResourceSet.

IMHO, users normally deal with ResourceSets and Resources, and they configure ResourceSet package registry as they need. Do you think that OCL.newInstance(EPackage.Registry) is really needed, and instead, shouldn't we just forcing them to deal with the OCL.newInstance(ResourceSet) one ? Do we want to give an open door to users to mess up with the resourceSets they think they are using ?. If so, at least, we should clearly document it in the OCL.newInstance(EPackage.Registry) method.

Cheers,
Adolfo.


Back to the top