[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: EPackage.Registry

Ed,

It just checks whether the value in the registry is an instance of EPackage and not Descriptor. If it's EPackage that meant that it was resolved
The chunk of the code below is what's broken.


for (Iterator iter = EPackage.Registry.INSTANCE.values().iterator(); iter.hasNext();)
{
Object next = iter.next();

if (next instanceof EPackage) {
// skip descriptors because if the EPackage hasn't been
// instantiated then it cannot be in use by the client
EPackage pkg = (EPackage) next;

if (pkgName.equals(pkg.getName()))
{
result = findElement(pkg, id);
if (result != null) {
// register the package for subsequent look-ups
register(pkg, null);
break;
}
}
}


Thanks.

Cheers,
Alex