@Override
public boolean update(IUpdateContext context) {
IPeService service = Graphiti.getPeService();
EventBasedGateway gateway = (EventBasedGateway) getBusinessObjectForPictogramElement(context
.getPictogramElement());
clearGateway(context.getPictogramElement());
if (gateway.isInstantiate()) {
if (gateway.getEventGatewayType() == EventBasedGatewayType.PARALLEL) {
drawParallelMultipleEventBased((ContainerShape) context.getPictogramElement());
} else {
drawExclusiveEventBased((ContainerShape) context.getPictogramElement());
}
} else {
drawEventBased((ContainerShape) context.getPictogramElement());
}
service.setPropertyValue(context.getPictogramElement(), EventBasedGatewayFeatureContainer.INSTANTIATE_PROPERTY,
Boolean.toString(gateway.isInstantiate()));
service.setPropertyValue(context.getPictogramElement(),
EventBasedGatewayFeatureContainer.EVENT_GATEWAY_TYPE_PROPERTY, gateway.getEventGatewayType().getName());
return true;
}