Пример #1
0
            public override SequenceDiagramViewModel VisitNote([NotNull] NoteContext context)
            {
                // Extract actors
                ActorViewModel[] actors = GetActors(context.actor(), context.actorPair());
                if (actors == null || actors.Any(a => a == null))
                {
                    m_errorListener.GrammarError("Notes must be declared relative to an actor. e.g. Note left of A: Message");
                    return(null);
                }

                // Extract placement of note
                SequenceNotePlacement placement = GetPlacement(context.placement());

                // Extract the note's message
                string message = GetMessage(context.message());

                // Combine into a note
                SequenceDiagram.AddNote(actors, placement, message);
                return(SequenceDiagram);
            }