extension.setExtendedObject((EObject)extendedObject);
extension.setExtensionObject((EObject)extensionObject);
ExtensionmodelAdapterFactory adapterFactory = new ExtensionmodelAdapterFactory();
ExtendedObjectAdapter extAdptr = (ExtendedObjectAdapter) adapterFactory.createExtendedObjectAdapter();
extAdptr.setExtension(extension);
extAdptr.setNamespace(getNamespace());
adaptEObject((EObject)extendedObject,extAdptr);
adapterFactory.adapt(extension,ExtensionAdapterImpl.class);