Skip to content

Commit

Permalink
fix: Activity Diagram: Style of multiline Box
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudroques committed Feb 26, 2024
1 parent f385bc0 commit 6c945e2
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@
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<ActivityDiagram3> {
@@ -84,10 +85,16 @@ protected CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines
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);
}
}

0 comments on commit 6c945e2

Please sign in to comment.