Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311081 - Extension point for a lifting participant
Summary: Extension point for a lifting participant
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTEquinox (show other bugs)
Version: 0.7   Edit
Hardware: Other All
: P3 enhancement (vote)
Target Milestone: 0.7   Edit
Assignee: Marco Mosconi CLA
QA Contact:
URL:
Whiteboard: trac
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-29 14:09 EDT by Stephan Herrmann CLA
Modified: 2010-06-29 10:31 EDT (History)
0 users

See Also:


Attachments
new extension point for lifting participant (14.41 KB, patch)
2010-06-22 17:59 EDT, Marco Mosconi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!