mirror of
https://github.com/octoleo/plantuml.git
synced 2025-01-22 14:48:30 +00:00
Add order, see https://forum.plantuml.net/15232/declare-participants-similar-to-components?show=16269#c16269
This commit is contained in:
parent
04c4a6c156
commit
8294ca6e78
@ -92,9 +92,8 @@ public abstract class CommandParticipant extends SingleLineCommand2<SequenceDiag
|
||||
}
|
||||
|
||||
Display strings = Display.NULL;
|
||||
if (arg.get("FULL", 0) != null) {
|
||||
if (arg.get("FULL", 0) != null)
|
||||
strings = Display.getWithNewlines(arg.get("FULL", 0));
|
||||
}
|
||||
|
||||
final String typeString1 = arg.get("TYPE", 0);
|
||||
final String typeCreate1 = arg.get("CREATE", 0);
|
||||
@ -136,9 +135,8 @@ public abstract class CommandParticipant extends SingleLineCommand2<SequenceDiag
|
||||
|
||||
if (create) {
|
||||
final String error = diagram.activate(participant, LifeEventType.CREATE, null);
|
||||
if (error != null) {
|
||||
if (error != null)
|
||||
return CommandExecutionResult.error(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,8 @@ public class CommandParticipantMultilines extends CommandMultilines2<SequenceDia
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
CommandParticipant.getOrderRegex(), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), //
|
||||
RegexLeaf.spaceZeroOrMore(), //
|
||||
ColorParser.exp1(), //
|
||||
@ -101,7 +103,8 @@ public class CommandParticipantMultilines extends CommandMultilines2<SequenceDia
|
||||
|
||||
final ParticipantType type = ParticipantType.PARTICIPANT;
|
||||
final boolean create = false;
|
||||
final int order = 0;
|
||||
final String orderString = arg.get("ORDER", 0);
|
||||
final int order = orderString == null ? 0 : Integer.parseInt(orderString);
|
||||
|
||||
final Participant participant = diagram.createNewParticipant(type, code, strings, order);
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 4;
|
||||
final int beta = 5;
|
||||
return beta;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user