{
      EcoreFactory theEcoreFactory = (EcoreFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/2002/Ecore"); 
      if (theEcoreFactory != null)
      {
        return theEcoreFactory;
      }
    }