Rewrite SequenceDiagram listener implementation