1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-05-29 06:30:48 +00:00

Import version 1.2020.26

This commit is contained in:
Arnaud Roques 2020-12-21 20:05:24 +01:00
parent 11a9317042
commit 099843c830
13 changed files with 78 additions and 54 deletions

View File

@ -35,7 +35,7 @@
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<version>1.2020.25-SNAPSHOT</version>
<version>1.2020.27-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PlantUML</name>
@ -106,6 +106,7 @@
<include>sprites/archimate/*.png</include>
<include>net/sourceforge/plantuml/dedication/*.png</include>
<include>net/sourceforge/plantuml/math/*.js</include>
<include>net/sourceforge/plantuml/windowsdot/*.dat</include>
</includes>
</resource>
<resource>

View File

@ -49,7 +49,7 @@ import net.sourceforge.plantuml.style.StyleBuilder;
public abstract class TitledDiagram extends AbstractPSystem implements Diagram, Annotated {
public static final boolean FORCE_JDOT = false;
public static final boolean FORCE_SMETANA = false;
private DisplayPositionned title = DisplayPositionned.none(HorizontalAlignment.CENTER, VerticalAlignment.TOP);
@ -189,16 +189,16 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
return mainFrame;
}
private boolean useJDot;
private boolean useSmetana;
public void setUseJDot(boolean useJDot) {
this.useJDot = useJDot;
public void setUseSmetana(boolean useSmetana) {
this.useSmetana = useSmetana;
}
public boolean isUseJDot() {
if (FORCE_JDOT)
public boolean isUseSmetana() {
if (FORCE_SMETANA)
return true;
return useJDot;
return useSmetana;
}
public final double getScaleCoef(FileFormatOption fileFormatOption) {

View File

@ -76,11 +76,11 @@ public class CommandPragma extends SingleLineCommand2<TitledDiagram> {
}
} else {
system.getPragma().define(name, value);
if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase("smetana")) {
system.setUseJDot(true);
}
if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase("jdot")) {
system.setUseJDot(true);
return CommandExecutionResult.error("This directive has been renamed to '!pragma graphviz_dot smetana'. Please update your diagram.");
}
if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase("smetana")) {
system.setUseSmetana(true);
}
if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase(GraphvizUtils.VIZJS)) {
system.getSkinParam().setUseVizJs(true);

View File

@ -58,7 +58,7 @@ import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramTxtMaker;
import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.jdot.CucaDiagramFileMakerJDot;
import net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana;
import net.sourceforge.plantuml.security.SecurityUtils;
import net.sourceforge.plantuml.skin.VisibilityModifier;
import net.sourceforge.plantuml.statediagram.StateDiagram;
@ -649,8 +649,8 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy,
entityFactory.buildSuperGroups();
final CucaDiagramFileMaker maker = this.isUseJDot()
? new CucaDiagramFileMakerJDot(this, fileFormatOption.getDefaultStringBounder(getSkinParam()))
final CucaDiagramFileMaker maker = this.isUseSmetana()
? new CucaDiagramFileMakerSmetana(this, fileFormatOption.getDefaultStringBounder(getSkinParam()))
: new CucaDiagramFileMakerSvek(this);
final ImageData result = maker.createFile(os, getDotStrings(), fileFormatOption);

View File

@ -70,6 +70,25 @@ public class GraphvizUtils {
dotExecutable = value == null ? null : value.trim();
}
public static Graphviz createForSystemDot(ISkinParam skinParam, String dotString, String... type) {
if (useVizJs(skinParam)) {
Log.info("Using " + VIZJS);
return new GraphvizJs(dotString);
}
final AbstractGraphviz result;
if (isWindows()) {
result = new GraphvizWindowsOld(skinParam, dotString, type);
} else {
result = new GraphvizLinux(skinParam, dotString, type);
}
if (result.getExeState() != ExeState.OK && VizJsEngine.isOk()) {
Log.info("Error with file " + result.getDotExe() + ": " + result.getExeState().getTextMessage());
Log.info("Using " + VIZJS);
return new GraphvizJs(dotString);
}
return result;
}
public static Graphviz create(ISkinParam skinParam, String dotString, String... type) {
if (useVizJs(skinParam)) {
Log.info("Using " + VIZJS);
@ -77,7 +96,7 @@ public class GraphvizUtils {
}
final AbstractGraphviz result;
if (isWindows()) {
result = new GraphvizWindows(skinParam, dotString, type);
result = new GraphvizWindowsLite(skinParam, dotString, type);
} else {
result = new GraphvizLinux(skinParam, dotString, type);
}

View File

@ -41,7 +41,7 @@ import java.io.IOException;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.windowsdot.WindowsDotArchive;
class GraphvizWindows extends AbstractGraphviz {
class GraphvizWindowsLite extends AbstractGraphviz {
static private File specificDotExe;
@ -52,7 +52,7 @@ class GraphvizWindows extends AbstractGraphviz {
@Override
protected File specificDotExe() {
synchronized (GraphvizWindows.class) {
synchronized (GraphvizWindowsLite.class) {
if (specificDotExe == null)
try {
specificDotExe = new WindowsDotArchive().getWindowsExeLite();
@ -68,7 +68,7 @@ class GraphvizWindows extends AbstractGraphviz {
return false;
}
GraphvizWindows(ISkinParam skinParam, String dotString, String... type) {
GraphvizWindowsLite(ISkinParam skinParam, String dotString, String... type) {
super(skinParam, dotString, type);
}

View File

@ -70,11 +70,11 @@ public class PSystemDot extends AbstractPSystem {
@Override
final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed)
throws IOException {
final Graphviz graphviz = GraphvizUtils.create(null, data,
final Graphviz graphviz = GraphvizUtils.createForSystemDot(null, data,
StringUtils.goLowerCase(fileFormat.getFileFormat().name()));
if (graphviz.getExeState() != ExeState.OK) {
final TextBlock result = GraphicStrings.createForError(
Arrays.asList("There is an issue with your Dot/Graphviz installation"), false);
final TextBlock result = GraphicStrings
.createForError(Arrays.asList("There is an issue with your Dot/Graphviz installation"), false);
UGraphicUtils.writeImage(os, null, fileFormat, seed(), new ColorMapperIdentity(), HColorUtils.WHITE,
result);
return ImageDataSimple.error();

View File

@ -77,27 +77,27 @@ public class PSystemDonors extends AbstractPSystem {
private static final int COLS = 6;
private static final int FREE_LINES = 6;
public static final String DONORS = "6wCC0AmFkBap0wp4H6CjU-RENbb-8cPf4i7oFA4uiOZJNK3y0UwT7lSRwI-YAxltJJEYrckJSWPHVH3q"
public static final String DONORS = "6wyC0AmFkBap0wp4H6CjU-RENbb-8cPf4i7oFA4uiOZJNK3y0UwT7lSRwI-YAxltJJEYrckJSWPHVH3q"
+ "W7UtXVQXzBy-27EYV0Z-tGWU80D4ITH6ZIpt9Djjcof3Il3lEr_v9UWTth51ehbAgiMHwq-_8GFlEsFp"
+ "x3I-UFLeWZO2FmRsrQ4rLzSG2yNoF54A9IqJsjIaONRtQP2UJ-3_u5cxQ4k_PeqqL6171HxxoYzdEnzs"
+ "JLR525Eai5iX1RRUcC6TazxBPACF2h_K3w7DvWfBMSu4ucX3FRg-NXlUDcBu6ecF0HWX5cGyC0TIZfb5"
+ "575kkb5WYC31EOlPM7t9aIUJ4Cn32tdpXtfIuf7opEbmKM1w10ZOdaO1ajR8hGbdymy3qaMoHTWILvqp"
+ "Rio-SLYUaesauTF4Wic2Me0QWlmFkg3JOesF9cUx6cn9FKroxzQ2-lE0XxWsA_eAIvE4-LfxQJOKLv-o"
+ "HAgnZS_HNlC8mDrIAqTy6NrqSWJrVlCgnEf72yYFG0_LX2Nvi-m72v4GrJRiG-ywsquUimW7PCWqiGxU"
+ "nPRNP2zqSJjBIx82BABtYQzpck21BNJ5vM7W2IrTBkjy0fEMLkyNFHhMxXEkqOdTg-IUw5gmbFxxLHzc"
+ "1iK1cYun2xhJm22CfbMes404TWlT7t1J85T2kRiknUxZ8dta9m3UXFIWAsm6ue5uVf5oqo54DAHhUueL"
+ "mFXJIbqKM1POC6aJT3MgjDFBQhN7wMgPlcoCkq_Qu7cjmHYAOpfIVM6-UrMuXQ5EDPfbcxLtCQVW4ZuE"
+ "yghtpCjL09SMtdaVNFEF38WplJ8YKc-w-hOD_yZShC8mIslEpQfqL_M3cuVs7RYBHGtCA9E7J0gDEuce"
+ "gLy9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jluW2BBgpIht923"
+ "RY5xeHge3oYg2Hx8mA93roGMb78y84LIOCxPCZABb8CsuBcU0N2A0llxUmt2gHFDBsZMtfvHIEPYpCru"
+ "1X4VpiyWOPCfcnyvi2_BNBPwHMwY5kcm0z-ExpXV_uYwUX218X1bIV2YBjBXndopD6mgvZTrtCUbDcyc"
+ "ty2bQEkKWUqoazq0cm4bdWH0xA2WGiKhylDyOCivYVnxlp4LDcl2KsOyim00";
/*
* Special thanks to our sponsors and donors:
@ -111,7 +111,7 @@ public class PSystemDonors extends AbstractPSystem {
final UDrawable result = getGraphicStrings();
HColor backcolor = HColorUtils.WHITE;
final ImageParameter imageParameter = new ImageParameter(new ColorMapperIdentity(), false, null, 1.0,
getMetadata(), null, ClockwiseTopRightBottomLeft.none(), backcolor);
getMetadata(), null, ClockwiseTopRightBottomLeft.none(), backcolor);
final ImageBuilder imageBuilder = ImageBuilder.build(imageParameter);
imageBuilder.setUDrawable(result);
return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os);

View File

@ -33,7 +33,7 @@
*
*
*/
package net.sourceforge.plantuml.jdot;
package net.sourceforge.plantuml.sdot;
import static gen.lib.cgraph.attr__c.agsafeset;
import static gen.lib.cgraph.edge__c.agedge;
@ -115,7 +115,7 @@ import smetana.core.Macro;
import smetana.core.Z;
import smetana.core.debug.SmetanaDebug;
public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker {
private final CucaDiagram diagram;
@ -158,7 +158,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
continue;
}
final ST_Agedge_s edge = ent.getValue();
new JDotPath(link, edge, ymirror, diagram, getLabel(link), getQualifier(link, 1), getQualifier(link, 2))
new SmetanaPath(link, edge, ymirror, diagram, getLabel(link), getQualifier(link, 1), getQualifier(link, 2))
.drawU(ug);
}
}
@ -189,7 +189,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
public CucaDiagramFileMakerJDot(CucaDiagram diagram, StringBounder stringBounder) {
public CucaDiagramFileMakerSmetana(CucaDiagram diagram, StringBounder stringBounder) {
this.diagram = diagram;
this.stringBounder = stringBounder;
this.dotStringFactory = new DotStringFactory(stringBounder, diagram);

View File

@ -32,7 +32,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.sourceforge.plantuml.jdot;
package net.sourceforge.plantuml.sdot;
import h.ST_Agedge_s;
import h.ST_Agedgeinfo_t;

View File

@ -33,7 +33,7 @@
*
*
*/
package net.sourceforge.plantuml.jdot;
package net.sourceforge.plantuml.sdot;
import java.awt.geom.Point2D;
@ -65,7 +65,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorNone;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
import smetana.core.Macro;
public class JDotPath implements UDrawable {
public class SmetanaPath implements UDrawable {
private final Link link;
private final ST_Agedge_s edge;
@ -76,7 +76,7 @@ public class JDotPath implements UDrawable {
private final TextBlock tailLabel;
private final Rose rose = new Rose();
public JDotPath(Link link, ST_Agedge_s edge, YMirror ymirror, CucaDiagram diagram, TextBlock label,
public SmetanaPath(Link link, ST_Agedge_s edge, YMirror ymirror, CucaDiagram diagram, TextBlock label,
TextBlock tailLabel, TextBlock headLabel) {
this.link = link;
this.edge = edge;
@ -104,6 +104,10 @@ public class JDotPath implements UDrawable {
public void drawU(UGraphic ug) {
if (link.isHidden()) {
return;
}
HColor color = rose.getHtmlColor(diagram.getSkinParam(), null, getArrowColorParam());
if (this.link.getColors() != null) {

View File

@ -33,7 +33,7 @@
*
*
*/
package net.sourceforge.plantuml.jdot;
package net.sourceforge.plantuml.sdot;
import java.awt.geom.CubicCurve2D;
import java.awt.geom.Point2D;

View File

@ -44,7 +44,7 @@ public class Version {
private static final int MAJOR_SEPARATOR = 1000000;
public static int version() {
return 1202024;
return 1202026;
}
public static int versionPatched() {
@ -93,7 +93,7 @@ public class Version {
}
public static long compileTime() {
return 1608310836208L;
return 1608572707669L;
}
public static String compileTimeString() {