Community
Participate
Working Groups
(Originally from https://trac.objectteams.org/ot/ticket/290) The mechanism of a lifting participant is currently controlled by a Java property, which is not appropriate for OT/Equinox, one of the reasons being that it would be unclear where to search for the specified class. Therefore, OT/Equinox should provide an extension point for registering a lifting participant. By the current design this extension point would be restricted to at most 1 instance of ILiftingParticipant.
Created attachment 172471 [details] new extension point for lifting participant org.eclipse.objectteams.otequinox provides the requested extension point: org.eclipse.objectteams.otequinox.liftingParticipant A registered extension is detected in org.eclipse.objectteams.otequinox.TransformerPlugin#loadLiftingParticipant() but here we take no further action because accessing class org.objectteams.Team at this point would disturb the bundle loading order. Instead we wait until org.eclipse.objectteams.otequinox.internal.hook.TransformerHook#recordClassDefine() detects loading of class org.objectteams.Team. At this point we call back to org.eclipse.objectteams.otequinox.TransformerPlugin#initializeOOTeam() to finish the installation of the lifting participant. Finally, OTRE's class org.eclipse.objectteams.otre.LiftingParticipantTransformation must be able to handle these two scenarios: - (old:) a lifting participant is installed by setting a java property - (new:) a lifting participant is installed directly into field org.objectteams.Team._OT$liftingParticipant In either case, all team classes with liftTo methods need transforming. (It is an error if both methods are used together).
Implementation has been committed as r528.
Verified to work as specified using build 201006261251. Thanks!