1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 19:09:03 +00:00

update to 1.2023.3

This commit is contained in:
Arnaud Roques 2023-03-09 19:04:46 +01:00
parent c50b364a56
commit be8454cb59
16 changed files with 36 additions and 67 deletions

View File

@ -40,7 +40,7 @@ import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.error.PSystemError;
//::uncomment when __CORE__ //::revert when __CORE__
//import com.leaningtech.client.Global; //import com.leaningtech.client.Global;
//::done //::done
@ -55,10 +55,8 @@ public class JsonResult {
private Object done() { private Object done() {
sb.append("}"); sb.append("}");
// ::comment when __CORE__ // ::revert when __CORE__
return sb.toString(); return sb.toString();
// ::done
// ::uncomment when __CORE__
// return Global.JSString(sb.toString()); // return Global.JSString(sb.toString());
// ::done // ::done
} }

View File

@ -37,7 +37,7 @@ package com.plantuml.api.cheerpj;
import net.sourceforge.plantuml.utils.Log; import net.sourceforge.plantuml.utils.Log;
//::uncomment when __CORE__ //::revert when __CORE__
//import com.leaningtech.client.Document; //import com.leaningtech.client.Document;
//import com.leaningtech.client.Element; //import com.leaningtech.client.Element;
//import com.leaningtech.client.Global; //import com.leaningtech.client.Global;
@ -48,10 +48,8 @@ public class WasmLog {
public static long start; public static long start;
public static void log(String message) { public static void log(String message) {
// ::comment when __CORE__ // ::revert when __CORE__
Log.info(message); Log.info(message);
// ::done
// ::uncomment when __CORE__
// try { // try {
// if (start > 0) { // if (start > 0) {
// final long duration = System.currentTimeMillis() - start; // final long duration = System.currentTimeMillis() - start;

View File

@ -55,7 +55,7 @@ import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.Defines;
//::uncomment when __CORE__ //::revert when __CORE__
//import com.leaningtech.client.Global; //import com.leaningtech.client.Global;
//::done //::done
@ -69,10 +69,8 @@ public class Info {
e.printStackTrace(); e.printStackTrace();
result = ""; result = "";
} }
// ::comment when __CORE__ // ::revert when __CORE__
return result; return result;
// ::done
// ::uncomment when __CORE__
// return Global.JSString(result); // return Global.JSString(result);
// ::done // ::done
} }
@ -85,10 +83,8 @@ public class Info {
e.printStackTrace(); e.printStackTrace();
result = ""; result = "";
} }
// ::comment when __CORE__ // ::revert when __CORE__
return result; return result;
// ::done
// ::uncomment when __CORE__
// return Global.JSString(result); // return Global.JSString(result);
// ::done // ::done
} }

View File

@ -59,7 +59,7 @@ import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.klimt.color.ColorMapper; import net.sourceforge.plantuml.klimt.color.ColorMapper;
import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.Defines;
//::uncomment when __CORE__ //::revert when __CORE__
//import com.leaningtech.client.Global; //import com.leaningtech.client.Global;
//::done //::done
@ -142,10 +142,8 @@ public class Png {
os64.close(); os64.close();
final String base64 = os64.toString(); final String base64 = os64.toString();
// ::comment when __CORE__ // ::revert when __CORE__
return base64; return base64;
// ::done
// ::uncomment when __CORE__
// return Global.JSString(base64); // return Global.JSString(base64);
// ::done // ::done

View File

@ -57,7 +57,7 @@ import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.klimt.color.ColorMapper; import net.sourceforge.plantuml.klimt.color.ColorMapper;
import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.Defines;
//::uncomment when __CORE__ //::revert when __CORE__
//import com.leaningtech.client.Global; //import com.leaningtech.client.Global;
//::done //::done
@ -98,10 +98,8 @@ public class Svg {
WasmLog.log("Done!"); WasmLog.log("Done!");
svgos.close(); svgos.close();
final String svg = svgos.toString(); final String svg = svgos.toString();
// ::comment when __CORE__ // ::revert when __CORE__
return svg; return svg;
// ::done
// ::uncomment when __CORE__
// return Global.JSString(svg); // return Global.JSString(svg);
// ::done // ::done

View File

@ -659,7 +659,7 @@ try {
margin = late_int (g, zz.G_margin, 8, 0); margin = late_int (g, zz.G_margin, 8, 0);
make_lrvn(g); make_lrvn(g);
for (c = 1; c <= GD_n_cluster(g); c++) { for (c = 1; c <= GD_n_cluster(g); c++) {
subg = (ST_Agraph_s) GD_clust(g).get_(c); subg = GD_clust(g).get_(c);
make_lrvn(subg); make_lrvn(subg);
make_aux_edge(GD_ln(g), GD_ln(subg), make_aux_edge(GD_ln(g), GD_ln(subg),
margin + GD_border(g)[3].x, 0); margin + GD_border(g)[3].x, 0);
@ -687,11 +687,11 @@ try {
ST_Agraph_s left, right; ST_Agraph_s left, right;
margin = late_int (g, zz.G_margin, 8, 0); margin = late_int (g, zz.G_margin, 8, 0);
for (i = 1; i <= GD_n_cluster(g); i++) for (i = 1; i <= GD_n_cluster(g); i++)
make_lrvn((ST_Agraph_s) GD_clust(g).get_(i)); make_lrvn(GD_clust(g).get_(i));
for (i = 1; i <= GD_n_cluster(g); i++) { for (i = 1; i <= GD_n_cluster(g); i++) {
for (j = i + 1; j <= GD_n_cluster(g); j++) { for (j = i + 1; j <= GD_n_cluster(g); j++) {
low = (ST_Agraph_s) GD_clust(g).get_(i); low = GD_clust(g).get_(i);
high = (ST_Agraph_s) GD_clust(g).get_(j); high = GD_clust(g).get_(j);
if (GD_minrank(low) > GD_minrank(high)) { if (GD_minrank(low) > GD_minrank(high)) {
ST_Agraph_s temp = low; ST_Agraph_s temp = low;
low = high; low = high;
@ -709,7 +709,7 @@ try {
} }
make_aux_edge(GD_rn(left), GD_ln(right), margin, 0); make_aux_edge(GD_rn(left), GD_ln(right), margin, 0);
} }
separate_subclust(zz, (ST_Agraph_s) GD_clust(g).get_(i)); separate_subclust(zz, GD_clust(g).get_(i));
} }
} finally { } finally {
LEAVING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust"); LEAVING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust");

View File

@ -270,10 +270,8 @@ public class ImageBuilder {
} }
} }
// ::comment when __CORE__ // ::revert when __CORE__
private ImageData writeImageInternal(OutputStream os, Animation animationArg) throws IOException { private ImageData writeImageInternal(OutputStream os, Animation animationArg) throws IOException {
// ::done
// ::uncomment when __CORE__
// private ImageData writeImageInternal(OutputStream os) throws IOException { // private ImageData writeImageInternal(OutputStream os) throws IOException {
// ::done // ::done
XDimension2D dim = getFinalDimension(); XDimension2D dim = getFinalDimension();
@ -294,11 +292,9 @@ public class ImageBuilder {
if (scaleFactor <= 0) if (scaleFactor <= 0)
throw new IllegalStateException("Bad scaleFactor"); throw new IllegalStateException("Bad scaleFactor");
WasmLog.log("...image drawing..."); WasmLog.log("...image drawing...");
// ::comment when __CORE__ // ::revert when __CORE__
UGraphic ug = createUGraphic(dim, animationArg, dx, dy, scaleFactor, UGraphic ug = createUGraphic(dim, animationArg, dx, dy, scaleFactor,
titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); titledDiagram == null ? new Pragma() : titledDiagram.getPragma());
// ::done
// ::uncomment when __CORE__
// UGraphic ug = createUGraphic(dim, dx, dy, scaleFactor, // UGraphic ug = createUGraphic(dim, dx, dy, scaleFactor,
// titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); // titledDiagram == null ? new Pragma() : titledDiagram.getPragma());
// ::done // ::done
@ -427,11 +423,9 @@ public class ImageBuilder {
} }
// ::done // ::done
// ::comment when __CORE__ // ::revert when __CORE__
private UGraphic createUGraphic(final XDimension2D dim, Animation animationArg, double dx, double dy, private UGraphic createUGraphic(final XDimension2D dim, Animation animationArg, double dx, double dy,
double scaleFactor, Pragma pragma) { double scaleFactor, Pragma pragma) {
// ::done
// ::uncomment when __CORE__
// private UGraphic createUGraphic(final XDimension2D dim, double dx, double dy, // private UGraphic createUGraphic(final XDimension2D dim, double dx, double dy,
// double scaleFactor, Pragma pragma) { // double scaleFactor, Pragma pragma) {
// ::done // ::done

View File

@ -54,19 +54,15 @@ import net.sourceforge.plantuml.utils.Log;
public class StringUtils { public class StringUtils {
public static String goUpperCase(String s) { public static String goUpperCase(String s) {
// ::comment when __HAXE__ // ::revert when __HAXE__
return s.toUpperCase(Locale.ENGLISH); return s.toUpperCase(Locale.ENGLISH);
// ::done
// ::uncomment when __HAXE__
// return s.toUpperCase(); // return s.toUpperCase();
// ::done // ::done
} }
public static String goLowerCase(String s) { public static String goLowerCase(String s) {
// ::comment when __HAXE__ // ::revert when __HAXE__
return s.toLowerCase(Locale.ENGLISH); return s.toLowerCase(Locale.ENGLISH);
// ::done
// ::uncomment when __HAXE__
// return s.toLowerCase(); // return s.toLowerCase();
// ::done // ::done
} }

View File

@ -37,4 +37,8 @@ package net.sourceforge.plantuml.klimt.color;
public class NoSuchColorException extends Exception { public class NoSuchColorException extends Exception {
public NoSuchColorException() {
super("NoSuchColorException");
}
} }

View File

@ -91,10 +91,8 @@ public class UFont {
} }
private static boolean doesFamilyExists(String name) { private static boolean doesFamilyExists(String name) {
// ::comment when __HAXE__ // ::revert when __HAXE__
return names.contains(name.toLowerCase()); return names.contains(name.toLowerCase());
// ::done
// ::uncomment when __HAXE__
// return true; // return true;
// ::done // ::done
} }

View File

@ -287,10 +287,8 @@ public class DrawableSet {
private void drawLineU22(UGraphic ug, boolean showTail, Page page) { private void drawLineU22(UGraphic ug, boolean showTail, Page page) {
// http://plantuml.sourceforge.net/qa/?qa=4826/lifelines-broken-for-txt-seq-diagrams-when-create-is-used // http://plantuml.sourceforge.net/qa/?qa=4826/lifelines-broken-for-txt-seq-diagrams-when-create-is-used
// ::comment when __CORE__ // ::revert when __CORE__
final boolean isTxt = ug instanceof UGraphicTxt; final boolean isTxt = ug instanceof UGraphicTxt;
// ::done
// ::uncomment when __CORE__
// final boolean isTxt = false; // final boolean isTxt = false;
// ::done // ::done
for (LivingParticipantBox box : getAllLivingParticipantBox()) { for (LivingParticipantBox box : getAllLivingParticipantBox()) {

View File

@ -51,13 +51,11 @@ public class Url implements EnsureVisible {
public Url(String url, String tooltip, String label) { public Url(String url, String tooltip, String label) {
url = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(url, "\""); url = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(url, "\"");
this.url = url; this.url = url;
// ::comment when __HAXE__ // ::revert when __HAXE__
if (tooltip == null) if (tooltip == null)
this.tooltip = url; this.tooltip = url;
else else
this.tooltip = BackSlash.manageNewLine(tooltip); this.tooltip = BackSlash.manageNewLine(tooltip);
// ::done
// ::uncomment when __HAXE__
// this.tooltip = url; // this.tooltip = url;
// ::done // ::done

View File

@ -56,24 +56,20 @@ import net.sourceforge.plantuml.utils.SignatureUtils;
public class LicenseInfo { public class LicenseInfo {
public static synchronized LicenseInfo retrieveQuick() { public static synchronized LicenseInfo retrieveQuick() {
// ::comment when __CORE__ // ::revert when __CORE__
if (cache == null) if (cache == null)
cache = retrieveDistributor(); cache = retrieveDistributor();
if (cache == null) if (cache == null)
cache = retrieveNamedSlow(); cache = retrieveNamedSlow();
return cache; return cache;
// ::done
// ::uncomment when __CORE__
// return new LicenseInfo(); // return new LicenseInfo();
// ::done // ::done
} }
public boolean isValid() { public boolean isValid() {
// ::comment when __CORE__ // ::revert when __CORE__
return owner != null && System.currentTimeMillis() <= this.expirationDate; return owner != null && System.currentTimeMillis() <= this.expirationDate;
// ::done
// ::uncomment when __CORE__
// return false; // return false;
// ::done // ::done
} }

View File

@ -46,7 +46,7 @@ public class Version {
private static final int MAJOR_SEPARATOR = 1000000; private static final int MAJOR_SEPARATOR = 1000000;
public static int version() { public static int version() {
return 1202302; return 1202303;
} }
public static int versionPatched() { public static int versionPatched() {
@ -82,7 +82,7 @@ public class Version {
} }
public static int beta() { public static int beta() {
final int beta = 7; final int beta = 0;
return beta; return beta;
} }
@ -95,7 +95,7 @@ public class Version {
} }
public static long compileTime() { public static long compileTime() {
return 1677403547300L; return 1678383018950L;
} }
public static String compileTimeString() { public static String compileTimeString() {

View File

@ -83,6 +83,7 @@ final public class Macro {
} }
public static __ptr__ UNSUPPORTED(String comment) { public static __ptr__ UNSUPPORTED(String comment) {
SmetanaDebug.LIST_METHODS();
throw new UnsupportedOperationException(comment); throw new UnsupportedOperationException(comment);
} }

View File

@ -40,10 +40,8 @@ import java.util.concurrent.atomic.AtomicInteger;
public class UnsupportedStarStruct implements __struct__, __ptr__ { public class UnsupportedStarStruct implements __struct__, __ptr__ {
// ::comment when __CORE__ // ::revert when __CORE__
public final static AtomicInteger CPT = new AtomicInteger(); public final static AtomicInteger CPT = new AtomicInteger();
// ::done
// ::uncomment when __CORE__
// public static int CPT; // public static int CPT;
// ::done // ::done
public final int UID; public final int UID;
@ -51,10 +49,8 @@ public class UnsupportedStarStruct implements __struct__, __ptr__ {
public static UnsupportedStarStruct SPY_ME; public static UnsupportedStarStruct SPY_ME;
public UnsupportedStarStruct() { public UnsupportedStarStruct() {
// ::comment when __CORE__ // ::revert when __CORE__
this.UID = CPT.incrementAndGet(); this.UID = CPT.incrementAndGet();
// ::done
// ::uncomment when __CORE__
// this.UID = CPT++; // this.UID = CPT++;
// ::done // ::done
} }