public interface IModelChangeHandler
Each time the a model transaction is commited, a IModelChangeEvent
class is computed and given to each
IModelChangeHandler
, and then each IModelChangeListener
that is connected to the modeling session.
A model change handler is used to trigger model changes in reaction to other model changes.
Example of adding a new handler in Modelio.
Modelio.getInstance().getModelingSession().addModelHandler (handler);
MyModelChangeHandler handler = new MyModelChangeHandler(...);
Example of removing an existing handler from Modelio.
Modelio.getInstance().getModelingSession().removeModelHandler (handler);
MyModelChangeHandler handler = ...;
The given IModelChangeEvent
is used to get the delta between the model before the transaction execution and
the model after.
IModelChangeEvent
Modifier and Type | Method and Description |
---|---|
void |
handleModelChange(IModelingSession session,
IModelChangeEvent event)
Invoked when the model has changed.
|
void handleModelChange(IModelingSession session, IModelChangeEvent event)
The session
parameter is the modeling session where the event has occured. modifications. The event
parameter provide the changes made in the model.
session
- The modeling session.event
- Delta between the beginning and the end of the transaction.