[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] Re: EPackage.Registry
|
- From: Eike Stepper <stepper@xxxxxxxxxx>
- Date: Wed, 06 May 2009 20:57:45 +0200
- Newsgroups: eclipse.tools.emf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
Alex Boyko schrieb:
> 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()))
Are you aware that the package name is not required to be unique in a
registry?
Cheers
/Eike
----
http://thegordian.blogspot.com
> {
> result = findElement(pkg, id);
> if (result != null) {
> // register the package for subsequent look-ups
> register(pkg, null);
> break;
> }
> }
> }
>
> Thanks.
>
> Cheers,
> Alex
>
>