EndEvent endEvent = (EndEvent) context.getNewObject();
for (EventDefinition eventDefinition : endEvent.getEventDefinitions()) {
if (eventDefinition instanceof ErrorEventDefinition) {
return new AddErrorEndEventFeature(this);
} else if (eventDefinition instanceof TerminateEventDefinition) {
return new AddTerminateEndEventFeature(this);
}
}
return new AddEndEventFeature(this);
} else if (context.getNewObject() instanceof SequenceFlow) {