summaryrefslogtreecommitdiff
path: root/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java')
-rw-r--r--src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
index 35481b4..9c0b805 100644
--- a/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
+++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
@@ -2,7 +2,7 @@
* PlantUML : a free UML diagram generator
* ========================================================================
*
- * (C) Copyright 2009-2017, Arnaud Roques
+ * (C) Copyright 2009-2020, Arnaud Roques
*
* Project Info: http://plantuml.com
*
@@ -35,9 +35,11 @@
*/
package net.sourceforge.plantuml.classdiagram.command;
+import net.sourceforge.plantuml.LineLocation;
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.IRegex;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
@@ -48,15 +50,18 @@ public class CommandAllowMixing extends SingleLineCommand2<ClassDiagram> {
super(getRegexConcat());
}
- private static RegexConcat getRegexConcat() {
+ private static IRegex getRegexConcat() {
- return new RegexConcat(new RegexLeaf("^"), //
- new RegexLeaf("allow_?mixing"), //
- new RegexLeaf("$"));
+ return RegexConcat.build(CommandAllowMixing.class.getName(), //
+ RegexLeaf.start(), //
+ new RegexLeaf("allow"), //
+ new RegexLeaf("_?"), //
+ new RegexLeaf("mixing"), //
+ RegexLeaf.end());
}
@Override
- protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) {
+ protected CommandExecutionResult executeArg(ClassDiagram diagram, LineLocation location, RegexResult arg) {
diagram.setAllowMixing(true);
return CommandExecutionResult.ok();
}