def create(self, type): """ Create a new model element of type ``type``. """ obj = super(ElementFactoryService, self).create(type) self.component_registry.handle(ElementCreateEvent(self, obj)) return obj
def create(self, type): """ Create a new model element of type ``type``. """ obj = self.create_as(type, str(uuid.uuid1())) self.handle(ElementCreateEvent(self, obj)) return obj
def _undo_delete_event(): factory._elements[element.id] = element self.event_manager.handle(ElementCreateEvent(factory, element))
def _undo_delete_event(): factory._elements[element.id] = element self.component_registry.handle(ElementCreateEvent(factory, element))