Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311081

Summary: Extension point for a lifting participant
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTEquinoxAssignee: Marco Mosconi <marco>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 0.7   
Target Milestone: 0.7   
Hardware: Other   
OS: All   
Whiteboard: trac
Attachments:
Description Flags
new extension point for lifting participant none

Description Stephan Herrmann CLA 2010-04-29 14:09:54 EDT
(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.
Comment 1 Marco Mosconi CLA 2010-06-22 17:59:09 EDT
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).
Comment 2 Marco Mosconi CLA 2010-06-22 18:09:55 EDT
Implementation has been committed as r528.
Comment 3 Stephan Herrmann CLA 2010-06-27 05:41:58 EDT
Verified to work as specified using build 201006261251.
Thanks!