protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlStartingLinesAttribute att) { var append = att.StartingLines; if (string.IsNullOrEmpty(append)) { return; } switch (att.LineKind) { case ClassLineKind.Dot: append += "\n.."; break; case ClassLineKind.Double: append += "\n=="; break; case ClassLineKind.Single: append += "\n--"; break; case ClassLineKind.SingleBold: append += "\n__"; break; } info.AppendStartingLines(append); }
public void Visit(UmlDiagram diagram, UmlEntity info) { if (info.Name == info.Type.Name) { info.Name = info.Name.CamelToNormal(OnlyFirstUpper); } }
protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlAddImplementedInterfacesToDiagramAttribute att) { var typesToAdd = info.Type.GetInterfaces(); foreach (var type in typesToAdd) { diagram.UpdateTypeInfo(type, null); } }
protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlAddTypesToDiagramAttribute att) { if (att.Types == null || att.Types.Length == 0) { return; } foreach (var type in att.Types) { diagram.UpdateTypeInfo(type, null); } }
public void Visit(UmlDiagram diagram, UmlEntity info) { var isStruct = info.Type.IsStruct(); if (!isStruct) { return; } info.Spot = info.Spot ?? new UmlSpot(); info.Spot.InCircle = "S"; info.Spot.CircleBackgroundColor = CircleBackgroundColor; }
public override void Visit(UmlDiagram diagram, UmlEntity info) { if (!info.Type.IsSealed) { return; } var el = OpenIconicKind.Paperclip.AsPlantUmlText(); el = AddStyle(el); var s = new SymbolInfo("sealed", el, "Sealed class"); AddIcon(diagram, s); AddIcon(info, s); }
public static void AddIcon(UmlEntity info, SymbolInfo symbolInfo) { var list = info.Members; var existing = list .OfType <SymbolLineUmlMember>() .FirstOrDefault(); if (existing is null) { existing = new SymbolLineUmlMember(); list.Add(existing); } existing.AddSymbol(symbolInfo.SymbolText); }
protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlAddRelationAttribute att) { var rel = new UmlRelation { Left = new UmlRelationEnd(diagram.GetTypeName(info.Type)), Right = new UmlRelationEnd(diagram.GetTypeName(att.RelatedType)), Arrow = UmlRelationArrow.MkArrow(att, att.Multiple), Label = att.Name } .WitCreatorMeta <UmlAddRelationAttributeVisitor>(info.Type, att.RelatedType) .WithNote(att); rel.Tag = att.Tag; diagram.Relations.Add(rel); if (att.ForceAddToDiagram) { diagram.UpdateTypeInfo(att.RelatedType, null); } }
protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlNoteAttribute att) { info.AddNote(att); }
protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlPackageAttribute att) { info.PackageName = att.PackageName; }
public abstract void Visit(UmlDiagram diagram, UmlEntity info);