diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java index 0f1fca62d..183d130ed 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java @@ -61,7 +61,7 @@ public class CommandActivity3 extends SingleLineCommand2 { public static final String endingGroup() { return "(" // - + ";(?:[%s]*\\<\\<\\w+\\>\\>)?" // + + ";(?:[%s]*(\\<\\<\\w+\\>\\>))?" // + "|" // + Matcher.quoteReplacement("\\\\") // that is simply \ character + "|" // @@ -77,7 +77,7 @@ public class CommandActivity3 extends SingleLineCommand2 { private static final String endingGroupShort() { return "(" // - + ";(?:[%s]*\\<\\<\\w+\\>\\>)?" // + + ";(?:[%s]*(\\<\\<\\w+\\>\\>))?" // + "|" // + Matcher.quoteReplacement("\\\\") // that is simply \ character + "|" // @@ -130,13 +130,19 @@ public class CommandActivity3 extends SingleLineCommand2 { } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); - final String stereo = arg.get("STEREO", 0); + String stereo = arg.get("STEREO", 0); + if (stereo == null) + stereo = arg.get("STYLE", 1); + Stereotype stereotype = null; if (stereo != null) { stereotype = Stereotype.build(stereo); colors = colors.applyStereotype(stereotype, diagram.getSkinParam(), ColorParam.activityBackground); } - final BoxStyle style = BoxStyle.fromString(arg.get("STYLE", 0)); + BoxStyle style = BoxStyle.fromString(arg.get("STEREO", 0)); + if (style == BoxStyle.PLAIN) + style = BoxStyle.fromString(arg.get("STYLE", 0)); + final Display display = Display.getWithNewlines2(arg.get("LABEL", 0)); return diagram.addActivity(display, style, url, colors, stereotype); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java index c0beb87c8..d2e6a70a3 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java @@ -154,17 +154,18 @@ public enum BoxStyle { } public static BoxStyle fromString(String style) { - if (style.length() == 1) + if (style != null) { + if (style.length() == 1) + for (BoxStyle bs : BoxStyle.values()) + if (bs.style == style.charAt(0)) + return bs; + + style = style.replaceAll("\\W", ""); + for (BoxStyle bs : BoxStyle.values()) - if (bs.style == style.charAt(0)) + if (style.equalsIgnoreCase(bs.stereotype)) return bs; - - style = style.replaceAll("\\W", ""); - - for (BoxStyle bs : BoxStyle.values()) - if (style.equalsIgnoreCase(bs.stereotype)) - return bs; - + } return PLAIN; } diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 982b1d2af..d70ce9826 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -82,7 +82,7 @@ public class Version { } public static int beta() { - final int beta = 2; + final int beta = 3; return beta; }