This example demonstrates how to write participants that contribute changes when a fragment is created or absorbed.
To install this example, open the examples wizard: File -> New -> Example. Then select Fragment Participant Example under the RMP (Rational Modeling Platform) Plug-ins -> UML Modeler Plug-ins category.
This example contains example implementations of ModelerCreateFragmentParticipant and ModelerAbsorbFragmnetParticipant. They create SampleFragmentChange objects which write an informational message to the log describing the element which is being fragmented or absorbed.
The participants are invoked when fragments are created or absorbed. For example, to create a fragment, create a Model and a Package within that Model. From the context menu of the Package, choose "Refactor > Create Fragments..." Click the "Preview" button in the ensuing dialog. You will be able to preview the change(s) created by the participant.
For more information, please see the refactoringParticipant schema defined in com.ibm.xtools.modeler.ui.