From 6c945e2508936d710789e4d6071ffb6122b953bc Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 26 Feb 2024 22:50:31 +0100 Subject: [PATCH] fix: Activity Diagram: Style of multiline Box https://github.com/plantuml/plantuml/issues/1697 --- .../activitydiagram3/command/CommandActivityLong3.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java index 397f6f977..530e1f43e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java @@ -49,6 +49,7 @@ import net.sourceforge.plantuml.regex.IRegex; import net.sourceforge.plantuml.regex.RegexConcat; import net.sourceforge.plantuml.regex.RegexLeaf; import net.sourceforge.plantuml.regex.RegexResult; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.utils.BlocLines; public class CommandActivityLong3 extends CommandMultilines3 { @@ -84,10 +85,16 @@ public class CommandActivityLong3 extends CommandMultilines3 { final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); final RegexResult lineLast = getPatternEnd2().matcher(lines.getLast().getString()); + final String end = lineLast.get("END", 0); + Stereotype stereotype = null; + String stereo = lineLast.get("END", 1); + if (stereo != null) + stereotype = Stereotype.build(stereo); + final BoxStyle style = BoxStyle.fromString(end); lines = lines.removeStartingAndEnding(line0.get("DATA", 0), end.length()); - return diagram.addActivity(lines.toDisplay(), style, null, colors, null); + return diagram.addActivity(lines.toDisplay(), style, null, colors, stereotype); } }