public void propertyChange(PropertyChangeEvent evt) {
String messageId = evt.getPropertyName();
if (TRANSITION_BENDPOINTS_CHANGED.equals(messageId)) {
refreshVisuals();
} else if (PROPERTY_NAME.equals(messageId) && evt.getSource() instanceof Transition) {
Transition transition = getModel();
if (transition.getSource() instanceof Decision) {
getFigure().setLabelText(transition.getName());
refreshVisuals();
// update decision configuration
Decision decision = (Decision) transition.getSource();
IDecisionProvider provider = CustomizationRegistry.getProvider(decision);
provider.transitionRenamed(decision, (String) evt.getOldValue(), (String) evt.getNewValue());
}
if (transition.getSource() instanceof ITimed) {
ITimed state = (ITimed) transition.getSource();
String labelText = state.timerExist() ? state.getDuration().toString() : "";
getFigure().setLabelText(labelText);
refreshVisuals();
}
} else if (PROPERTY_TIMER_DURATION.equals(messageId)) {
Transition transition = getModel();
if (transition.getName().equals(PluginConstants.TIMER_TRANSITION_NAME)) {
ITimed state = (ITimed) transition.getSource();
getFigure().setLabelText(state.getDuration().toString());
refreshVisuals();
}
} else if (NODE_CHILDS_CHANGED.equals(messageId)) {
refreshChildren();