private ExtendedPropertiesAdapter getTargetRuntimeAdapter(EClass eclass) {
   PropertyExtensionDescriptor ped =
       TargetRuntime.getCurrentRuntime().getPropertyExtension(eclass.getInstanceClass());
   if (ped == null && TargetRuntime.getCurrentRuntime() != TargetRuntime.getDefaultRuntime())
     ped = TargetRuntime.getDefaultRuntime().getPropertyExtension(eclass.getInstanceClass());
   if (ped != null) return ped.getAdapter(adapterFactory, eclass);
   return null;
 }
 private ExtendedPropertiesAdapter getTargetRuntimeAdapter(EObject object) {
   PropertyExtensionDescriptor ped =
       TargetRuntime.getCurrentRuntime().getPropertyExtension(object.getClass());
   if (ped == null && TargetRuntime.getCurrentRuntime() != TargetRuntime.getDefaultRuntime())
     ped = TargetRuntime.getDefaultRuntime().getPropertyExtension(object.getClass());
   if (ped != null) return ped.getAdapter(adapterFactory, object);
   return null;
 }
 public Bpmn2ExtendedPropertiesSwitch(AdapterFactory adapterFactory) {
   super();
   this.adapterFactory = adapterFactory;
   // This adapter can handle the <propertyExtension>s from foreign models also!
   for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
     for (PropertyExtensionDescriptor ped : rt.getPropertyExtensions()) {
       AdapterRegistry.INSTANCE.registerFactory(ped.getInstanceClass(), adapterFactory);
     }
   }
 }