log("Both '" + previous.getContributor().getName() + "' and '" + element.getContributor().getName() + " register a package registry implementation");
log("Both '" + previous.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package registry implementation");
    public void start(BundleContext context) throws Exception    {      super.start(context);      if (System.getProperty("org.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin") == null &&            Platform.getBundle("org.eclipse.core.resources") != null)      {        workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();      }      new RegistryReader        (Platform.getExtensionRegistry(),         EcorePlugin.getPlugin().getBundle().getSymbolicName(),          PACKAGE_REGISTRY_IMPLEMENTATION)      {        IConfigurationElement previous;        protected boolean readElement(IConfigurationElement element)        {          if (element.getName().equals("registry"))          {            String implementationClass = element.getAttribute("class");            if (implementationClass == null)            {              logMissingAttribute(element, "class");            }            else            {              if (defaultRegistryImplementation != null)              {                if (previous != null)                {                  log("Both '" + previous.getContributor().getName() + "' and '" + element.getContributor().getName() + " register a package registry implementation");                }                if (defaultRegistryImplementation instanceof EPackageRegistryImpl.Delegator)                {                  return false;                }              }              try              {                defaultRegistryImplementation = (EPackage.Registry)element.createExecutableExtension("class");                previous = element;              }              catch (CoreException exception)              {                log(exception);              }              return true;            }          }          return false;        }              }.readRegistry();      new GeneratedPackageRegistryReader(getEPackageNsURIToGenModelLocationMap()).readRegistry();      new FactoryOverrideRegistryReader().readRegistry();      new ExtensionParserRegistryReader().readRegistry();      new ProtocolParserRegistryReader().readRegistry();      new URIMappingRegistryReader().readRegistry();    }