Skip to content

Commit

Permalink
feat(diagram): Add Property styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Oct 16, 2023
1 parent f32f27f commit 911b484
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions capellambse/diagram/_styleclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def _region(obj: model.ModelObject) -> str:
return f"{parent_xclass}{_default(obj)}"


def _property(obj: model.ModelObject) -> str:
assert isinstance(obj, model.information.Property)
return obj.kind.name.capitalize()


_STYLECLASSES: dict[str, cabc.Callable[[model.ModelObject], str]] = {
"Association": _association,
"CapellaIncomingRelation": lambda _: "RequirementRelation",
Expand All @@ -130,6 +135,7 @@ def _region(obj: model.ModelObject) -> str:
"Part": _part,
"PhysicalComponent": _physical_component,
"PhysicalPort": lambda _: "PP",
"Property": _property,
"PortAllocation": _port_allocation,
"Region": _region,
"SystemComponent": _generic_component,
Expand Down

0 comments on commit 911b484

Please sign in to comment.