Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 def _undo_delete_event():
     factory._elements[element.id] = element
     self.event_manager.handle(ElementCreateEvent(factory, element))
Esempio n. 4
0
 def _undo_delete_event():
     factory._elements[element.id] = element
     self.component_registry.handle(ElementCreateEvent(factory, element))