public IAddFeature getAddFeature(IAddContext context) {
if (context.getNewObject() instanceof StartEvent) {
if (context.getNewObject() instanceof AlfrescoStartEvent) {
return new AddAlfrescoStartEventFeature(this);
} else {
StartEvent startEvent = (StartEvent) context.getNewObject();
if (startEvent.getEventDefinitions().size() > 0) {
if (startEvent.getEventDefinitions().get(0) instanceof TimerEventDefinition) {
return new AddTimerStartEventFeature(this);
} if (startEvent.getEventDefinitions().get(0) instanceof MessageEventDefinition) {
return new AddMessageStartEventFeature(this);
} else {
return new AddErrorStartEventFeature(this);
}
} else {