Hello community, here is the log from the commit of package plantuml for openSUSE:Factory checked in at 2019-11-07 23:19:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/plantuml (Old) and /work/SRC/openSUSE:Factory/.plantuml.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plantuml" Thu Nov 7 23:19:44 2019 rev:4 rq:746143 version:1.2019.12 Changes: -------- --- /work/SRC/openSUSE:Factory/plantuml/plantuml.changes 2019-09-23 12:46:53.301516472 +0200 +++ /work/SRC/openSUSE:Factory/.plantuml.new.2990/plantuml.changes 2019-11-07 23:19:57.040756754 +0100 @@ -1,0 +2,6 @@ +Wed Nov 6 19:58:34 UTC 2019 - Martin Hauke <[email protected]> + +- Update to version 1.2019.12 + See http://plantuml.com/de/changes for all changes + +------------------------------------------------------------------- Old: ---- plantuml-1.2019.11.tar.gz New: ---- plantuml-1.2019.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ plantuml.spec ++++++ --- /var/tmp/diff_new_pack.qms41c/_old 2019-11-07 23:19:58.900758749 +0100 +++ /var/tmp/diff_new_pack.qms41c/_new 2019-11-07 23:19:58.908758758 +0100 @@ -17,7 +17,7 @@ Name: plantuml -Version: 1.2019.11 +Version: 1.2019.12 Release: 0 Summary: Java UML Tool License: GPL-3.0-or-later ++++++ plantuml-1.2019.11.tar.gz -> plantuml-1.2019.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/pom.xml new/plantuml-1.2019.12/pom.xml --- old/plantuml-1.2019.11/pom.xml 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/pom.xml 2019-11-03 18:40:03.000000000 +0100 @@ -35,7 +35,7 @@ <groupId>net.sourceforge.plantuml</groupId> <artifactId>plantuml</artifactId> - <version>1.2019.12-SNAPSHOT</version> + <version>1.2019.13-SNAPSHOT</version> <packaging>jar</packaging> <name>PlantUML</name> @@ -133,8 +133,8 @@ <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> - <source>1.5</source> - <target>1.5</target> + <source>1.6</source> + <target>1.6</target> <debug>false</debug> </configuration> </plugin> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/README.md new/plantuml-1.2019.12/src/README.md --- old/plantuml-1.2019.11/src/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/plantuml-1.2019.12/src/README.md 2019-11-03 18:40:03.000000000 +0100 @@ -0,0 +1,54 @@ +# PlantUML : a free UML diagram generator + +--- + +(C) Copyright 2009-2019, Arnaud Roques +Project Info: [http://plantuml.com](http://plantuml.com) + +This file is part of PlantUML. + +PlantUML is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +PlantUML distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +License for more details. + +You should have received a copy of the GNU General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +USA. + +Java is a trademark or registered trademark of Sun Microsystems, Inc. +in the United States and other countries. + +Original Author: Arnaud Roques + +--- + + +PlantUML is an open-source component used to draw UML diagrams from their textual description. + +### Overview +This documentation will _not_ describe the PlantUML language description. +Please refer to [PlantUML site](http://plantuml.com) for that. + +Here, some information about how PlantUML is implemented will be provided to help the +integration of PlantUML with other programs. + +Unfortunatly, here, we have to raise a **warning**: + +While PlantUML language description remains stable over version and follow ascending +compatibility, the *implementation* of PlantUML changes very often over time. + +So if you use classes described in this documentation, it's very likely that you will have +an issue someday, because thoses class may change without any notice. They could even be deleted. + +It used to happen more often than you think over years, because we try to constantly improve the +general design of PlantUML, and this imply a continuous refactoring. + +The only exception is the `net.sourceforge.plantuml` package, that we will keep +as stable as possible over time. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/gen/lib/label/index__c.java new/plantuml-1.2019.12/src/gen/lib/label/index__c.java --- old/plantuml-1.2019.11/src/gen/lib/label/index__c.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/gen/lib/label/index__c.java 2019-11-03 18:40:03.000000000 +0100 @@ -379,11 +379,12 @@ CombineRect((ST_Rect_t)r, (ST_Rect_t) n.branch[i].rect)); return 0; } else { /* child was split */ -UNSUPPORTED("7evrfdq7uc1smqislqm9d82l6"); // n->branch[i].rect = NodeCover(n->branch[i].child); -UNSUPPORTED("echuth2qnq0o4n5gkzgtu5bgs"); // b.child = n2; -UNSUPPORTED("50z4r9qcomgi4o7vvwq0v0xs"); // b.rect = NodeCover(n2); -UNSUPPORTED("451qw2ioqybj69k9abzvqw4mk"); // rtp->EntryCount++; -UNSUPPORTED("9uz11nbvh6yp6yq2axvo7e0fb"); // return AddBranch(rtp, &b, n, new); + n.branch[i].setStruct("rect", + NodeCover((ST_Node_t___)n.branch[i].child)); + b.child = n2[0]; + b.rect.___(NodeCover(n2[0])); + rtp.setInt("EntryCount", rtp.EntryCount+1); + return AddBranch(rtp, b, n, new_); } } else if (n.level == level) { /* at level for insertion. */ /*Add rect, split if necessary */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/FileFormatOption.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/FileFormatOption.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/FileFormatOption.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/FileFormatOption.java 2019-11-03 18:40:03.000000000 +0100 @@ -57,13 +57,14 @@ private final String hoverColor; private final TikzFontDistortion tikzFontDistortion; private final double scale; + private final String preserveAspectRatio; public double getScaleCoef() { return scale; } public FileFormatOption(FileFormat fileFormat) { - this(fileFormat, null, true, false, "_top", false, null, TikzFontDistortion.getDefault(), 1.0); + this(fileFormat, null, true, false, "_top", false, null, TikzFontDistortion.getDefault(), 1.0, "none"); } public StringBounder getDefaultStringBounder() { @@ -78,13 +79,17 @@ return withMetadata; } + public final String getPreserveAspectRatio() { + return preserveAspectRatio; + } + public FileFormatOption(FileFormat fileFormat, boolean withMetadata) { - this(fileFormat, null, false, false, "_top", false, null, TikzFontDistortion.getDefault(), 1.0); + this(fileFormat, null, withMetadata, false, "_top", false, null, TikzFontDistortion.getDefault(), 1.0, "none"); } private FileFormatOption(FileFormat fileFormat, AffineTransform at, boolean withMetadata, boolean useRedForError, String svgLinkTarget, boolean debugsvek, String hoverColor, TikzFontDistortion tikzFontDistortion, - double scale) { + double scale, String preserveAspectRatio) { this.hoverColor = hoverColor; this.fileFormat = fileFormat; this.affineTransform = at; @@ -94,6 +99,7 @@ this.debugsvek = debugsvek; this.tikzFontDistortion = tikzFontDistortion; this.scale = scale; + this.preserveAspectRatio = preserveAspectRatio; if (tikzFontDistortion == null) { throw new IllegalArgumentException(); } @@ -101,27 +107,32 @@ public FileFormatOption withUseRedForError() { return new FileFormatOption(fileFormat, affineTransform, withMetadata, true, svgLinkTarget, debugsvek, - hoverColor, tikzFontDistortion, scale); + hoverColor, tikzFontDistortion, scale, preserveAspectRatio); } public FileFormatOption withTikzFontDistortion(TikzFontDistortion tikzFontDistortion) { return new FileFormatOption(fileFormat, affineTransform, withMetadata, true, svgLinkTarget, debugsvek, - hoverColor, tikzFontDistortion, scale); + hoverColor, tikzFontDistortion, scale, preserveAspectRatio); } public FileFormatOption withSvgLinkTarget(String svgLinkTarget) { return new FileFormatOption(fileFormat, affineTransform, withMetadata, useRedForError, svgLinkTarget, - debugsvek, hoverColor, tikzFontDistortion, scale); + debugsvek, hoverColor, tikzFontDistortion, scale, preserveAspectRatio); + } + + public FileFormatOption withPreserveAspectRatio(String preserveAspectRatio) { + return new FileFormatOption(fileFormat, affineTransform, withMetadata, useRedForError, svgLinkTarget, + debugsvek, hoverColor, tikzFontDistortion, scale, preserveAspectRatio); } public FileFormatOption withHoverColor(String hoverColor) { return new FileFormatOption(fileFormat, affineTransform, withMetadata, useRedForError, svgLinkTarget, - debugsvek, hoverColor, tikzFontDistortion, scale); + debugsvek, hoverColor, tikzFontDistortion, scale, preserveAspectRatio); } public FileFormatOption withScale(double scale) { return new FileFormatOption(fileFormat, affineTransform, withMetadata, useRedForError, svgLinkTarget, - debugsvek, hoverColor, tikzFontDistortion, scale); + debugsvek, hoverColor, tikzFontDistortion, scale, preserveAspectRatio); } @Override diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ISkinParam.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ISkinParam.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ISkinParam.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ISkinParam.java 2019-11-03 18:40:03.000000000 +0100 @@ -141,6 +141,8 @@ public String getSvgLinkTarget(); + public String getPreserveAspectRatio(); + public int getTabSize(); public int maxAsciiMessageLength(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/SkinParam.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/SkinParam.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/SkinParam.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/SkinParam.java 2019-11-03 18:40:03.000000000 +0100 @@ -1046,6 +1046,15 @@ } return value; } + + public String getPreserveAspectRatio() { + final String value = getValue("preserveaspectratio"); + if (value == null) { + return "none"; + } + return value; + } + public String getMonospacedFamily() { final String value = getValue("defaultMonospacedFontName"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/SkinParamDelegator.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/SkinParamDelegator.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/SkinParamDelegator.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/SkinParamDelegator.java 2019-11-03 18:40:03.000000000 +0100 @@ -234,6 +234,10 @@ public String getSvgLinkTarget() { return skinParam.getSvgLinkTarget(); } + + public String getPreserveAspectRatio() { + return skinParam.getPreserveAspectRatio(); + } public String getMonospacedFamily() { return skinParam.getMonospacedFamily(); @@ -355,4 +359,5 @@ skinParam.setDefaultSkin(newFileName); } + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/UmlDiagram.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/UmlDiagram.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/UmlDiagram.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/UmlDiagram.java 2019-11-03 18:40:03.000000000 +0100 @@ -186,6 +186,7 @@ if (fileFormatOption.getSvgLinkTarget() == null || fileFormatOption.getSvgLinkTarget().equals("_top")) { fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget()); } + fileFormatOption = fileFormatOption.withPreserveAspectRatio(getSkinParam().getPreserveAspectRatio()); fileFormatOption = fileFormatOption.withTikzFontDistortion(getSkinParam().getTikzFontDistortion()); if (hover != null) { fileFormatOption = fileFormatOption.withHoverColor(StringUtils.getAsHtml(getSkinParam().getColorMapper() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java 2019-11-03 18:40:03.000000000 +0100 @@ -61,6 +61,7 @@ import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.CommandNamespace; import net.sourceforge.plantuml.command.CommandNamespace2; +import net.sourceforge.plantuml.command.CommandNamespaceEmpty; import net.sourceforge.plantuml.command.CommandPackage; import net.sourceforge.plantuml.command.CommandPackageEmpty; import net.sourceforge.plantuml.command.CommandPage; @@ -125,6 +126,7 @@ cmds.add(new CommandNamespace()); cmds.add(new CommandNamespace2()); + cmds.add(new CommandNamespaceEmpty()); cmds.add(new CommandStereotype()); cmds.add(new CommandLinkClass(UmlDiagramType.CLASS)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java 2019-11-03 18:40:03.000000000 +0100 @@ -76,7 +76,8 @@ } private static IRegex getRegexConcat() { - return RegexConcat.build(CommandCreateClass.class.getName(), RegexLeaf.start(), // + return RegexConcat.build(CommandCreateClass.class.getName(), + RegexLeaf.start(), // new RegexLeaf("TYPE", // "(interface|enum|annotation|abstract[%s]+class|abstract|class|entity|circle|diamond)"), // RegexLeaf.spaceOneOrMore(), // @@ -95,7 +96,8 @@ new RegexLeaf("DISPLAY2", DISPLAY_WITH_GENERIC)), // new RegexLeaf("CODE3", "(" + CODE + ")"), // new RegexLeaf("CODE4", "[%g]([^%g]+)[%g]")), // - new RegexOptional(new RegexConcat(RegexLeaf.spaceZeroOrMore(), new RegexLeaf("GENERIC", "\\<(" + GenericRegexProducer.PATTERN + ")\\>"))), // + new RegexOptional(new RegexConcat(RegexLeaf.spaceZeroOrMore(), new RegexLeaf("GENERIC", "\\<(" + + GenericRegexProducer.PATTERN + ")\\>"))), // RegexLeaf.spaceZeroOrMore(), // new RegexLeaf("STEREO", "(\\<{2}.*\\>{2})?"), // RegexLeaf.spaceZeroOrMore(), // @@ -105,9 +107,14 @@ RegexLeaf.spaceZeroOrMore(), // color().getRegex(), // RegexLeaf.spaceZeroOrMore(), // - new RegexOptional(new RegexConcat(new RegexLeaf("##"), new RegexLeaf("LINECOLOR", "(?:\\[(dotted|dashed|bold)\\])?(\\w+)?"))), // - new RegexOptional(new RegexConcat(RegexLeaf.spaceOneOrMore(), new RegexLeaf("EXTENDS", "(extends)[%s]+(" + CommandCreateClassMultilines.CODES + ")"))), // - new RegexOptional(new RegexConcat(RegexLeaf.spaceOneOrMore(), new RegexLeaf("IMPLEMENTS", "(implements)[%s]+(" + CommandCreateClassMultilines.CODES + ")"))), // + new RegexOptional(new RegexConcat(new RegexLeaf("##"), new RegexLeaf("LINECOLOR", + "(?:\\[(dotted|dashed|bold)\\])?(\\w+)?"))), // + new RegexOptional(new RegexConcat(RegexLeaf.spaceOneOrMore(), new RegexLeaf("EXTENDS", + "(extends)[%s]+(" + CommandCreateClassMultilines.CODES + ")"))), // + new RegexOptional(new RegexConcat(RegexLeaf.spaceOneOrMore(), new RegexLeaf("IMPLEMENTS", + "(implements)[%s]+(" + CommandCreateClassMultilines.CODES + ")"))), // + new RegexOptional(new RegexConcat(RegexLeaf.spaceZeroOrMore(), new RegexLeaf("\\{"), RegexLeaf + .spaceZeroOrMore(), new RegexLeaf("\\}"))), // RegexLeaf.end()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandFooter.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandFooter.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandFooter.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandFooter.java 2019-11-03 18:40:03.000000000 +0100 @@ -48,7 +48,6 @@ import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HorizontalAlignment; -import net.sourceforge.plantuml.style.PName; public class CommandFooter extends SingleLineCommand2<TitledDiagram> { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandHeader.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandHeader.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandHeader.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandHeader.java 2019-11-03 18:40:03.000000000 +0100 @@ -48,7 +48,6 @@ import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HorizontalAlignment; -import net.sourceforge.plantuml.style.PName; public class CommandHeader extends SingleLineCommand2<TitledDiagram> { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandMultilinesFooter.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandMultilinesFooter.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandMultilinesFooter.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandMultilinesFooter.java 2019-11-03 18:40:03.000000000 +0100 @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HorizontalAlignment; -import net.sourceforge.plantuml.style.PName; public class CommandMultilinesFooter extends CommandMultilines<TitledDiagram> { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandMultilinesHeader.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandMultilinesHeader.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandMultilinesHeader.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandMultilinesHeader.java 2019-11-03 18:40:03.000000000 +0100 @@ -42,7 +42,6 @@ import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HorizontalAlignment; -import net.sourceforge.plantuml.style.PName; public class CommandMultilinesHeader extends CommandMultilines<TitledDiagram> { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandNamespace2.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandNamespace2.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandNamespace2.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandNamespace2.java 2019-11-03 18:40:03.000000000 +0100 @@ -43,7 +43,6 @@ 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.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java 1970-01-01 01:00:00.000000000 +0100 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandNamespaceEmpty.java 2019-11-03 18:40:03.000000000 +0100 @@ -0,0 +1,109 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PlantUML distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + * License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.command; + +import net.sourceforge.plantuml.LineLocation; +import net.sourceforge.plantuml.Url; +import net.sourceforge.plantuml.UrlBuilder; +import net.sourceforge.plantuml.UrlBuilder.ModeUrl; +import net.sourceforge.plantuml.classdiagram.ClassDiagram; +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; +import net.sourceforge.plantuml.cucadiagram.Code; +import net.sourceforge.plantuml.cucadiagram.Display; +import net.sourceforge.plantuml.cucadiagram.GroupType; +import net.sourceforge.plantuml.cucadiagram.IEntity; +import net.sourceforge.plantuml.cucadiagram.IGroup; +import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; +import net.sourceforge.plantuml.cucadiagram.Stereotype; +import net.sourceforge.plantuml.graphic.color.ColorParser; +import net.sourceforge.plantuml.graphic.color.ColorType; + +public class CommandNamespaceEmpty extends SingleLineCommand2<ClassDiagram> { + + public CommandNamespaceEmpty() { + super(getRegexConcat()); + } + + private static IRegex getRegexConcat() { + return RegexConcat.build(CommandNamespaceEmpty.class.getName(), RegexLeaf.start(), // + new RegexLeaf("namespace"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("NAME", "([\\p{L}0-9_][-\\p{L}0-9_.:\\\\]*)"), // + RegexLeaf.spaceZeroOrMore(), // + new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // + RegexLeaf.spaceZeroOrMore(), // + new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // + RegexLeaf.spaceZeroOrMore(), // + ColorParser.exp1(), // + RegexLeaf.spaceZeroOrMore(), // + new RegexLeaf("\\{"), // + RegexLeaf.spaceZeroOrMore(), // + new RegexLeaf("\\}"), // + RegexLeaf.end()); + } + + @Override + protected CommandExecutionResult executeArg(ClassDiagram diagram, LineLocation location, RegexResult arg) { + final Code code = Code.of(arg.get("NAME", 0)); + final IGroup currentPackage = diagram.getCurrentGroup(); + final Display display = Display.getWithNewlines(code); + diagram.gotoGroup2(code, display, GroupType.PACKAGE, currentPackage, NamespaceStrategy.MULTIPLE); + final IEntity p = diagram.getCurrentGroup(); + final String stereotype = arg.get("STEREOTYPE", 0); + if (stereotype != null) { + p.setStereotype(new Stereotype(stereotype)); + } + + final String urlString = arg.get("URL", 0); + if (urlString != null) { + final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); + final Url url = urlBuilder.getUrl(urlString); + p.addUrl(url); + } + + final String color = arg.get("COLOR", 0); + if (color != null) { + p.setSpecificColorTOBEREMOVED(ColorType.BACK, + diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color)); + } + diagram.endGroup(); + return CommandExecutionResult.ok(); + } + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandPackage.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandPackage.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/CommandPackage.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/CommandPackage.java 2019-11-03 18:40:03.000000000 +0100 @@ -69,7 +69,7 @@ private static IRegex getRegexConcat() { return RegexConcat.build(CommandPackage.class.getName(), RegexLeaf.start(), // - new RegexLeaf("TYPE", "(package|together)"), // + new RegexLeaf("TYPE", "(package)"), // RegexLeaf.spaceOneOrMore(), // new RegexLeaf("NAME", "([%g][^%g]+[%g]|[^#%s{}]*)"), // new RegexOptional( // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java 2019-11-03 18:40:03.000000000 +0100 @@ -53,7 +53,6 @@ import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.error.PSystemErrorUtils; import net.sourceforge.plantuml.sequencediagram.command.CommandSkin; -import net.sourceforge.plantuml.sprite.CommandListSprite; import net.sourceforge.plantuml.statediagram.command.CommandHideEmptyDescription; import net.sourceforge.plantuml.style.CommandStyleImport; import net.sourceforge.plantuml.style.CommandStyleMultilinesCSS; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java 2019-11-03 18:40:03.000000000 +0100 @@ -75,6 +75,7 @@ private final List<HideOrShow2> removed = new ArrayList<HideOrShow2>(); protected final EntityFactory entityFactory = new EntityFactory(hides2, removed); private IGroup currentGroup = entityFactory.getRootGroup(); + private List<IGroup> stacks = new ArrayList<IGroup>(); private boolean visibilityModifierPresent; @@ -196,6 +197,8 @@ final protected void gotoGroupInternalWithNamespace(final Code code, Display display, final Code namespace2, GroupType type, IGroup parent) { + + this.stacks.add(currentGroup); if (getNamespaceSeparator() == null) { gotoGroupInternal(code, display, namespace2, type, parent); return; @@ -220,6 +223,18 @@ } + public void endGroup() { + if (EntityUtils.groupRoot(currentGroup)) { + Log.error("No parent group"); + return; + } + if (stacks.size() > 0) { + currentGroup = stacks.remove(stacks.size() - 1); + } else { + currentGroup = currentGroup.getParentContainer(); + } + } + final protected void gotoGroupInternal(final Code code, Display display, final Code namespace2, GroupType type, IGroup parent) { IGroup result = entityFactory.getGroupsget(code); @@ -277,14 +292,6 @@ return p; } - public void endGroup() { - if (EntityUtils.groupRoot(currentGroup)) { - Log.error("No parent group"); - return; - } - currentGroup = currentGroup.getParentContainer(); - } - public final boolean isGroup(Code code) { return leafExist(code) == false && entityFactory.getGroupsget(code) != null; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/cucadiagram/Display.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/cucadiagram/Display.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/cucadiagram/Display.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/cucadiagram/Display.java 2019-11-03 18:40:03.000000000 +0100 @@ -54,6 +54,7 @@ import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.regex.Matcher2; +import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; @@ -74,6 +75,7 @@ import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UStroke; +import net.sourceforge.plantuml.wbs.WBSDiagram; public class Display implements Iterable<CharSequence> { @@ -270,6 +272,26 @@ return new Display(result, this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); } + public Display removeEndingStereotype() { + final Matcher2 m = patternStereotype.matcher(displayData.get(displayData.size() - 1)); + if (m.matches()) { + final List<CharSequence> result = new ArrayList<CharSequence>(this.displayData); + result.set(result.size() - 1, m.group(1)); + return new Display(result, this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); + } + return this; + } + + public final static Pattern2 patternStereotype = MyPattern.cmpile("^(.*?)(?:\\<\\<\\s*(.*)\\s*\\>\\>)\\s*$"); + + public String getEndingStereotype() { + final Matcher2 m = patternStereotype.matcher(displayData.get(displayData.size() - 1)); + if (m.matches()) { + return m.group(2); + } + return null; + } + public Display underlined() { final List<CharSequence> result = new ArrayList<CharSequence>(); for (CharSequence line : displayData) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/donors/PSystemDonors.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/donors/PSystemDonors.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/donors/PSystemDonors.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/donors/PSystemDonors.java 2019-11-03 18:40:03.000000000 +0100 @@ -71,23 +71,23 @@ private static final int COLS = 6; private static final int FREE_LINES = 6; - public static final String DONORS = "6uq902mFw6aNBnoRoJQNUtErFonYo206_-9C-IFeunriW0n1BL5IhOvS7xq622gWQ-ZeCRVlzBZVI7yH" - + "NUdUDys8jcnDSPvH50k27c-JQuPjxkqnSsBnGt1dZe133yW3iacsZHfPkfVj92sddof3IY7pywS6s9OA" - + "ihYRQXukK7S6TknnUzX_ePwbHp_sKxhZEw0nZHBhiAEQb5SFVAsgP8B2sM_7DwrYLapW42cEjd043jcO" - + "YNnrMiUu85NxZte3BJPcM2foJoYssYMf-UVP-hQ1xXCOJ2AmYG4RC7Eew32UO2vGRyGGM4MYYUpiZCQ6" - + "QsvveeC95zInXd-KHKsFLEOSZau4Dg-40Ww_XXE0hIYlmcVxDWCAHNgBkYN9EZMUX9N6XoKfhXyqt006" - + "R2ne7QY2a3T19_nfCVjJatjT3GLUzEpClTaPo4Ms0y3nPaRVPDsPAF_t3yuqiMsfbaXrBlrvhlTn3iZT" - + "Kgj6_37QM6LBtDQJ5nLQUN81_4FGIxsZOdxETMCX6UAvT7iYpdFgojSe0cR5OMJXJx4bDUxIBazZVLcU" - + "eIp1Z_RhL2EPq89N8bu6_QfMA0zqlb2oBArSFlHeMBqCV4t8JBmjkcV7NCh_lrAymupI5RJVnPogQo1A" - + "dh5pLUjigWXC8texv2QGAr3jhbknU_-G_vmFIBqbaO78RCvnlrIig3LT334RrdIwn0nWyfHe9mAxaqGY" - + "faReNR2oZ4mhnQw7g-VqYJ5nxVJ2uxwfCOWFTBBo9EpfHR1cXY79chaDxGUSWt06NvnNN_VXFLO1hBjv" - + "Zxr9pHzd85tfXP4aRKQKszRzgR1c1QLdKPPyM96_U_4p5mzT2bvdikW8Cwysno5ZeNZPf9N-PFJ3aY5l" - + "dygo_aeLUGFkbug5G9XdV0nuF3XPKCKb15RJMGuJ6u1mweDNx3SlSJEekgNav18snAp3LkU1IkU7UGT6" - + "bN7WcOCTtRt4pz0IHSx7vxso-cbbhIfsBA1uLWYMKaVPQweeqkTKCcICGSzXQ-3jDmjT42xrsXkc1Gfl" - + "W-Y-V0EjKyYq4kC7JPybqeLyHRxaiJ02_iwltsGlEDP1nhyPtOV7cUUA8AKgEi0vSRRKQbjQ1-ij-lpv" - + "ifoy1t_-xpLjvrI8vtoM0Bg0WlQlfS2SQDRLF7liJwEF3kmsiW9Y7PpqbLUcNWWm40oQPQcNrcb6uSuO" - + "Ncwg1dt6yQ52No4L9uZZ3SikbYcA6bFEykLanQYys9VU22SvU5x_55M6KbnbkPeOeLNi_2ZEqtWVjHjk" - + "TUa24j0T5mJAVlExtIntZJvVW7qO7b3avoDvwB25QK4Lfx4yDJ15OtrlnjjJPwP-4m00"; + public static final String DONORS = "6wO902mFU3XMJYceJdotTlPGzS6YgH3yYpFbZw2FTx01CWIrH4crEd9zz1eWg82keQF7tBxJutuZ_KLq" + + "fNlVD2FQiZN5UKPHB0Xwl4sk6RQvjmV2d2KlWZjJWfuF5n0bqTtfBCiTANQVa85C9s9S14-RrrZgP2tv" + + "1mcd-zyr5RAlgiAGBgiwVxf2SL807Z2x_5ETowPoBbUrwKqeGAVkNC5DLOUvTgAlJWmIOEBrR-TRrMHM" + + "JF0GASwsS0HEepD3CnUjCx8Xi_OVzGzeip73Kf5RGd7KBedEFo-TsJRGVOu44nAxADWmvb3AOLgWUyYD" + + "cCGcWeRwB4PZipLRdkXXS4CB-_AFHbBZaShCuMYJsDq31KxVnW58hzJK96RxDmFAH4QB6KjITM7SX3ld" + + "OJ4LwGSDDuB2pe9Ma1g2l0bTyEan-rEJMrqD1Lxo3CczsIxKATi6jCsClirrIAByxpRDjF4UKowHwcpz" + + "UQxtSGx8tL8hp_XZj3784TpxoOiALfvQ03y2lLGBbUJdf-mR2oaGzzRjYJmwLwxSHn4Ocp9CBFOgjbYB" + + "_5YNjx4LMLOO2_helYuq8GCjTELoD_HjMfaqTBvGafPMBXzwT5gz369DnaplFFqP7NCv_xzIlCDCYXle" + + "IedPfci4HUGSMaqN6nE1QQ77Gsu2iWBbxheLk_SF-NK-8FEMPGGYjpcZVL_nGjrr4M8wrdGrnGnW_fJI" + + "5ed3WWW5xOBUHfL-fAqKknwkdkaJO-w-w9F7NJDZ40SwHMCHldeHtDqme-hDaGtjUymXU8Wlowkl-_0T" + + "gm3MuTuR_aZDds0Wd-c54P568nhRrlsfSBU24bdK9HShybt5prmyT2TudScYGyoysXo7B0oL1qbQwfyC" + + "FomPVFjCDkolIf4tu7bfc8PmP7mCBXzDUjJa4edDT9PZPYS0bofUiTzymdMXwfQQaoriYCd3Lnz29lWn" + + "le2bCXMU1jQwUr6SGOmIvyIyLrOjAsjLyR60YbaXw4iBfMggADBdD3BYh47FGUjW-yt25kYbNdl3c51u" + + "6wAx6XkmJH7JLKp_Q0AUY2gA9NefayG0lkR3hzL3Onry_6Pq7n47oEwI4485QewUE2tDjsDO1-ij-l_p" + + "PJbv3_xytslQmQaLztnM0NI2aF_hA1W7JLtjCmflNJwSE1om0gasJcBbfQMdGG91v9QTFdMTPgHtOaIv" + + "BLdqZkD3PRvI8Gv8OyFoYtwAeiQKaxwSh3YL3_lE6-4aXyZhdwBAcXHNfP6Q6C4cTdOKvsdiLhlXheih" + + "yA0UN12e-_NZqyqiTuqrNq1g61uqvESZSkZGmxMWfgQ5iIom8iRwtYVzKAR7RyQcW5qbW3dJ0000"; /* * Special thanks to our sponsors and donors: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/graphic/SkinParameter.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/graphic/SkinParameter.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/graphic/SkinParameter.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/graphic/SkinParameter.java 2019-11-03 18:40:03.000000000 +0100 @@ -116,7 +116,7 @@ public static final SkinParameter CONTROL = new SkinParameter("CONTROL", ColorParam.controlBackground, ColorParam.controlBorder, FontParam.CONTROL, FontParam.CONTROL_STEREOTYPE); - public static final SkinParameter ENTITY_DOMAIN = new SkinParameter("ENTITY_DOMAIN", ColorParam.entityBackground, + public static final SkinParameter ENTITY = new SkinParameter("ENTITY", ColorParam.entityBackground, ColorParam.entityBorder, FontParam.ENTITY, FontParam.ENTITY_STEREOTYPE); public static final SkinParameter INTERFACE = new SkinParameter("INTERFACE", ColorParam.interfaceBackground, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/graphic/USymbol.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/graphic/USymbol.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/graphic/USymbol.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/graphic/USymbol.java 2019-11-03 18:40:03.000000000 +0100 @@ -73,7 +73,7 @@ public final static USymbol COMPONENT1 = record("COMPONENT1", SkinParameter.COMPONENT1, new USymbolComponent1()); public final static USymbol COMPONENT2 = record("COMPONENT2", SkinParameter.COMPONENT2, new USymbolComponent2()); public final static USymbol BOUNDARY = record("BOUNDARY", SkinParameter.BOUNDARY, new USymbolBoundary()); - public final static USymbol ENTITY_DOMAIN = record("ENTITY_DOMAIN", SkinParameter.ENTITY_DOMAIN, + public final static USymbol ENTITY_DOMAIN = record("ENTITY_DOMAIN", SkinParameter.ENTITY, new USymbolEntityDomain(2)); public final static USymbol CONTROL = record("CONTROL", SkinParameter.CONTROL, new USymbolControl(2)); public final static USymbol INTERFACE = record("INTERFACE", SkinParameter.INTERFACE, new USymbolInterface()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/graphic/USymbolEntityDomain.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/graphic/USymbolEntityDomain.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/graphic/USymbolEntityDomain.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/graphic/USymbolEntityDomain.java 2019-11-03 18:40:03.000000000 +0100 @@ -48,7 +48,7 @@ @Override public SkinParameter getSkinParameter() { - return SkinParameter.ENTITY_DOMAIN; + return SkinParameter.ENTITY; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/mindmap/FingerImpl.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/mindmap/FingerImpl.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/mindmap/FingerImpl.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/mindmap/FingerImpl.java 2019-11-03 18:40:03.000000000 +0100 @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParam; -import net.sourceforge.plantuml.SkinParamBackcolored; +import net.sourceforge.plantuml.SkinParamColors; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UDrawable; +import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.SName; @@ -85,19 +86,23 @@ private Tetris tetris = null; private StyleSignature getDefaultStyleDefinitionNode() { + final String depth = SName.depth(level); if (level == 0) { - return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.rootNode).add( - stereotype); + return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.rootNode) + .add(stereotype).add(depth); } if (nail.size() == 0) { - return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.leafNode).add( - stereotype); + return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node, SName.leafNode) + .add(stereotype).add(depth); } - return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node).add(stereotype); + return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.node).add(stereotype) + .add(depth); } public StyleSignature getDefaultStyleDefinitionArrow() { - return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.arrow).add(stereotype); + final String depth = SName.depth(level); + return StyleSignature.of(SName.root, SName.element, SName.mindmapDiagram, SName.arrow).add(stereotype) + .add(depth); } public static FingerImpl build(Idea idea, ISkinParam skinParam, Direction direction) { @@ -237,7 +242,8 @@ font = skinParam.getFont(null, false, FontParam.ACTIVITY); } if (shape == IdeaShape.BOX) { - final ISkinParam foo = new SkinParamBackcolored(Colors.empty().mute(skinParam), backColor); + // final ISkinParam foo = new SkinParamBackcolored(Colors.empty().mute(skinParam), backColor); + final ISkinParam foo = new SkinParamColors(skinParam, Colors.empty().add(ColorType.BACK, backColor)); final FtileBox box = FtileBox.createMindMap(styleBuilder, foo, label, getDefaultStyleDefinitionNode()); return TextBlockUtils.withMargin(box, 0, 0, margin(), margin()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/mindmap/Idea.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/mindmap/Idea.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/mindmap/Idea.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/mindmap/Idea.java 2019-11-03 18:40:03.000000000 +0100 @@ -46,10 +46,6 @@ class Idea { - // public StyleDefinition getDefaultStyleDefinition() { - // return StyleDefinition.of(SName.root, SName.element, SName.mindmapDiagram, SName.node); - // } - private final Display label; private final int level; private final Idea parent; @@ -59,8 +55,8 @@ private final StyleBuilder styleBuilder; private final String stereotype; - public Idea(StyleBuilder styleBuilder, Display label, IdeaShape shape, String stereotype) { - this(styleBuilder, null, 0, null, label, shape, stereotype); + public Idea(StyleBuilder styleBuilder, HtmlColor backColor, Display label, IdeaShape shape, String stereotype) { + this(styleBuilder, backColor, 0, null, label, shape, stereotype); } public Idea createIdea(StyleBuilder styleBuilder, HtmlColor backColor, int newLevel, Display newDisplay, @@ -70,14 +66,6 @@ return result; } - // public Style getStyle(StyleBuilder styleBuilder) { - // Style result = getDefaultStyleDefinition().getMergedStyle(styleBuilder); - // if (backColor != null) { - // result = result.eventuallyOverride(PName.BackGroundColor, backColor); - // } - // return result; - // } - private Idea(StyleBuilder styleBuilder, HtmlColor backColor, int level, Idea parent, Display label, IdeaShape shape, String stereotype) { this.backColor = backColor; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/mindmap/MindMapDiagram.java 2019-11-03 18:40:03.000000000 +0100 @@ -181,19 +181,17 @@ public CommandExecutionResult addIdea(HtmlColor backColor, int level, Display label, IdeaShape shape, Direction direction) { - final Matcher2 m = WBSDiagram.patternStereotype.matcher(label.get(0)); - String stereotype = null; - if (m.matches()) { - label = Display.getWithNewlines(m.group(1)); - stereotype = m.group(2); + String stereotype = label.getEndingStereotype(); + if (stereotype != null) { + label = label.removeEndingStereotype(); } if (level == 0) { if (this.right.root != null) { return CommandExecutionResult .error("I don't know how to draw multi-root diagram. You should suggest an image so that the PlantUML team implements it :-)"); } - right.initRoot(getSkinParam().getCurrentStyleBuilder(), label, shape, stereotype); - left.initRoot(getSkinParam().getCurrentStyleBuilder(), label, shape, stereotype); + right.initRoot(getSkinParam().getCurrentStyleBuilder(), backColor, label, shape, stereotype); + left.initRoot(getSkinParam().getCurrentStyleBuilder(), backColor, label, shape, stereotype); return CommandExecutionResult.ok(); } if (direction == Direction.LEFT) { @@ -207,8 +205,8 @@ private Idea last; private Finger finger; - private void initRoot(StyleBuilder styleBuilder, Display label, IdeaShape shape, String stereotype) { - root = new Idea(styleBuilder, label, shape, stereotype); + private void initRoot(StyleBuilder styleBuilder, HtmlColor backColor, Display label, IdeaShape shape, String stereotype) { + root = new Idea(styleBuilder, backColor, label, shape, stereotype); last = root; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/ComplementDayOfWeek.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/ComplementDayOfWeek.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/ComplementDayOfWeek.java 1970-01-01 01:00:00.000000000 +0100 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/ComplementDayOfWeek.java 2019-11-03 18:40:03.000000000 +0100 @@ -0,0 +1,55 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PlantUML distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + * License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.project3; + +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; + +public class ComplementDayOfWeek implements ComplementPattern { + + public IRegex toRegex(String suffix) { + return new RegexConcat( // + new RegexLeaf("COMPLEMENT" + suffix, "(" + DayOfWeek.getRegexString() + ")")); // + } + + public Failable<Complement> getComplement(GanttDiagram system, RegexResult arg, String suffix) { + final String s = arg.get("COMPLEMENT" + suffix, 0); + return Failable.<Complement> ok(DayOfWeek.fromString(s)); + } + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java 2019-11-03 18:40:03.000000000 +0100 @@ -45,19 +45,14 @@ public IRegex toRegex(String suffix) { return new RegexConcat( // new RegexLeaf("COMPLEMENT" + suffix, "(\\d+)[%s]+(days?|weeks?)")); // - // new RegexLeaf("LOAD" + suffix, "([%s]+at[%s]+(\\d+)%)?")); } public Failable<Complement> getComplement(GanttDiagram system, RegexResult arg, String suffix) { final String number = arg.get("COMPLEMENT" + suffix, 0); final boolean inWeeks = arg.get("COMPLEMENT" + suffix, 1).startsWith("w"); final int factor = inWeeks ? system.daysInWeek() : 1; - // final String load = arg.get("LOAD" + suffix, 1); final int days = Integer.parseInt(number) * factor; - // if (load == null) { return Failable.<Complement> ok(LoadInDays.inDay(days)); - // } - // return Failable.<Complement> ok(LoadInDays.inDayWithLoad(days, Integer.parseInt(load))); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/DayOfWeek.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/DayOfWeek.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/DayOfWeek.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/DayOfWeek.java 2019-11-03 18:40:03.000000000 +0100 @@ -37,7 +37,7 @@ import net.sourceforge.plantuml.StringUtils; -public enum DayOfWeek implements Subject { +public enum DayOfWeek implements Subject, Complement { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/GanttDiagram.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/GanttDiagram.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/GanttDiagram.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/GanttDiagram.java 2019-11-03 18:40:03.000000000 +0100 @@ -586,7 +586,7 @@ public Resource getResource(String resourceName) { Resource resource = resources.get(resourceName); if (resource == null) { - resource = new Resource(resourceName, getDefaultPlan()); + resource = new Resource(resourceName, getDefaultPlan(), getCalendarSimple()); } resources.put(resourceName, resource); return resource; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/GanttDiagramFactory.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/GanttDiagramFactory.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/GanttDiagramFactory.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/GanttDiagramFactory.java 2019-11-03 18:40:03.000000000 +0100 @@ -38,7 +38,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; -import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.command.Command; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/LoadInDays.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/LoadInDays.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/LoadInDays.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/LoadInDays.java 2019-11-03 18:40:03.000000000 +0100 @@ -49,11 +49,6 @@ return new LoadInDays(days, 100); } -// public static Complement inDayWithLoad(int days, int loadPerDay) { -// final int tmp = (int) Math.ceil(days * 100.0 / loadPerDay); -// return new LoadInDays(tmp, loadPerDay); -// } - public int getFullLoad() { return days * loadPerDay; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/Resource.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/Resource.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/Resource.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/Resource.java 2019-11-03 18:40:03.000000000 +0100 @@ -35,19 +35,25 @@ */ package net.sourceforge.plantuml.project3; +import java.util.Collection; +import java.util.EnumSet; +import java.util.HashSet; import java.util.Set; import java.util.TreeSet; -public class Resource implements Subject /* , LoadPlanable */{ +public class Resource implements Subject { private final String name; private ResourceDraw draw; - // private final LoadPlanable loadPlanable; - private Set<Instant> closed = new TreeSet<Instant>(); + private final Set<Instant> closed = new TreeSet<Instant>(); + private final Set<Instant> forcedOn = new TreeSet<Instant>(); + private final GCalendar calendar; - public Resource(String name, LoadPlanable loadPlanable) { + private final Collection<DayOfWeek> closedDayOfWeek = EnumSet.noneOf(DayOfWeek.class); + + public Resource(String name, LoadPlanable loadPlanable, GCalendar calendar) { this.name = name; - // this.loadPlanable = loadPlanable; + this.calendar = calendar; } @Override @@ -79,17 +85,27 @@ } public boolean isClosedAt(Instant instant) { - return this.closed.contains(instant); + if (this.forcedOn.contains(instant)) { + return false; + } + if (closedDayOfWeek.size() > 0 && calendar != null) { + final DayAsDate d = calendar.toDayAsDate((InstantDay) instant); + if (closedDayOfWeek.contains(d.getDayOfWeek())) { + return true; + } + } + return this.closed.contains(instant); } -// public int getLoadAt(Instant instant) { -// if (this.closed.contains(instant)) { -// return 0; -// } -// return loadPlanable.getLoadAt(instant); -// } - public void addCloseDay(Instant instant) { this.closed.add(instant); } + + public void addForceOnDay(Instant instant) { + this.forcedOn.add(instant); + } + + public void addCloseDay(DayOfWeek dayOfWeek) { + closedDayOfWeek.add(dayOfWeek); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/SubjectResource.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/SubjectResource.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/SubjectResource.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/SubjectResource.java 2019-11-03 18:40:03.000000000 +0100 @@ -46,7 +46,7 @@ public class SubjectResource implements SubjectPattern { public Collection<VerbPattern> getVerbs() { - return Arrays.<VerbPattern> asList(new VerbIsOff()); + return Arrays.<VerbPattern> asList(new VerbIsOff(), new VerbIsOn()); } public IRegex toRegex() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/VerbIsOff.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/VerbIsOff.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/VerbIsOff.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/VerbIsOff.java 2019-11-03 18:40:03.000000000 +0100 @@ -42,12 +42,14 @@ 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.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; public class VerbIsOff implements VerbPattern { public Collection<ComplementPattern> getComplements() { - return Arrays.<ComplementPattern> asList(new ComplementDate(), new ComplementDates()); + return Arrays + .<ComplementPattern> asList(new ComplementDate(), new ComplementDates(), new ComplementDayOfWeek()); } public IRegex toRegex() { @@ -55,14 +57,21 @@ RegexLeaf.spaceOneOrMore(), // new RegexLeaf("off"), // RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("on")); + new RegexOr(// + new RegexLeaf("on"),// + new RegexLeaf("for"),// + new RegexLeaf("the"),// + new RegexLeaf("at") // + )); } public Verb getVerb(final GanttDiagram project, RegexResult arg) { return new Verb() { public CommandExecutionResult execute(Subject subject, Complement complement) { final Resource resource = (Resource) subject; - if (complement instanceof DaysAsDates) { + if (complement instanceof DayOfWeek) { + resource.addCloseDay(((DayOfWeek) complement)); + } else if (complement instanceof DaysAsDates) { for (DayAsDate when : (DaysAsDates) complement) { resource.addCloseDay(project.convert(when)); } @@ -75,5 +84,4 @@ }; } - } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/VerbIsOn.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/VerbIsOn.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/VerbIsOn.java 1970-01-01 01:00:00.000000000 +0100 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/VerbIsOn.java 2019-11-03 18:40:03.000000000 +0100 @@ -0,0 +1,85 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PlantUML distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + * License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.project3; + +import java.util.Arrays; +import java.util.Collection; + +import net.sourceforge.plantuml.command.CommandExecutionResult; +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.RegexOr; +import net.sourceforge.plantuml.command.regex.RegexResult; + +public class VerbIsOn implements VerbPattern { + + public Collection<ComplementPattern> getComplements() { + return Arrays.<ComplementPattern> asList(new ComplementDate(), new ComplementDates()); + } + + public IRegex toRegex() { + return new RegexConcat(new RegexLeaf("is"), // + RegexLeaf.spaceOneOrMore(), // + new RegexLeaf("on"), // + RegexLeaf.spaceOneOrMore(), // + new RegexOr(// + new RegexLeaf("on"),// + new RegexLeaf("for"),// + new RegexLeaf("the"),// + new RegexLeaf("at") // + ) // + ); + } + + public Verb getVerb(final GanttDiagram project, RegexResult arg) { + return new Verb() { + public CommandExecutionResult execute(Subject subject, Complement complement) { + final Resource resource = (Resource) subject; + if (complement instanceof DaysAsDates) { + for (DayAsDate when : (DaysAsDates) complement) { + resource.addForceOnDay(project.convert(when)); + } + } else { + final DayAsDate when = (DayAsDate) complement; + resource.addForceOnDay(project.convert(when)); + } + return CommandExecutionResult.ok(); + } + + }; + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/VerbProjectStarts.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/VerbProjectStarts.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/project3/VerbProjectStarts.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/project3/VerbProjectStarts.java 2019-11-03 18:40:03.000000000 +0100 @@ -40,8 +40,12 @@ import net.sourceforge.plantuml.command.CommandExecutionResult; 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.RegexOptional; +import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; +import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; public class VerbProjectStarts implements VerbPattern { @@ -49,10 +53,23 @@ return Arrays.<ComplementPattern> asList(new ComplementDate()); } - public IRegex toRegex() { + public IRegex toRegexOld() { return new RegexLeaf("starts[%s]*(the[%s]*|on[%s]*)*"); } + public IRegex toRegex() { + return new RegexConcat(new RegexLeaf("start"), // + new RegexOptional(new RegexLeaf("s")), // + RegexLeaf.spaceZeroOrMore(), // + new RegexOptional(new RegexOr(// + new RegexLeaf("on"),// + new RegexLeaf("for"),// + new RegexLeaf("the"),// + new RegexLeaf("at") // + )) // + ); + } + public Verb getVerb(final GanttDiagram project, RegexResult arg) { return new Verb() { public CommandExecutionResult execute(Subject subject, Complement complement) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/skin/rose/Rose.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/skin/rose/Rose.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/skin/rose/Rose.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/skin/rose/Rose.java 2019-11-03 18:40:03.000000000 +0100 @@ -370,6 +370,16 @@ skinParameter = SkinParameter.PARTICIPANT; } else if (color == ColorParam.actorBorder) { skinParameter = SkinParameter.ACTOR; + } else if (color == ColorParam.boundaryBorder) { + skinParameter = SkinParameter.BOUNDARY; + } else if (color == ColorParam.controlBorder) { + skinParameter = SkinParameter.CONTROL; + } else if (color == ColorParam.entityBorder) { + skinParameter = SkinParameter.ENTITY; + } else if (color == ColorParam.collectionsBorder) { + skinParameter = SkinParameter.COLLECTIONS; + } else if (color == ColorParam.databaseBorder) { + skinParameter = SkinParameter.DATABASE; } final boolean result = skinParameter == null ? param.shadowing(null) : param.shadowing2(null, skinParameter); return result ? 4.0 : 0; @@ -403,9 +413,10 @@ .withDeltaShadow(deltaShadow(skin, color)); } if (color == ColorParam.entityBorder) { + final double tmp = deltaShadow(skin, color); return new SymbolContext(getHtmlColor(skin, ColorParam.entityBackground), getHtmlColor(skin, ColorParam.entityBorder)).withStroke(getStroke(skin, LineParam.sequenceActorBorder, 2)) - .withDeltaShadow(deltaShadow(skin, color)); + .withDeltaShadow(tmp); } if (color == ColorParam.databaseBorder) { return new SymbolContext(getHtmlColor(skin, ColorParam.databaseBackground), getHtmlColor(skin, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java 2019-11-03 18:40:03.000000000 +0100 @@ -88,7 +88,7 @@ public ImageData writeImageSvg(OutputStream os) throws IOException { final UGraphicSvg ug = new UGraphicSvg(true, new Dimension2DDouble(0, 0), new ColorMapperIdentity(), - (String) null, false, 1.0, null, null, 0); + (String) null, false, 1.0, null, null, 0, "none"); drawInternal(ug); ug.createXml(os, null); return ImageDataSimple.ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCrowfoot.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCrowfoot.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCrowfoot.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCrowfoot.java 2019-11-03 18:40:03.000000000 +0100 @@ -50,7 +50,8 @@ @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { - throw new UnsupportedOperationException(getClass().toString()); + angle -= Math.PI / 2; + return new ExtremityCrowfoot(p0, angle, side); } } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/svg/SvgGraphics.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/svg/SvgGraphics.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/svg/SvgGraphics.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/svg/SvgGraphics.java 2019-11-03 18:40:03.000000000 +0100 @@ -109,6 +109,8 @@ private int maxX = 10; private int maxY = 10; + private final String preserveAspectRatio; + private final double scale; private final String filterUid; private final String shadowId; @@ -124,17 +126,19 @@ } } - public SvgGraphics(boolean svgDimensionStyle, Dimension2D minDim, double scale, String hover, long seed) { - this(svgDimensionStyle, minDim, null, scale, hover, seed); + public SvgGraphics(boolean svgDimensionStyle, Dimension2D minDim, double scale, String hover, long seed, + String preserveAspectRatio) { + this(svgDimensionStyle, minDim, null, scale, hover, seed, preserveAspectRatio); } public SvgGraphics(boolean svgDimensionStyle, Dimension2D minDim, String backcolor, double scale, String hover, - long seed) { + long seed, String preserveAspectRatio) { try { this.svgDimensionStyle = svgDimensionStyle; this.scale = scale; this.document = getDocument(); this.backcolor = backcolor; + this.preserveAspectRatio = preserveAspectRatio; ensureVisible(minDim.getWidth(), minDim.getHeight()); this.root = getRootNode(); @@ -594,7 +598,7 @@ } root.setAttribute("viewBox", "0 0 " + maxXscaled + " " + maxYscaled); root.setAttribute("zoomAndPan", "magnify"); - root.setAttribute("preserveAspectRatio", "none"); + root.setAttribute("preserveAspectRatio", preserveAspectRatio); root.setAttribute("contentScriptType", "application/ecmascript"); root.setAttribute("contentStyleType", "text/css"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java 2019-11-03 18:40:03.000000000 +0100 @@ -82,6 +82,7 @@ type.add("queue"); type.add("archimate"); type.add("diamond"); + type.add("detach"); keyword.add("@startuml"); keyword.add("@enduml"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/tim/TContext.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/tim/TContext.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/tim/TContext.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/tim/TContext.java 2019-11-03 18:40:03.000000000 +0100 @@ -75,6 +75,7 @@ import net.sourceforge.plantuml.tim.stdlib.Filename; import net.sourceforge.plantuml.tim.stdlib.FunctionExists; import net.sourceforge.plantuml.tim.stdlib.GetVariableValue; +import net.sourceforge.plantuml.tim.stdlib.GetVersion; import net.sourceforge.plantuml.tim.stdlib.Getenv; import net.sourceforge.plantuml.tim.stdlib.IntVal; import net.sourceforge.plantuml.tim.stdlib.InvokeVoidFunction; @@ -125,6 +126,7 @@ addFunction(new SetVariableValue()); addFunction(new GetVariableValue()); addFunction(new IntVal()); + addFunction(new GetVersion()); // !exit // !log // %min diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java 1970-01-01 01:00:00.000000000 +0100 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/tim/stdlib/GetVersion.java 2019-11-03 18:40:03.000000000 +0100 @@ -0,0 +1,59 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PlantUML distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + * License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + */ +package net.sourceforge.plantuml.tim.stdlib; + +import java.util.List; + +import net.sourceforge.plantuml.tim.EaterException; +import net.sourceforge.plantuml.tim.TContext; +import net.sourceforge.plantuml.tim.TFunctionSignature; +import net.sourceforge.plantuml.tim.TMemory; +import net.sourceforge.plantuml.tim.expression.TValue; +import net.sourceforge.plantuml.version.Version; + +public class GetVersion extends SimpleReturnFunction { + + public TFunctionSignature getSignature() { + return new TFunctionSignature("%version", 1); + } + + public boolean canCover(int nbArg) { + return nbArg == 0; + } + + public TValue executeReturn(TContext context, TMemory memory, List<TValue> args) throws EaterException { + return TValue.fromString(Version.versionString()); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/FontChecker.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/FontChecker.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/FontChecker.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/FontChecker.java 2019-11-03 18:40:03.000000000 +0100 @@ -157,7 +157,7 @@ } private String getSvgImage(char c) throws IOException, TransformerException { - final SvgGraphics svg = new SvgGraphics(true, new Dimension2DDouble(0, 0), 1.0, null, 42); + final SvgGraphics svg = new SvgGraphics(true, new Dimension2DDouble(0, 0), 1.0, null, 42, "none"); svg.setStrokeColor("black"); svg.svgImage(getBufferedImage(c), 0, 0); final ByteArrayOutputStream os = new ByteArrayOutputStream(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java 2019-11-03 18:40:03.000000000 +0100 @@ -393,7 +393,7 @@ return createUGraphicPNG(colorMapper, dpiFactor, dim, mybackcolor, animationArg, dx, dy); case SVG: return createUGraphicSVG(colorMapper, dpiFactor, dim, mybackcolor, fileFormatOption.getSvgLinkTarget(), - fileFormatOption.getHoverColor(), seed); + fileFormatOption.getHoverColor(), seed, fileFormatOption.getPreserveAspectRatio()); case EPS: return new UGraphicEps(colorMapper, EpsStrategy.getDefault2()); case EPS_TEXT: @@ -417,7 +417,7 @@ } private UGraphic2 createUGraphicSVG(ColorMapper colorMapper, double scale, Dimension2D dim, HtmlColor mybackcolor, - String svgLinkTarget, String hover, long seed) { + String svgLinkTarget, String hover, long seed, String preserveAspectRatio) { Color backColor = Color.WHITE; if (mybackcolor instanceof HtmlColorSimple) { backColor = colorMapper.getMappedColor(mybackcolor); @@ -425,12 +425,12 @@ final UGraphicSvg ug; if (mybackcolor instanceof HtmlColorGradient) { ug = new UGraphicSvg(svgDimensionStyle, dim, colorMapper, (HtmlColorGradient) mybackcolor, false, scale, - svgLinkTarget, hover, seed); + svgLinkTarget, hover, seed, preserveAspectRatio); } else if (backColor == null || backColor.equals(Color.WHITE)) { - ug = new UGraphicSvg(svgDimensionStyle, dim, colorMapper, false, scale, svgLinkTarget, hover, seed); + ug = new UGraphicSvg(svgDimensionStyle, dim, colorMapper, false, scale, svgLinkTarget, hover, seed, preserveAspectRatio); } else { ug = new UGraphicSvg(svgDimensionStyle, dim, colorMapper, StringUtils.getAsHtml(backColor), false, scale, - svgLinkTarget, hover, seed); + svgLinkTarget, hover, seed, preserveAspectRatio); } return ug; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/UGraphicUtils.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/UGraphicUtils.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/UGraphicUtils.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/UGraphicUtils.java 2019-11-03 18:40:03.000000000 +0100 @@ -65,7 +65,7 @@ final Dimension2D size = computeSize(colorMapper, background, image); final UGraphicSvg svg = new UGraphicSvg(true, size, colorMapper, StringUtils.getAsHtml(colorMapper .getMappedColor(background)), false, 1.0, fileFormatOption.getSvgLinkTarget(), - fileFormatOption.getHoverColor(), seed); + fileFormatOption.getHoverColor(), seed, fileFormatOption.getPreserveAspectRatio()); image.drawU(svg); svg.createXml(os, fileFormatOption.isWithMetadata() ? metadata : null); } else if (fileFormat == FileFormat.EPS) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java 2019-11-03 18:40:03.000000000 +0100 @@ -88,20 +88,21 @@ } public UGraphicSvg(boolean svgDimensionStyle, Dimension2D minDim, ColorMapper colorMapper, String backcolor, - boolean textAsPath, double scale, String linkTarget, String hover, long seed) { - this(minDim, colorMapper, new SvgGraphics(svgDimensionStyle, minDim, backcolor, scale, hover, seed), - textAsPath, linkTarget); + boolean textAsPath, double scale, String linkTarget, String hover, long seed, String preserveAspectRatio) { + this(minDim, colorMapper, new SvgGraphics(svgDimensionStyle, minDim, backcolor, scale, hover, seed, + preserveAspectRatio), textAsPath, linkTarget); } public UGraphicSvg(boolean svgDimensionStyle, Dimension2D minDim, ColorMapper colorMapper, boolean textAsPath, - double scale, String linkTarget, String hover, long seed) { - this(minDim, colorMapper, new SvgGraphics(svgDimensionStyle, minDim, scale, hover, seed), textAsPath, - linkTarget); + double scale, String linkTarget, String hover, long seed, String preserveAspectRatio) { + this(minDim, colorMapper, new SvgGraphics(svgDimensionStyle, minDim, scale, hover, seed, preserveAspectRatio), + textAsPath, linkTarget); } public UGraphicSvg(boolean svgDimensionStyle, Dimension2D minDim, ColorMapper mapper, HtmlColorGradient gr, - boolean textAsPath, double scale, String linkTarget, String hover, long seed) { - this(minDim, mapper, new SvgGraphics(svgDimensionStyle, minDim, scale, hover, seed), textAsPath, linkTarget); + boolean textAsPath, double scale, String linkTarget, String hover, long seed, String preserveAspectRatio) { + this(minDim, mapper, new SvgGraphics(svgDimensionStyle, minDim, scale, hover, seed, preserveAspectRatio), + textAsPath, linkTarget); final SvgGraphics svg = getGraphicObject(); svg.paintBackcolorGradient(mapper, gr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/utils/CharHidder.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/utils/CharHidder.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/utils/CharHidder.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/utils/CharHidder.java 2019-11-03 18:40:03.000000000 +0100 @@ -46,7 +46,10 @@ final StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); - if (c == '~' && i + 1 < s.length()) { + if (c == '\\' && i + 1 < s.length() && s.charAt(i + 1) == '~') { + result.append(hideChar('~')); + i++; + } else if (c == '~' && i + 1 < s.length()) { i++; final char c2 = s.charAt(i); if (isToBeHidden(c2)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/src/net/sourceforge/plantuml/version/Version.java new/plantuml-1.2019.12/src/net/sourceforge/plantuml/version/Version.java --- old/plantuml-1.2019.11/src/net/sourceforge/plantuml/version/Version.java 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/src/net/sourceforge/plantuml/version/Version.java 2019-11-03 18:40:03.000000000 +0100 @@ -43,7 +43,7 @@ private static final int MAJOR_SEPARATOR = 1000000; public static int version() { - return 1201911; + return 1201912; } public static int versionPatched() { @@ -93,7 +93,7 @@ } public static long compileTime() { - return 1569146535007L; + return 1572776694309L; } public static String compileTimeString() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-1.2019.11/stdlib/home.repx new/plantuml-1.2019.12/stdlib/home.repx --- old/plantuml-1.2019.11/stdlib/home.repx 2019-09-22 19:20:16.000000000 +0200 +++ new/plantuml-1.2019.12/stdlib/home.repx 2019-11-03 18:40:03.000000000 +0100 @@ -8,3 +8,4 @@ office c4 osa +kubernetes Binary files old/plantuml-1.2019.11/stdlib/kubernetes-abx.repx and new/plantuml-1.2019.12/stdlib/kubernetes-abx.repx differ Binary files old/plantuml-1.2019.11/stdlib/kubernetes-dex.repx and new/plantuml-1.2019.12/stdlib/kubernetes-dex.repx differ Binary files old/plantuml-1.2019.11/stdlib/osa-abx.repx and new/plantuml-1.2019.12/stdlib/osa-abx.repx differ Binary files old/plantuml-1.2019.11/stdlib/osa-dex.repx and new/plantuml-1.2019.12/stdlib/osa-dex.repx differ
