"""
Generalization --
"""

from gi.repository import GObject

from gaphor import UML
from gaphor.diagram.diagramline import DiagramLine


class GeneralizationItem(DiagramLine):

    __uml__ = UML.Generalization
    __relationship__ = "general", None, "specific", "generalization"

    def __init__(self, id=None, model=None):
        DiagramLine.__init__(self, id, model)

    def draw_head(self, context):
        cr = context.cairo
        cr.move_to(0, 0)
        cr.line_to(15, -10)
        cr.line_to(15, 10)
        cr.close_path()
        cr.stroke()
        cr.move_to(15, 0)

@@ -94,191 +94,272 @@
 hor.
-diagram.diagramline import DiagramLine%0A%0A%0Aclass GeneralizationItem(DiagramLine):%0A%0A    __uml__ = UML.Generalization%0A    __relationship__ = %22general%22, None, %22specific%22, %22generaliz
+UML.modelfactory import stereotypes_str%0Afrom gaphor.diagram.presentation import LinePresentation%0Afrom gaphor.diagram.shapes import Box, Text%0Afrom gaphor.diagram.support import represents%0A%0A%0A@represents(UML.Generalization)%0Aclass GeneralizationItem(LinePresent
 ation
-%22%0A
+):
 %0A   
@@ -412,44 +412,291 @@
     
-DiagramLine.__init__(self, id, model
+super().__init__(id, model)%0A%0A        self.shape_middle = Box(%0A            Text(%0A                text=lambda: stereotypes_str(self.subject),%0A                style=%7B%22min-width%22: 0, %22min-height%22: 0%7D,%0A            )%0A        )%0A        self.watch(%22subject.appliedStereotype.classifier.name%22
 )%0A%0A 

Use new line style for Generalization item