Generic Event-B EMF extensions: Difference between revisions

From Event-B
Jump to navigationJump to search
imported>Colin
imported>Colin
Line 12: Line 12:
For Serialised Event-B EMF extensions, an abstract, reflective refinement contributor class is provided to simplify the task of making a refinement.
For Serialised Event-B EMF extensions, an abstract, reflective refinement contributor class is provided to simplify the task of making a refinement.


The class is ac.soton.eventb.emf.diagrams.navigator.refiner$AbstractExtensionRefiner which implements IRefinementParticipant.
The class is ac.soton.eventb.emf.core.extension.navigator.refiner.$AbstractExtensionRefiner which implements IRefinementParticipant.
The class should be extended by a client plug-in and the clients class should be registered as a Refinement Participant using the relevant Rodin extension point
The class should be extended by a client plug-in and the clients class should be registered as a Refinement Participant using the relevant Rodin extension point
The client class must implement the method getExtensionID() to return the relevant Exension ID string that identifies such extensions.
The client class must implement the method getExtensionID() to return the relevant Exension ID string that identifies such extensions.

Revision as of 18:12, 7 December 2011

Modelling

Persistence

Navigator

Refinement

AVAILABLE IN NEXT RELEASE

The Rodin platform provides an extension point for contributing behaviour to the 'Refine' action. For Serialised Event-B EMF extensions, an abstract, reflective refinement contributor class is provided to simplify the task of making a refinement.

The class is ac.soton.eventb.emf.core.extension.navigator.refiner.$AbstractExtensionRefiner which implements IRefinementParticipant. The class should be extended by a client plug-in and the clients class should be registered as a Refinement Participant using the relevant Rodin extension point The client class must implement the method getExtensionID() to return the relevant Exension ID string that identifies such extensions. The client class may override populateReferenceMap(Map<>) to add the EReference Features that need to be dealt with, defining which ones are back references to the corresponding abstract element.

The generic refiner class works as follows:

  • All serialised extensions of the given Extension ID in the Rodin resource are loaded
  • Each one is deep cloned using the Ecore copier utility
  • The contents of the extension are then searched for elements that own one of the client supplied EReferences.
  • For each reference, the reference is either set to reference the corresponding source abstract element or copied so that it corresponds to the abstract reference

Diagrams

Generator