mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-25 22:37:33 +00:00
wip
This commit is contained in:
parent
eddf1c5470
commit
f4221e340a
@ -40,7 +40,7 @@ import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
|
||||
//::uncomment when CORE
|
||||
//::uncomment when __CORE__
|
||||
//import com.leaningtech.client.Global;
|
||||
//::done
|
||||
|
||||
@ -55,10 +55,10 @@ public class JsonResult {
|
||||
|
||||
private Object done() {
|
||||
sb.append("}");
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
return sb.toString();
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return Global.JSString(sb.toString());
|
||||
// ::done
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
package com.plantuml.api.cheerpj;
|
||||
|
||||
public class StaticMemory {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public static String cheerpjPath = "/app/";
|
||||
public static String elementIdDebugJava;
|
||||
|
@ -37,7 +37,7 @@ package com.plantuml.api.cheerpj;
|
||||
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
//::uncomment when CORE
|
||||
//::uncomment when __CORE__
|
||||
//import com.leaningtech.client.Document;
|
||||
//import com.leaningtech.client.Element;
|
||||
//import com.leaningtech.client.Global;
|
||||
@ -48,10 +48,10 @@ public class WasmLog {
|
||||
public static long start;
|
||||
|
||||
public static void log(String message) {
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
Log.info(message);
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// try {
|
||||
// if (start > 0) {
|
||||
// final long duration = System.currentTimeMillis() - start;
|
||||
|
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
|
||||
//::uncomment when CORE
|
||||
//::uncomment when __CORE__
|
||||
//import com.leaningtech.client.Global;
|
||||
//::done
|
||||
|
||||
@ -69,10 +69,10 @@ public class Info {
|
||||
e.printStackTrace();
|
||||
result = "";
|
||||
}
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
return result;
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return Global.JSString(result);
|
||||
// ::done
|
||||
}
|
||||
@ -85,10 +85,10 @@ public class Info {
|
||||
e.printStackTrace();
|
||||
result = "";
|
||||
}
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
return result;
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return Global.JSString(result);
|
||||
// ::done
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.klimt.color.ColorMapper;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
|
||||
//::uncomment when CORE
|
||||
//::uncomment when __CORE__
|
||||
//import com.leaningtech.client.Global;
|
||||
//::done
|
||||
|
||||
@ -142,10 +142,10 @@ public class Png {
|
||||
os64.close();
|
||||
|
||||
final String base64 = os64.toString();
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
return base64;
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return Global.JSString(base64);
|
||||
// ::done
|
||||
|
||||
|
@ -57,11 +57,12 @@ import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.klimt.color.ColorMapper;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
|
||||
//::uncomment when CORE
|
||||
//::uncomment when __CORE__
|
||||
//import com.leaningtech.client.Global;
|
||||
//::done
|
||||
|
||||
public class Svg {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public static Object convert(String mode, String text) {
|
||||
final long start = System.currentTimeMillis();
|
||||
@ -97,10 +98,10 @@ public class Svg {
|
||||
WasmLog.log("Done!");
|
||||
svgos.close();
|
||||
final String svg = svgos.toString();
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
return svg;
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return Global.JSString(svg);
|
||||
// ::done
|
||||
|
||||
|
@ -97,7 +97,7 @@ import ext.plantuml.com.ctreber.aclib.sort.QuickSort;
|
||||
* @author Christian Treber, ct@ctreber.com
|
||||
*/
|
||||
public class ACearth {
|
||||
// :: remove folder when CORE
|
||||
// :: remove folder when __CORE__
|
||||
public static final String VERSION = "1.1";
|
||||
public static final String BUILD = "22.11.2002 004";
|
||||
|
||||
|
@ -22,6 +22,7 @@ import ext.plantuml.com.ctreber.aclib.gui.MonitoredObject;
|
||||
*
|
||||
*/
|
||||
public class Configuration {
|
||||
// ::remove folder when __HAXE__
|
||||
private Map fValues = new HashMap();
|
||||
|
||||
/**
|
||||
|
@ -15,6 +15,7 @@ import ext.plantuml.com.ctreber.acearth.ACearth;
|
||||
*
|
||||
*/
|
||||
public class CanvasACearth extends PixelCanvas {
|
||||
// ::remove folder when __HAXE__
|
||||
public CanvasACearth(ACearth pParent, int pWidth, int pHeight) {
|
||||
super(pWidth, pHeight);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import ext.plantuml.com.ctreber.acearth.plugins.Plugin;
|
||||
*
|
||||
*/
|
||||
public class PluginMarkers extends Plugin {
|
||||
// ::remove folder when __HAXE__
|
||||
private List fMarkers;
|
||||
|
||||
// private String fMarkerFileName = ACearth.getHomeDir() +
|
||||
|
@ -14,6 +14,7 @@ import ext.plantuml.com.ctreber.acearth.util.Toolkit;
|
||||
*/
|
||||
abstract public class Projection
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
// Target information
|
||||
int fImageHeight;
|
||||
int fImageWidth;
|
||||
|
@ -12,6 +12,7 @@ import java.awt.Color;
|
||||
*
|
||||
*/
|
||||
public interface RenderTarget {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB);
|
||||
|
||||
|
@ -9,6 +9,7 @@ package ext.plantuml.com.ctreber.acearth.scanbit;
|
||||
*/
|
||||
abstract public class ScanBitGenerator
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
int fImageHeight;
|
||||
int fImageWidth;
|
||||
protected ScanBit[] fScanBitsArray;
|
||||
|
@ -11,6 +11,7 @@ import java.util.Random;
|
||||
*/
|
||||
public class DotGeneratorStars extends ScanDotGenerator
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
private final int fImageWidth;
|
||||
private final int fImageHeight;
|
||||
private int fBigStars;
|
||||
|
@ -17,6 +17,7 @@ import ext.plantuml.com.ctreber.acearth.util.Point3D;
|
||||
*/
|
||||
abstract public class Shader
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
private static final Color COLOR_SPACE = Color.black;
|
||||
private static final Color COLOR_STAR = Color.white;
|
||||
private static final Color COLOR_WATER = Color.blue;
|
||||
|
@ -9,6 +9,7 @@ package ext.plantuml.com.ctreber.acearth.util;
|
||||
*/
|
||||
public class Point3D
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
private double fX;
|
||||
private double fY;
|
||||
private double fZ;
|
||||
|
@ -9,7 +9,7 @@ package ext.plantuml.com.ctreber.aclib.gui;
|
||||
*/
|
||||
public class MOBoolean extends MonitoredObject
|
||||
{
|
||||
// :: remove folder when CORE
|
||||
// :: remove folder when __CORE__
|
||||
private boolean fBoolean;
|
||||
|
||||
public MOBoolean()
|
||||
|
@ -11,6 +11,7 @@ package ext.plantuml.com.ctreber.aclib.gui;
|
||||
*/
|
||||
public class MOString extends MonitoredObject
|
||||
{
|
||||
// ::remove folder when __HAXE__
|
||||
private String fString;
|
||||
|
||||
public MOString(String pString)
|
||||
|
@ -11,7 +11,8 @@ import java.util.Comparator;
|
||||
*/
|
||||
abstract public class CTSort
|
||||
{
|
||||
// :: remove folder when CORE
|
||||
// ::remove folder when __HAXE__
|
||||
// :: remove folder when __CORE__
|
||||
public void sort(Object[] items)
|
||||
{
|
||||
sort(items, new DefaultComparator());
|
||||
|
@ -24,7 +24,8 @@ import java.util.Hashtable;
|
||||
* @author Sean Owen
|
||||
*/
|
||||
public final class BarcodeFormat {
|
||||
// :: remove folder when CORE
|
||||
// ::remove folder when __HAXE__
|
||||
// :: remove folder when __CORE__
|
||||
|
||||
// No, we can't use an enum here. J2ME doesn't support it.
|
||||
|
||||
|
@ -28,6 +28,7 @@ import ext.plantuml.com.google.zxing.common.BitMatrix;
|
||||
* @author Sean Owen
|
||||
*/
|
||||
public final class MatrixToImageWriter {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
private static final int BLACK = 0xFF000000;
|
||||
private static final int WHITE = 0xFFFFFFFF;
|
||||
|
@ -26,6 +26,7 @@ package ext.plantuml.com.google.zxing.common.reedsolomon;
|
||||
* @author Sean Owen
|
||||
*/
|
||||
final class GF256Poly {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
private final GF256 field;
|
||||
private final int[] coefficients;
|
||||
|
@ -25,6 +25,7 @@ import ext.plantuml.com.google.zxing.FormatException;
|
||||
* @author bbrown@google.com (Brian Brown)
|
||||
*/
|
||||
public final class Version {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
private static final Version[] VERSIONS = buildVersions();
|
||||
|
||||
|
@ -30,6 +30,7 @@ import ext.plantuml.com.google.zxing.common.BitMatrix;
|
||||
* @author Sean Owen
|
||||
*/
|
||||
abstract class DataMask {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
/**
|
||||
* See ISO 18004:2006 6.8.1
|
||||
|
@ -21,6 +21,7 @@ package ext.plantuml.com.google.zxing.qrcode.encoder;
|
||||
* @author dswitkin@google.com (Daniel Switkin) - ported from C++
|
||||
*/
|
||||
public final class MaskUtil {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
private MaskUtil() {
|
||||
// do nothing
|
||||
|
@ -26,6 +26,7 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.CONSTRUCTOR, ElementType.METHOD })
|
||||
public @interface Comment {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
String comment();
|
||||
|
||||
|
@ -60,6 +60,7 @@ import smetana.core.ZType;
|
||||
import smetana.core.size_t;
|
||||
|
||||
public class dtopen__c {
|
||||
// ::remove folder when __HAXE__
|
||||
//1 9k44uhd5foylaeoekf3llonjq
|
||||
// extern Dtmethod_t* Dtset
|
||||
|
||||
|
@ -73,6 +73,7 @@ import smetana.core.Memory;
|
||||
import smetana.core.__ptr__;
|
||||
|
||||
public class id__c {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public static CFunction idopen = new CFunctionAbstract("idopen") {
|
||||
|
||||
|
@ -111,6 +111,7 @@ import smetana.core.ZType;
|
||||
import smetana.core.__ptr__;
|
||||
|
||||
public class splines__c {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
|
||||
|
||||
|
@ -80,6 +80,7 @@ import smetana.core.CString;
|
||||
import smetana.core.Globals;
|
||||
|
||||
public class class1__c {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
|
||||
@Reviewed(when = "13/11/2020")
|
||||
|
@ -59,6 +59,7 @@ import smetana.core.CString;
|
||||
import smetana.core.Globals;
|
||||
|
||||
public class gvc__c {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
|
||||
//3 f3vdhir2c7dz3pvmx9d3m4lx1
|
||||
|
@ -67,6 +67,7 @@ import smetana.core.Memory;
|
||||
import smetana.core.__ptr__;
|
||||
|
||||
public class index__c {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
|
||||
//3 1rfaqe5urty5uyp5xb2r0idce
|
||||
|
@ -58,6 +58,7 @@ import smetana.core.CString;
|
||||
import smetana.core.Globals;
|
||||
|
||||
public class pack__c {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
|
||||
|
||||
|
@ -64,6 +64,7 @@ import smetana.core.__ptr__;
|
||||
import smetana.core.jmp_buf;
|
||||
|
||||
public class shortest__c {
|
||||
// ::remove folder when __HAXE__
|
||||
//1 baedz5i9est5csw3epz3cv7z
|
||||
// typedef Ppoly_t Ppolyline_t
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
package gen.plugin.dot_layout;
|
||||
|
||||
public class gvlayout_dot_layout__c {
|
||||
// ::remove folder when __HAXE__
|
||||
//1 2digov3edok6d5srhgtlmrycs
|
||||
// extern lt_symlist_t lt_preloaded_symbols[]
|
||||
|
||||
|
@ -50,6 +50,7 @@ import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.__ptr__;
|
||||
|
||||
public class ST_Agrec_s extends UnsupportedStarStruct {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public CString name;
|
||||
public ST_Agrec_s next;
|
||||
|
@ -48,7 +48,8 @@ import jcckit.util.Factory;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class GraphicsPlotCanvas extends PlotCanvas {
|
||||
// ::remove folder when CORE
|
||||
// ::remove folder when __CORE__
|
||||
// ::remove folder when __HAXE__
|
||||
/** Key of a configuration parameter. */
|
||||
public static final String BACKGROUND_KEY = "background";
|
||||
public static final String FOREGROUND_KEY = "foreground";
|
||||
|
@ -26,6 +26,7 @@ import jcckit.util.ConfigParameters;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class DataCurve extends DataContainer implements DataElement {
|
||||
// ::remove folder when __HAXE__
|
||||
/** Config parameter key. */
|
||||
public static final String X_KEY = "x",
|
||||
Y_KEY = "y",
|
||||
|
@ -24,6 +24,7 @@ package jcckit.graphic;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class Oval extends Rectangle {
|
||||
// ::remove folder when __HAXE__
|
||||
/**
|
||||
* Creates a new instance.
|
||||
* @param center The position of the center of this element.
|
||||
|
@ -36,6 +36,7 @@ import jcckit.util.Factory;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class SimpleCurve implements Curve {
|
||||
// ::remove folder when __HAXE__
|
||||
/** Configuration parameter key. */
|
||||
public static final String SYMBOL_FACTORY_KEY = "symbolFactory",
|
||||
WITH_LINE_KEY = "withLine",
|
||||
|
@ -36,6 +36,7 @@ import jcckit.graphic.GraphPoint;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class Transformation {
|
||||
// ::remove folder when __HAXE__
|
||||
private final double _scale, _x0, _y0;
|
||||
|
||||
public String toString() {
|
||||
|
@ -31,6 +31,7 @@ import jcckit.util.Util;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class CartesianTransformation implements Transformation {
|
||||
// ::remove folder when __HAXE__
|
||||
private final boolean _xLogScale;
|
||||
private final double _xOffset;
|
||||
private final double _xScale;
|
||||
|
@ -27,6 +27,7 @@ package jcckit.util;
|
||||
* @author Franz-Josef Elmer
|
||||
*/
|
||||
public class ConfigParametersBasedConfigData implements ConfigData {
|
||||
// ::remove folder when __HAXE__
|
||||
private ConfigParameters _config;
|
||||
private ConfigParameters _defaultConfig;
|
||||
|
||||
|
@ -361,7 +361,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy,
|
||||
return result.toArray(new String[result.size()]);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private void createFilesGraphml(OutputStream suggestedFile) throws IOException {
|
||||
final CucaDiagramGraphmlMaker maker = new CucaDiagramGraphmlMaker(this);
|
||||
maker.createFiles(suggestedFile);
|
||||
@ -399,7 +399,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy,
|
||||
throws IOException {
|
||||
final FileFormat fileFormat = fileFormatOption.getFileFormat();
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) {
|
||||
try {
|
||||
createFilesTxt(os, index, fileFormat);
|
||||
@ -431,13 +431,13 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy,
|
||||
|
||||
this.eventuallyBuildPhantomGroups();
|
||||
final CucaDiagramFileMaker maker;
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (this.isUseElk())
|
||||
maker = new CucaDiagramFileMakerElk(this, fileFormatOption.getDefaultStringBounder(getSkinParam()));
|
||||
else if (this.isUseSmetana())
|
||||
// ::done
|
||||
maker = new CucaDiagramFileMakerSmetana(this, fileFormatOption.getDefaultStringBounder(getSkinParam()));
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
else
|
||||
maker = new CucaDiagramFileMakerSvek(this);
|
||||
// ::done
|
||||
|
@ -113,7 +113,7 @@ import net.sourceforge.plantuml.url.Url;
|
||||
|
||||
public class ImageBuilder {
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private Animation animation;
|
||||
// ::done
|
||||
private boolean annotations;
|
||||
@ -223,7 +223,7 @@ public class ImageBuilder {
|
||||
public ImageBuilder styled(TitledDiagram diagram) {
|
||||
skinParam = diagram.getSkinParam();
|
||||
stringBounder = fileFormatOption.getDefaultStringBounder(skinParam);
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
animation = diagram.getAnimation();
|
||||
// ::done
|
||||
annotations = true;
|
||||
@ -246,7 +246,7 @@ public class ImageBuilder {
|
||||
udrawable = annotatedWorker.addAdd((TextBlock) udrawable);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
switch (fileFormatOption.getFileFormat()) {
|
||||
case MJPEG:
|
||||
return writeImageMjpeg(os);
|
||||
@ -255,10 +255,10 @@ public class ImageBuilder {
|
||||
default:
|
||||
return writeImageInternal(os, animation);
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return writeImageInternal(os);
|
||||
// ::done
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
}
|
||||
// ::done
|
||||
}
|
||||
@ -270,16 +270,16 @@ public class ImageBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private ImageData writeImageInternal(OutputStream os, Animation animationArg) throws IOException {
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// private ImageData writeImageInternal(OutputStream os) throws IOException {
|
||||
// ::done
|
||||
XDimension2D dim = getFinalDimension();
|
||||
double dx = 0;
|
||||
double dy = 0;
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (animationArg != null) {
|
||||
final MinMax minmax = animationArg.getMinMax(dim);
|
||||
animationArg.setDimension(dim);
|
||||
@ -294,11 +294,11 @@ public class ImageBuilder {
|
||||
if (scaleFactor <= 0)
|
||||
throw new IllegalStateException("Bad scaleFactor");
|
||||
WasmLog.log("...image drawing...");
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
UGraphic ug = createUGraphic(dim, animationArg, dx, dy, scaleFactor,
|
||||
titledDiagram == null ? new Pragma() : titledDiagram.getPragma());
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// UGraphic ug = createUGraphic(dim, dx, dy, scaleFactor,
|
||||
// titledDiagram == null ? new Pragma() : titledDiagram.getPragma());
|
||||
// ::done
|
||||
@ -330,7 +330,7 @@ public class ImageBuilder {
|
||||
|
||||
UStroke stroke = skinParam.getThickness(LineParam.diagramBorder, null);
|
||||
if (stroke == null && color != null)
|
||||
stroke = new UStroke();
|
||||
stroke = UStroke.simple();
|
||||
if (stroke == null)
|
||||
return;
|
||||
|
||||
@ -368,7 +368,7 @@ public class ImageBuilder {
|
||||
return ug;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private ImageData writeImageMjpeg(OutputStream os) throws IOException {
|
||||
|
||||
final XDimension2D dim = getFinalDimension();
|
||||
@ -427,11 +427,11 @@ public class ImageBuilder {
|
||||
}
|
||||
// ::done
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private UGraphic createUGraphic(final XDimension2D dim, Animation animationArg, double dx, double dy,
|
||||
double scaleFactor, Pragma pragma) {
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// private UGraphic createUGraphic(final XDimension2D dim, double dx, double dy,
|
||||
// double scaleFactor, Pragma pragma) {
|
||||
// ::done
|
||||
@ -439,17 +439,17 @@ public class ImageBuilder {
|
||||
switch (fileFormatOption.getFileFormat()) {
|
||||
case PNG:
|
||||
case RAW:
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
return createUGraphicPNG(scaleFactor, dim, animationArg, dx, dy, fileFormatOption.getWatermark(),
|
||||
fileFormatOption.getFileFormat());
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return createUGraphicPNG(scaleFactor, dim, dx, dy,
|
||||
// fileFormatOption.getWatermark(), fileFormatOption.getFileFormat());
|
||||
// ::done
|
||||
case SVG:
|
||||
return createUGraphicSVG(scaleFactor, dim, pragma);
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
case EPS:
|
||||
return new UGraphicEps(backcolor, colorMapper, stringBounder, EpsStrategy.getDefault2());
|
||||
case EPS_TEXT:
|
||||
@ -498,11 +498,11 @@ public class ImageBuilder {
|
||||
|
||||
}
|
||||
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D
|
||||
// dim, double dx, double dy, String watermark, FileFormat format) {
|
||||
// ::done
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D dim, Animation affineTransforms,
|
||||
double dx, double dy, String watermark, FileFormat format) {
|
||||
// ::done
|
||||
@ -519,11 +519,11 @@ public class ImageBuilder {
|
||||
(int) (dim.getHeight() * scaleFactor), pngBackColor, stringBounder);
|
||||
final Graphics2D graphics2D = builder.getGraphics2D();
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
final UGraphicG2d ug = new UGraphicG2d(backcolor, fileFormatOption.getColorMapper(), stringBounder, graphics2D,
|
||||
scaleFactor, affineTransforms == null ? null : affineTransforms.getFirst(), dx, dy, format);
|
||||
// ::done
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// final UGraphicG2d ug = new UGraphicG2d(backcolor,
|
||||
// fileFormatOption.getColorMapper(), stringBounder, graphics2D,
|
||||
// scaleFactor, dx, dy, format);
|
||||
|
@ -44,6 +44,7 @@ import net.sourceforge.plantuml.klimt.shape.TextBlock;
|
||||
import net.sourceforge.plantuml.klimt.shape.UEmpty;
|
||||
|
||||
public class SpecialText implements UShapeIgnorableForCompression {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
private final TextBlock title;
|
||||
|
||||
|
@ -68,6 +68,7 @@ import net.sourceforge.plantuml.version.License;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public abstract class AbstractPSystem implements Diagram {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final UmlSource source;
|
||||
private Scale scale;
|
||||
@ -84,7 +85,7 @@ public abstract class AbstractPSystem implements Diagram {
|
||||
toAppend.append(Version.versionString());
|
||||
toAppend.append("(" + Version.compileTimeString() + ")\n");
|
||||
toAppend.append("(" + License.getCurrent() + " source distribution)\n");
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
for (String name : OptionPrint.interestingProperties()) {
|
||||
toAppend.append(name);
|
||||
toAppend.append(BackSlash.CHAR_NEWLINE);
|
||||
@ -186,7 +187,7 @@ public abstract class AbstractPSystem implements Diagram {
|
||||
// }
|
||||
return exportDiagramNow(os, index, fileFormatOption);
|
||||
} finally {
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (OptionFlags.getInstance().isEnableStats())
|
||||
StatsUtilsIncrement.onceMoreGenerate(System.currentTimeMillis() - now, getClass(),
|
||||
fileFormatOption.getFileFormat());
|
||||
|
@ -67,7 +67,8 @@ import java.io.OutputStream;
|
||||
*/
|
||||
|
||||
public class AnimatedGifEncoder {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
protected int width; // image size
|
||||
|
||||
|
@ -41,6 +41,7 @@ import net.sourceforge.plantuml.cucadiagram.DisplaySection;
|
||||
import net.sourceforge.plantuml.klimt.creole.Display;
|
||||
|
||||
public interface Annotated {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public DisplayPositionned getTitle();
|
||||
|
||||
|
@ -63,6 +63,7 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
import net.sourceforge.plantuml.svek.DecorateEntityImage;
|
||||
|
||||
public class AnnotatedBuilder {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final Annotated annotated;
|
||||
private final ISkinParam skinParam;
|
||||
|
@ -43,6 +43,7 @@ import net.sourceforge.plantuml.style.ISkinParam;
|
||||
import net.sourceforge.plantuml.svek.DecorateEntityImage;
|
||||
|
||||
public class AnnotatedWorker {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final Annotated annotated;
|
||||
private final ISkinParam skinParam;
|
||||
|
@ -67,6 +67,7 @@ import net.sourceforge.plantuml.utils.StartUtils;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public class BlockUml {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final List<StringLocated> rawSource;
|
||||
private final List<StringLocated> data;
|
||||
@ -85,7 +86,7 @@ public class BlockUml {
|
||||
this(convert(strings), Defines.createEmpty(), null, null, null);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public String getEncodedUrl() throws IOException {
|
||||
final Transcoder transcoder = TranscoderUtil.getDefaultTranscoder();
|
||||
final String source = getDiagram().getSource().getPlainString();
|
||||
@ -150,7 +151,7 @@ public class BlockUml {
|
||||
}
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public String getFileOrDirname() {
|
||||
if (OptionFlags.getInstance().isWord())
|
||||
return null;
|
||||
@ -194,7 +195,7 @@ public class BlockUml {
|
||||
return data;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private String internalEtag() {
|
||||
try {
|
||||
final AsciiEncoder coder = new AsciiEncoder();
|
||||
|
@ -62,6 +62,7 @@ import net.sourceforge.plantuml.text.StringLocated;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
public final class BlockUmlBuilder implements DefinitionsContainer {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final List<BlockUml> blocks = new ArrayList<>();
|
||||
private Set<FileWithSuffix> usedFiles = new HashSet<>();
|
||||
|
@ -40,6 +40,7 @@ import java.util.List;
|
||||
import net.sourceforge.plantuml.preproc2.PreprocessorModeSet;
|
||||
|
||||
public interface DefinitionsContainer extends PreprocessorModeSet {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public List<String> getDefinition(String name);
|
||||
|
||||
|
@ -64,6 +64,7 @@ import net.sourceforge.plantuml.style.ISkinSimple;
|
||||
import net.sourceforge.plantuml.text.StringLocated;
|
||||
|
||||
public class EmbeddedDiagram extends AbstractTextBlock implements Line, Atom {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public static final String EMBEDDED_START = "{{";
|
||||
public static final String EMBEDDED_END = "}}";
|
||||
|
@ -51,6 +51,7 @@ import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class EmptyImageBuilder {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final BufferedImage im;
|
||||
private final Graphics2D g2d;
|
||||
@ -70,7 +71,7 @@ public class EmptyImageBuilder {
|
||||
if (width <= 0 || height <= 0)
|
||||
throw new IllegalArgumentException("width and height must be positive");
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (width > GraphvizUtils.getenvImageLimit()) {
|
||||
Log.info("Width too large " + width + ". You should set PLANTUML_LIMIT_SIZE");
|
||||
width = GraphvizUtils.getenvImageLimit();
|
||||
|
@ -72,12 +72,12 @@ public class ErrorStatus {
|
||||
}
|
||||
|
||||
public int getExitCode() {
|
||||
if (isNoData()) {
|
||||
if (isNoData())
|
||||
return 100;
|
||||
}
|
||||
if (hasErrors) {
|
||||
|
||||
if (hasErrors)
|
||||
return 200;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ import java.util.Objects;
|
||||
import net.sourceforge.plantuml.utils.LineLocation;
|
||||
|
||||
public class ErrorUml {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final String error;
|
||||
private final ErrorUmlType type;
|
||||
|
@ -64,8 +64,8 @@ import net.sourceforge.plantuml.text.SvgCharSizeHack;
|
||||
*
|
||||
*/
|
||||
public enum FileFormat {
|
||||
|
||||
// ::comment when CORE
|
||||
// ::remove file when __HAXE__
|
||||
// ::comment when __CORE__
|
||||
EPS("application/postscript"), //
|
||||
EPS_TEXT("application/postscript"), //
|
||||
ATXT("text/plain"), //
|
||||
@ -108,7 +108,7 @@ public enum FileFormat {
|
||||
* @return a string starting by a point.
|
||||
*/
|
||||
public String getFileSuffix() {
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (name().startsWith("XMI"))
|
||||
return ".xmi";
|
||||
|
||||
@ -143,7 +143,7 @@ public enum FileFormat {
|
||||
}
|
||||
|
||||
public StringBounder getDefaultStringBounder(TikzFontDistortion tikzFontDistortion, SvgCharSizeHack charSizeHack) {
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (this == LATEX || this == LATEX_NO_PREAMBLE)
|
||||
return getTikzStringBounder(tikzFontDistortion);
|
||||
|
||||
@ -202,7 +202,7 @@ public enum FileFormat {
|
||||
return new XDimension2D(rect.getWidth(), rect.getHeight());
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private StringBounder getBrailleStringBounder() {
|
||||
return new StringBounderRaw(FileFormat.gg.getFontRenderContext()) {
|
||||
public String toString() {
|
||||
|
@ -51,6 +51,7 @@ import net.sourceforge.plantuml.text.SvgCharSizeHack;
|
||||
*
|
||||
*/
|
||||
public final class FileFormatOption implements Serializable {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final FileFormat fileFormat;
|
||||
private boolean withMetadata;
|
||||
|
@ -39,6 +39,7 @@ import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class FileImageData {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public static final int ERROR = 400;
|
||||
public static final int CRASH = 503;
|
||||
|
@ -42,6 +42,7 @@ import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class FileSystem {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final static FileSystem singleton = new FileSystem();
|
||||
|
||||
@ -65,7 +66,7 @@ public class FileSystem {
|
||||
}
|
||||
|
||||
public SFile getCurrentDir() {
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
final String path = this.currentDir.get();
|
||||
if (path != null)
|
||||
return new SFile(path);
|
||||
@ -75,11 +76,11 @@ public class FileSystem {
|
||||
}
|
||||
|
||||
public SFile getFile(String nameOrPath) throws IOException {
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// return null;
|
||||
// ::done
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (isAbsolute(nameOrPath)) {
|
||||
final SFile result = new SFile(nameOrPath);
|
||||
Log.info("Trying " + result.getAbsolutePath());
|
||||
@ -117,7 +118,7 @@ public class FileSystem {
|
||||
// ::done
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private boolean isAbsolute(String nameOrPath) {
|
||||
final SFile f = new SFile(nameOrPath);
|
||||
return f.isAbsolute();
|
||||
|
@ -53,6 +53,7 @@ import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
// Used by the Eclipse Plugin, so do not change package location.
|
||||
public class FileUtils {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private static AtomicInteger counter;
|
||||
|
||||
@ -105,7 +106,7 @@ public class FileUtils {
|
||||
return readSvg(br, true, true);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
static public File createTempFileLegacy(String prefix, String suffix) throws IOException {
|
||||
if (suffix.startsWith(".") == false)
|
||||
throw new IllegalArgumentException();
|
||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml;
|
||||
import java.io.File;
|
||||
|
||||
public interface GeneratedImage extends Comparable<GeneratedImage> {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public File getPngFile();
|
||||
|
||||
|
@ -44,6 +44,7 @@ import net.sourceforge.plantuml.log.Logme;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class GeneratedImageImpl implements GeneratedImage {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final SFile pngFile;
|
||||
private final String description;
|
||||
|
@ -39,7 +39,8 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public interface ISourceFileReader {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public List<GeneratedImage> getGeneratedImages() throws IOException;
|
||||
|
||||
|
@ -51,6 +51,7 @@ import net.sourceforge.plantuml.klimt.color.NoSuchColorException;
|
||||
import net.sourceforge.plantuml.utils.BlocLines;
|
||||
|
||||
public class NewpagedDiagram extends AbstractPSystem {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final List<Diagram> diagrams = new ArrayList<>();
|
||||
|
||||
|
@ -40,6 +40,7 @@ import java.io.OutputStream;
|
||||
|
||||
// Modified by Maxime Sinclair
|
||||
public class NullOutputStream extends OutputStream {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
/**
|
||||
* Writes to nowhere
|
||||
|
@ -59,14 +59,15 @@ import net.sourceforge.plantuml.stats.StatsUtils;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class Option {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final List<String> excludes = new ArrayList<>();
|
||||
private final List<String> config = new ArrayList<>();
|
||||
private final Map<String, String> defines = new LinkedHashMap<String, String>();
|
||||
|
||||
private String charset;
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private boolean computeurl = false;
|
||||
private boolean decodeurl = false;
|
||||
private boolean pipe = false;
|
||||
@ -86,7 +87,7 @@ public class Option {
|
||||
private boolean debugsvek = false;
|
||||
private int nbThreads = 0;
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private boolean splash = false;
|
||||
private boolean textProgressBar = false;
|
||||
private int ftpPort = -1;
|
||||
@ -121,7 +122,7 @@ public class Option {
|
||||
this.fileFormatOption = newFormat;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public Option(String... arg) throws InterruptedException, IOException {
|
||||
if (arg.length == 0)
|
||||
OptionFlags.getInstance().setGui(true);
|
||||
@ -527,7 +528,7 @@ public class Option {
|
||||
return Collections.unmodifiableList(excludes);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public Defines getDefaultDefines(SFile f) {
|
||||
final Defines result = Defines.createWithFileName(f);
|
||||
for (Map.Entry<String, String> ent : defines.entrySet()) {
|
||||
@ -583,7 +584,7 @@ public class Option {
|
||||
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public final boolean isComputeurl() {
|
||||
return computeurl;
|
||||
}
|
||||
@ -631,7 +632,7 @@ public class Option {
|
||||
return Runtime.getRuntime().availableProcessors();
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public final boolean isCheckOnly() {
|
||||
return checkOnly;
|
||||
}
|
||||
@ -677,7 +678,7 @@ public class Option {
|
||||
return debugsvek;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
public final boolean isSplash() {
|
||||
return splash;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class OptionFlags {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private static final OptionFlags singleton = new OptionFlags();
|
||||
static public final boolean STRICT_SELFMESSAGE_POSITION = true;
|
||||
@ -68,7 +69,7 @@ public class OptionFlags {
|
||||
this.replaceWhiteBackgroundByTransparent = replaceWhiteBackgroundByTransparent;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
// static public final boolean PBBACK = false;
|
||||
// static public boolean GRAPHVIZCACHE = false;
|
||||
// static public final boolean TRACE_DOT = false;
|
||||
|
@ -36,6 +36,7 @@
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
public enum OptionPreprocOutputMode {
|
||||
// ::remove file when __HAXE__
|
||||
NORMAL, CYPHER
|
||||
|
||||
}
|
||||
|
@ -56,7 +56,8 @@ import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public class OptionPrint {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
static public void printTestDot() throws InterruptedException {
|
||||
final List<String> result = new ArrayList<>();
|
||||
|
@ -109,6 +109,7 @@ import net.sourceforge.plantuml.wire.WireDiagramFactory;
|
||||
import net.sourceforge.plantuml.yaml.YamlDiagramFactory;
|
||||
|
||||
public class PSystemBuilder {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public static final long startTime = System.currentTimeMillis();
|
||||
|
||||
@ -154,7 +155,7 @@ public class PSystemBuilder {
|
||||
return result;
|
||||
} finally {
|
||||
WasmLog.log("...parsing ok...");
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (result != null && OptionFlags.getInstance().isEnableStats()) {
|
||||
StatsUtilsIncrement.onceMoreParse(System.currentTimeMillis() - now, result.getClass());
|
||||
}
|
||||
@ -176,14 +177,14 @@ public class PSystemBuilder {
|
||||
factories.add(new StateDiagramFactory());
|
||||
factories.add(new ActivityDiagramFactory3());
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new BpmDiagramFactory(DiagramType.BPM));
|
||||
// ::done
|
||||
|
||||
// factories.add(new PostIdDiagramFactory());
|
||||
factories.add(new PSystemLicenseFactory());
|
||||
factories.add(new PSystemVersionFactory());
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new PSystemDonorsFactory());
|
||||
factories.add(new PSystemSkinparameterListFactory());
|
||||
factories.add(new PSystemListFontsFactory());
|
||||
@ -194,7 +195,7 @@ public class PSystemBuilder {
|
||||
// ::done
|
||||
factories.add(new PSystemSaltFactory(DiagramType.UML));
|
||||
factories.add(new PSystemSaltFactory(DiagramType.SALT));
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new PSystemDotFactory(DiagramType.DOT));
|
||||
factories.add(new PSystemDotFactory(DiagramType.UML));
|
||||
// ::done
|
||||
@ -202,10 +203,10 @@ public class PSystemBuilder {
|
||||
factories.add(new NwDiagramFactory(DiagramType.NW));
|
||||
factories.add(new MindMapDiagramFactory());
|
||||
factories.add(new WBSDiagramFactory());
|
||||
// ::uncomment when CORE
|
||||
// ::uncomment when __CORE__
|
||||
// factories.add(new PSystemSudokuFactory());
|
||||
// ::done
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new PSystemDitaaFactory());
|
||||
if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) {
|
||||
factories.add(new PSystemJcckitFactory());
|
||||
@ -228,7 +229,7 @@ public class PSystemBuilder {
|
||||
factories.add(new PSystemOregonFactory());
|
||||
// ::done
|
||||
factories.add(new PSystemCharlieFactory());
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) {
|
||||
factories.add(new PSystemXearthFactory());
|
||||
}
|
||||
@ -237,17 +238,17 @@ public class PSystemBuilder {
|
||||
factories.add(new FlowDiagramFactory());
|
||||
// factories.add(new PSystemTreeFactory(DiagramType.JUNGLE));
|
||||
// factories.add(new PSystemCuteFactory(DiagramType.CUTE));
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new PSystemDedicationFactory());
|
||||
// ::done
|
||||
factories.add(new TimingDiagramFactory());
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new HelpFactory());
|
||||
factories.add(new WireDiagramFactory());
|
||||
// ::done
|
||||
factories.add(new JsonDiagramFactory());
|
||||
factories.add(new GitDiagramFactory());
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
factories.add(new BoardDiagramFactory());
|
||||
// ::done
|
||||
factories.add(new YamlDiagramFactory());
|
||||
|
@ -58,7 +58,8 @@ import net.sourceforge.plantuml.skin.SplitParam;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class PSystemUtils {
|
||||
// :: remove file when CORE
|
||||
// :: remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public static List<FileImageData> exportDiagrams(Diagram system, SuggestedFile suggested,
|
||||
FileFormatOption fileFormatOption) throws IOException {
|
||||
@ -68,7 +69,7 @@ public class PSystemUtils {
|
||||
public static List<FileImageData> exportDiagrams(Diagram system, SuggestedFile suggestedFile,
|
||||
FileFormatOption fileFormatOption, boolean checkMetadata) throws IOException {
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
final SFile existingFile = suggestedFile.getFile(0);
|
||||
if (checkMetadata && fileFormatOption.getFileFormat().doesSupportMetadata() && existingFile.exists()) {
|
||||
// && system.getNbImages() == 1) {
|
||||
@ -87,7 +88,7 @@ public class PSystemUtils {
|
||||
if (system instanceof SequenceDiagram)
|
||||
return exportDiagramsSequence((SequenceDiagram) system, suggestedFile, fileFormatOption);
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (system instanceof CucaDiagram && fileFormatOption.getFileFormat() == FileFormat.HTML)
|
||||
return createFilesHtml((CucaDiagram) system, suggestedFile);
|
||||
// ::done
|
||||
@ -153,7 +154,7 @@ public class PSystemUtils {
|
||||
} finally {
|
||||
fos.close();
|
||||
}
|
||||
// ::comment when SPAM
|
||||
// ::comment when __CORE__
|
||||
if (cmap != null && cmap.containsCMapData())
|
||||
system.exportCmap(suggestedFile, i, cmap);
|
||||
|
||||
@ -209,7 +210,7 @@ public class PSystemUtils {
|
||||
if (imageData == null)
|
||||
return emptyList();
|
||||
|
||||
// ::comment when SPAM
|
||||
// ::comment when __CORE__
|
||||
if (imageData.containsCMapData() && system instanceof UmlDiagram)
|
||||
((UmlDiagram) system).exportCmap(suggestedFile, 0, imageData);
|
||||
// ::done
|
||||
|
@ -55,7 +55,8 @@ import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class Pipe {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final Option option;
|
||||
private final BufferedReader br;
|
||||
|
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.klimt.shape.UDrawable;
|
||||
|
||||
// This class doesnt feel like a wonderful idea, just a stepping stone towards something
|
||||
public abstract class PlainDiagram extends AbstractPSystem {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public PlainDiagram(UmlSource source) {
|
||||
super(source);
|
||||
|
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.klimt.geom.GraphicPosition;
|
||||
import net.sourceforge.plantuml.klimt.shape.UDrawable;
|
||||
|
||||
public abstract class PlainStringsDiagram extends PlainDiagram {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
protected BufferedImage image = null;
|
||||
protected GraphicPosition imagePosition = null;
|
||||
|
@ -41,7 +41,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
public class ProgressBar {
|
||||
// :: remove file when CORE
|
||||
// :: remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private static final java.util.logging.Logger logger;
|
||||
|
||||
|
@ -78,7 +78,8 @@ import net.sourceforge.plantuml.utils.Log;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public class Run {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private static Cypher cypher;
|
||||
|
||||
|
@ -47,7 +47,8 @@ import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class SourceFileReader extends SourceFileReaderAbstract implements ISourceFileReader {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private File outputDirectory;
|
||||
|
||||
|
@ -66,7 +66,8 @@ import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public abstract class SourceFileReaderAbstract implements ISourceFileReader {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
final private File file;
|
||||
|
||||
|
@ -43,7 +43,8 @@ import net.sourceforge.plantuml.file.SuggestedFile;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
|
||||
public class SourceFileReaderCopyCat extends SourceFileReaderAbstract implements ISourceFileReader {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final File outputDirectory;
|
||||
|
||||
|
@ -44,7 +44,8 @@ import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class SourceFileReaderHardFile extends SourceFileReaderAbstract implements ISourceFileReader {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final File outputFile;
|
||||
|
||||
|
@ -57,6 +57,7 @@ import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class SourceStringReader {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
final private List<BlockUml> blocks;
|
||||
|
||||
@ -114,7 +115,7 @@ public class SourceStringReader {
|
||||
return outputImage(os, 0);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
@Deprecated
|
||||
public String generateImage(SFile f) throws IOException {
|
||||
return outputImage(f).getDescription();
|
||||
|
@ -55,7 +55,8 @@ import net.sourceforge.plantuml.log.Logme;
|
||||
import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
|
||||
public class Splash extends Window implements MouseListener, MouseMotionListener {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private static final Color LINK_NORMAL = Color.BLUE;
|
||||
private static final Color LINK_HOVER = new Color(127, 0, 127);
|
||||
|
@ -41,7 +41,8 @@ import java.io.PrintStream;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
|
||||
public interface Stdrpt {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public void printInfo(PrintStream output, Diagram sys);
|
||||
|
||||
|
@ -42,7 +42,8 @@ import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class StdrptNull implements Stdrpt {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public void printInfo(final PrintStream output, final Diagram sys) {
|
||||
}
|
||||
|
@ -43,7 +43,8 @@ import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class StdrptPipe0 implements Stdrpt {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public void printInfo(final PrintStream output, final Diagram sys) {
|
||||
if (sys instanceof PSystemError) {
|
||||
|
@ -45,7 +45,8 @@ import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.utils.Log;
|
||||
|
||||
public class StdrptV1 implements Stdrpt {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public void printInfo(final PrintStream output, Diagram sys) {
|
||||
if (sys instanceof PSystemWelcome) {
|
||||
|
@ -44,7 +44,8 @@ import net.sourceforge.plantuml.eggs.PSystemWelcome;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
|
||||
public class StdrptV2 implements Stdrpt {
|
||||
// ::remove file when CORE
|
||||
// ::remove file when __CORE__
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public void finalMessage() {
|
||||
}
|
||||
|
@ -108,6 +108,7 @@ public class StringUtils {
|
||||
|
||||
}
|
||||
|
||||
// ::comment when __HAXE__
|
||||
final static public List<String> getSplit(Pattern2 pattern, String line) {
|
||||
final Matcher2 m = pattern.matcher(line);
|
||||
if (m.find() == false)
|
||||
@ -119,6 +120,7 @@ public class StringUtils {
|
||||
|
||||
return result;
|
||||
}
|
||||
// ::done
|
||||
|
||||
public static boolean isNotEmpty(CharSequence s) {
|
||||
return !isEmpty(s);
|
||||
@ -173,6 +175,7 @@ public class StringUtils {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
// ::comment when __HAXE__
|
||||
public static String unicodeForHtml(Display display) {
|
||||
final StringBuilder result = new StringBuilder();
|
||||
for (int i = 0; i < display.size(); i++) {
|
||||
@ -183,6 +186,7 @@ public class StringUtils {
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
// ::done
|
||||
|
||||
public static String manageArrowForSequence(String s) {
|
||||
s = s.replace('=', '-').toLowerCase();
|
||||
@ -318,11 +322,13 @@ public class StringUtils {
|
||||
return c == '\"' || c == '\u201c' || c == '\u201d' || c == '\u00ab' || c == '\u00bb';
|
||||
}
|
||||
|
||||
// ::comment when __HAXE__
|
||||
public static boolean isCJK(char c) {
|
||||
final Character.UnicodeBlock block = Character.UnicodeBlock.of(c);
|
||||
Log.println("block=" + block);
|
||||
return false;
|
||||
}
|
||||
// ::done
|
||||
|
||||
public static char hiddenLesserThan() {
|
||||
return '\u0005';
|
||||
@ -344,16 +350,16 @@ public class StringUtils {
|
||||
return s;
|
||||
}
|
||||
|
||||
private static int getWidth(Display stringsToDisplay) {
|
||||
int result = 1;
|
||||
for (CharSequence s : stringsToDisplay)
|
||||
if (s != null && result < s.length())
|
||||
result = s.length();
|
||||
// private static int getWidth(Display stringsToDisplay) {
|
||||
// int result = 1;
|
||||
// for (CharSequence s : stringsToDisplay)
|
||||
// if (s != null && result < s.length())
|
||||
// result = s.length();
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__ or __HAXE__
|
||||
public static int getWcWidth(Display stringsToDisplay) {
|
||||
int result = 1;
|
||||
for (CharSequence s : stringsToDisplay) {
|
||||
@ -373,9 +379,11 @@ public class StringUtils {
|
||||
return stringsToDisplay.size();
|
||||
}
|
||||
|
||||
// ::comment when __HAXE__
|
||||
public static int getHeight(Display stringsToDisplay) {
|
||||
return stringsToDisplay.size();
|
||||
}
|
||||
// ::done
|
||||
|
||||
public static boolean isDiagramCacheable(String uml) {
|
||||
if (uml.length() < 35)
|
||||
@ -429,6 +437,7 @@ public class StringUtils {
|
||||
return Integer.parseInt(uml.substring(x1, x2));
|
||||
}
|
||||
|
||||
// ::comment when __HAXE__
|
||||
public static List<String> splitComma(String s) {
|
||||
s = trin(s);
|
||||
final List<String> result = new ArrayList<>();
|
||||
@ -439,6 +448,7 @@ public class StringUtils {
|
||||
|
||||
return Collections.unmodifiableList(result);
|
||||
}
|
||||
// ::done
|
||||
|
||||
public static String getUid(String uid1, int uid2) {
|
||||
return uid1 + String.format("%04d", uid2);
|
||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class TikzFontDistortion {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private final double magnify;
|
||||
private final double distortion;
|
||||
|
@ -72,6 +72,7 @@ import net.sourceforge.plantuml.style.StyleLoader;
|
||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||
|
||||
public abstract class TitledDiagram extends AbstractPSystem implements Diagram, Annotated {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public static boolean FORCE_SMETANA = false;
|
||||
public static boolean FORCE_ELK = false;
|
||||
@ -87,7 +88,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
||||
|
||||
private final SkinParam skinParam;
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private Animation animation;
|
||||
// ::done
|
||||
|
||||
@ -217,7 +218,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
||||
return ClockwiseTopRightBottomLeft.same(10);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
final public void setAnimation(Iterable<CharSequence> animationData) {
|
||||
// try {
|
||||
final AnimationDecoder animationDecoder = new AnimationDecoder(animationData);
|
||||
|
@ -87,6 +87,7 @@ import net.sourceforge.plantuml.utils.Log;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annotated, WithSprite {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
private boolean rotation;
|
||||
|
||||
@ -132,7 +133,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
|
||||
fileFormatOption = fileFormatOption.withTikzFontDistortion(getSkinParam().getTikzFontDistortion());
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (fileFormatOption.getFileFormat() == FileFormat.PDF)
|
||||
return exportDiagramInternalPdf(os, index);
|
||||
// ::done
|
||||
@ -163,7 +164,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
public static void exportDiagramError(OutputStream os, Throwable exception, FileFormatOption fileFormat, long seed,
|
||||
String metadata, String flash, List<String> strings) throws IOException {
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (fileFormat.getFileFormat() == FileFormat.ATXT || fileFormat.getFileFormat() == FileFormat.UTXT) {
|
||||
exportDiagramErrorText(os, exception, strings);
|
||||
return;
|
||||
@ -173,7 +174,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
strings.addAll(CommandExecutionResult.getStackTrace(exception));
|
||||
|
||||
BufferedImage im2 = null;
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
if (flash != null) {
|
||||
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
|
||||
try {
|
||||
@ -203,7 +204,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
plainImageBuilder(drawable, fileFormat).metadata(metadata).seed(seed).write(os);
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private static void exportDiagramErrorText(OutputStream os, Throwable exception, List<String> strings) {
|
||||
final PrintWriter pw = SecurityUtils.createPrintWriter(os);
|
||||
exception.printStackTrace(pw);
|
||||
@ -256,7 +257,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
return strings;
|
||||
}
|
||||
|
||||
// ::comment when CORE
|
||||
// ::comment when __CORE__
|
||||
private void exportDiagramInternalMjpeg(OutputStream os) throws IOException {
|
||||
final SFile f = new SFile("c:/test.avi");
|
||||
final int nb = 150;
|
||||
|
@ -39,6 +39,7 @@ import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.klimt.sprite.Sprite;
|
||||
|
||||
public interface WithSprite extends Diagram {
|
||||
// ::remove file when __HAXE__
|
||||
|
||||
public void addSprite(String name, Sprite sprite);
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
package net.sourceforge.plantuml.abel;
|
||||
|
||||
public interface Hideable {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public boolean isHidden();
|
||||
|
||||
|
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
|
||||
public class PSystemXearth extends AbstractPSystem {
|
||||
// :: remove folder when CORE
|
||||
// :: remove folder when __CORE__
|
||||
|
||||
final private int width;
|
||||
final private int height;
|
||||
|
@ -49,6 +49,7 @@ import net.sourceforge.plantuml.regex.MyPattern;
|
||||
import net.sourceforge.plantuml.regex.Pattern2;
|
||||
|
||||
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
private final Map<String, String> config = new LinkedHashMap<>();
|
||||
private final List<Marker> markers = new ArrayList<>();
|
||||
|
@ -56,6 +56,7 @@ import net.sourceforge.plantuml.command.note.CommandFactoryNoteOnLink;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
|
||||
public class ActivityDiagramFactory extends PSystemCommandFactory {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
@Override
|
||||
public ActivityDiagram createEmptyDiagram(UmlSource source, Map<String, String> skinParam) {
|
||||
|
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.utils.LineLocation;
|
||||
|
||||
public class CommandEndif extends SingleLineCommand2<ActivityDiagram> {
|
||||
// ::remove folder when __HAXE__
|
||||
|
||||
public CommandEndif() {
|
||||
super(getRegexConcat());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user