Changeset 2269
- Timestamp:
- 03/13/08 11:17:56 (2 months ago)
- Files:
-
- gaphor/trunk/gaphor/adapters/states/propertypages.py (modified) (3 diffs)
- gaphor/trunk/gaphor/diagram/states/transition.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/gaphor/adapters/states/propertypages.py
r2251 r2269 8 8 import gtk 9 9 10 from gaphor.core import _, transactional 10 from gaphor.core import _, inject, transactional 11 from gaphor import UML 11 12 from gaphor.diagram import items 12 13 from gaphor.ui.interfaces import IPropertyPage … … 18 19 Transition property page allows to edit guard specification. 19 20 """ 21 element_factory = inject('element_factory') 20 22 21 23 interface.implements(IPropertyPage) … … 50 52 def _on_guard_change(self, entry): 51 53 value = entry.get_text().strip() 52 self.context.set_guard(value) 54 subject = self.context.subject 55 if subject.guard is None: 56 subject.guard = self.element_factory.create(UML.Constraint) 57 subject.guard.specification = self.element_factory.create(UML.LiteralSpecification) 58 subject.guard.specification.value = value 53 59 54 60 gaphor/trunk/gaphor/diagram/states/transition.py
r2264 r2269 4 4 5 5 from gaphor import UML 6 from gaphor.core import inject 6 7 from gaphor.diagram.diagramline import NamedLine 7 8 from gaphor.diagram.style import ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP … … 12 13 Representation of state transition. 13 14 """ 14 15 15 __uml__ = UML.Transition 16 16 … … 63 63 64 64 65 def set_guard(self, value):66 self.subject.guard.specification.value = value67 self._guard.text = value68 69 70 65 # vim:sw=4:et:ai
