Ejemplo n.º 1
0
    def __init__(self, id=None, model=None):
        UML.Presentation.__init__(self, id, model)
        EditableTextSupport.__init__(self)
        StereotypeSupport.__init__(self)

        def update(event):
            self.request_update()

        self._watcher = self.watcher(default_handler=update)

        self.watch("subject").watch(
            "subject.appliedStereotype.classifier.name",
            self.on_element_applied_stereotype,
        )
Ejemplo n.º 2
0
    def __init__(self, id=None):
        UML.Presentation.__init__(self)
        EditableTextSupport.__init__(self)
        StereotypeSupport.__init__(self)

        self._id = id

        # properties, which should be saved in file
        self._persistent_props = set()

        def update(event):
            self.request_update()
        self.watcher = EventWatcher(self, default_handler=update)

        self.watch('subject') \
            .watch('subject.appliedStereotype.classifier.name', self.on_element_applied_stereotype)