1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-21 20:45:10 +00:00
This commit is contained in:
Arnaud Roques 2022-08-17 19:34:24 +02:00
parent 51cd2a00ce
commit 62e5a00c8d
189 changed files with 1430 additions and 1518 deletions

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -40,7 +40,7 @@ import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
public class AFileZipEntry implements AFile {
@ -76,7 +76,7 @@ public class AFileZipEntry implements AFile {
zis.closeEntry();
zis.close();
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
return null;
}
@ -89,7 +89,7 @@ public class AFileZipEntry implements AFile {
is.close();
return true;
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -55,7 +55,7 @@ import net.sourceforge.plantuml.code.TranscoderUtil;
import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemErrorPreprocessor;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.preproc.FileWithSuffix;
import net.sourceforge.plantuml.preproc2.PreprocessorModeSet;
@ -198,7 +198,7 @@ public class BlockUml {
final byte[] digest = msgDigest.digest();
return coder.encode(digest);
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
return "NOETAG";
}
}

View File

@ -36,9 +36,9 @@
package net.sourceforge.plantuml;
import java.awt.Dimension;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.utils.MathUtils;
public class Dimension2DDouble extends Dimension2D {

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -31,7 +31,7 @@
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml;
@ -49,7 +49,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.preproc.FileWithSuffix;
public class DirWatcher2 {
@ -99,7 +99,7 @@ public class DirWatcher2 {
modifieds.put(f, new FileWatcher(files));
return Collections.unmodifiableList(generatedImages);
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
return Collections.emptyList();
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml;
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.Line;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
@ -82,9 +82,9 @@ class EmbeddedDiagramDraw extends AbstractTextBlock implements Line, Atom {
final BufferedImage im = getImage();
return new Dimension2DDouble(im.getWidth(), im.getHeight());
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
} catch (InterruptedException e) {
Logger.error(e);
Logme.error(e);
}
return new Dimension2DDouble(42, 42);
}
@ -102,9 +102,9 @@ class EmbeddedDiagramDraw extends AbstractTextBlock implements Line, Atom {
final UShape image = new UImage(new PixelImage(im, AffineTransformType.TYPE_BILINEAR));
ug.draw(image);
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
} catch (InterruptedException e) {
Logger.error(e);
Logme.error(e);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -39,16 +39,16 @@ import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.braille.BrailleCharFactory;
import net.sourceforge.plantuml.braille.UGraphicBraille;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.StringBounderRaw;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.png.MetadataTag;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.svg.SvgGraphics;
@ -57,9 +57,9 @@ import net.sourceforge.plantuml.ugraphic.debug.StringBounderDebug;
/**
* Format for output files generated by PlantUML.
*
*
* @author Arnaud Roques
*
*
*/
public enum FileFormat {
PNG("image/png"),
@ -97,7 +97,7 @@ public enum FileFormat {
/**
* Returns the file format to be used for that format.
*
*
* @return a string starting by a point.
*/
public String getFileSuffix() {
@ -229,7 +229,7 @@ public enum FileFormat {
/**
* Check if this file format is Encapsulated PostScript.
*
*
* @return <code>true</code> for EPS.
*/
public boolean isEps() {
@ -300,7 +300,7 @@ public enum FileFormat {
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
return false;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -40,7 +40,7 @@ import java.io.IOException;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
public class GeneratedImageImpl implements GeneratedImage {
@ -89,7 +89,7 @@ public class GeneratedImageImpl implements GeneratedImage {
return cmp;
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
return this.description.compareTo(this2.getDescription());
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -35,34 +35,23 @@
*/
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.log.Logger;
public class Log {
public abstract class Log {
private static final long start = System.currentTimeMillis();
public synchronized static void debug(String s) {
// noop
}
public static void println(Object s) {
// noop
}
public static void header(String s) {
// noop
}
public synchronized static void info(String s) {
if (OptionFlags.getInstance().isVerbose()) {
ProgressBar.clear();
Logger.error(format(s));
System.err.println(format(s));
}
}
public synchronized static void error(String s) {
ProgressBar.clear();
Logger.error(s);
System.err.println(s);
}
private static String format(String s) {
@ -104,5 +93,20 @@ public class Log {
sb.append(" Mo - ");
sb.append(s);
return sb.toString();
}
public static void println(Object s) {
// if (header2.get() == null) {
// System.err.println("L = " + s);
// } else {
// System.err.println(header2.get() + " " + s);
// }
}
// private static final ThreadLocal<String> header2 = new ThreadLocal<>();
//
public static void header(String s) {
// header2.set(s);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -41,7 +41,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SecurityUtils;
@ -218,7 +218,7 @@ public class OptionFlags {
ps.println();
} catch (FileNotFoundException e) {
Log.error("Cannot open " + logData);
Logger.error(e);
Logme.error(e);
}
}
}
@ -230,7 +230,7 @@ public class OptionFlags {
ps.println();
} catch (FileNotFoundException e) {
Log.error("Cannot open " + logData);
Logger.error(e);
Logme.error(e);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -58,7 +58,7 @@ import net.sourceforge.plantuml.code.NoPlantumlCompressionException;
import net.sourceforge.plantuml.code.Transcoder;
import net.sourceforge.plantuml.code.TranscoderUtil;
import net.sourceforge.plantuml.ftp.FtpServer;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.picoweb.PicoWebServer;
import net.sourceforge.plantuml.png.MetadataTag;
import net.sourceforge.plantuml.preproc.Stdlib;
@ -404,7 +404,7 @@ public class Run {
return;
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
}
@ -427,9 +427,9 @@ public class Run {
try {
manageFileInternal(f, option, error);
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
} catch (InterruptedException e) {
Logger.error(e);
Logme.error(e);
}
incDone(error.hasError());
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -50,7 +50,7 @@ import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import net.sourceforge.plantuml.code.AsciiEncoder;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
public class SignatureUtils {
@ -78,10 +78,10 @@ public class SignatureUtils {
final byte[] digest = getMD5raw(s);
return toString(digest);
} catch (NoSuchAlgorithmException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
} catch (UnsupportedEncodingException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
}
}
@ -105,10 +105,10 @@ public class SignatureUtils {
assert digest.length == 16;
return toHexString(digest);
} catch (NoSuchAlgorithmException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
} catch (UnsupportedEncodingException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
}
}
@ -119,10 +119,10 @@ public class SignatureUtils {
assert digest.length == 64;
return toHexString(digest);
} catch (NoSuchAlgorithmException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
} catch (UnsupportedEncodingException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
}
}
@ -161,10 +161,10 @@ public class SignatureUtils {
final byte[] digest = msgDigest.digest();
return toString(digest);
} catch (NoSuchAlgorithmException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
} catch (UnsupportedEncodingException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
}
}
@ -195,10 +195,10 @@ public class SignatureUtils {
final byte[] digest = msgDigest.digest();
return toString(digest);
} catch (NoSuchAlgorithmException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
} catch (UnsupportedEncodingException e) {
Logger.error(e);
Logme.error(e);
throw new UnsupportedOperationException(e);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -63,7 +63,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.skin.ActorStyle;
import net.sourceforge.plantuml.skin.ArrowDirection;
import net.sourceforge.plantuml.skin.Padder;
@ -112,7 +112,7 @@ public class SkinParam implements ISkinParam {
try {
this.styleBuilder = getCurrentStyleBuilderInternal();
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
return styleBuilder;
@ -179,7 +179,7 @@ public class SkinParam implements ISkinParam {
this.muteStyle(modifiedStyle);
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -54,10 +54,9 @@ import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.api.ThemeStyle;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.preproc.FileWithSuffix;
import net.sourceforge.plantuml.security.SFile;
@ -160,7 +159,7 @@ public abstract class SourceFileReaderAbstract implements ISourceFileReader {
try {
system = blockUml.getDiagram();
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
if (OptionFlags.getInstance().isSilentlyCompletelyIgnoreErrors() || noerror) {
continue;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -51,7 +51,7 @@ import java.awt.image.BufferedImage;
import java.net.URL;
import java.util.concurrent.atomic.AtomicInteger;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.version.PSystemVersion;
public class Splash extends Window implements MouseListener, MouseMotionListener {
@ -140,7 +140,7 @@ public class Splash extends Window implements MouseListener, MouseMotionListener
try {
Desktop.getDesktop().browse(new URL("https://plantuml.com").toURI());
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
return;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -261,7 +261,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
final AnimationDecoder animationDecoder = new AnimationDecoder(animationData);
this.animation = Animation.create(animationDecoder.decode());
// } catch (ScriptException e) {
// Logger.error(e);
// Logme.error(e);
// }
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -39,7 +39,6 @@ import static net.sourceforge.plantuml.ugraphic.ImageBuilder.plainImageBuilder;
import java.awt.Color;
import java.awt.geom.AffineTransform;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
@ -53,6 +52,7 @@ import java.util.List;
import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.api.ThemeStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.core.ImageData;
@ -65,11 +65,11 @@ import net.sourceforge.plantuml.fun.IconLoader;
import net.sourceforge.plantuml.graphic.GraphicPosition;
import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.mjpeg.MJPEGGenerator;
import net.sourceforge.plantuml.pdf.PdfConverter;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SecurityUtils;
import net.sourceforge.plantuml.style.NoStyleAvailableException;
import net.sourceforge.plantuml.svek.EmptySvgException;
@ -136,13 +136,13 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
this.lastInfo = new Dimension2DDouble(imageData.getWidth(), imageData.getHeight());
return imageData;
} catch (NoStyleAvailableException e) {
// Logger.error(e);
// Logme.error(e);
exportDiagramError(os, e, fileFormatOption, null);
} catch (UnparsableGraphvizException e) {
Logger.error(e);
Logme.error(e);
exportDiagramError(os, e.getCause(), fileFormatOption, e.getGraphvizVersion());
} catch (Throwable e) {
// Logger.error(e);
// Logme.error(e);
exportDiagramError(os, e, fileFormatOption, null);
}
return ImageDataSimple.error();
@ -171,7 +171,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
im2 = utils.exportFlashcode(flash, Color.BLACK, Color.WHITE);
} catch (Throwable e) {
Log.error("Issue in flashcode generation " + e);
// Logger.error(e);
// Logme.error(e);
}
if (im2 != null)
GraphvizCrash.addDecodeHint(strings);

View File

@ -47,7 +47,7 @@ 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.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
@ -101,7 +101,7 @@ public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
return system;
}
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
return null;
}
return null;

View File

@ -97,8 +97,4 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
conditionEndStyle, thens.get(0), elseBranch, skinParam(), getStringBounder(), fcArrow, fcTest, url);
}
private HColor fontColor(FontParam param) {
return skinParam().getFontHtmlColor(null, param);
}
}

View File

@ -311,8 +311,4 @@ public class ConditionalBuilder {
&& tile2.calculateDimension(stringBounder).hasPointOut();
}
// private HtmlColor fontColor() {
// return skinParam.getFontHtmlColor(FontParam.ACTIVITY_DIAMOND, null);
// }
}

View File

@ -94,10 +94,6 @@ public class Gtiles {
swimlane);
}
private static HColor fontColor(ISkinParam skinParam, FontParam param) {
return skinParam.getFontHtmlColor(null, param);
}
static public Gtile withSouthMargin(Gtile orig, double south) {
return new GtileWithMargin((AbstractGtileRoot) orig, 0, south, 0);

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -44,13 +44,12 @@ import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import net.sourceforge.plantuml.log.Logger;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileList;
import org.apache.tools.ant.types.FileSet;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SecurityUtils;
@ -86,7 +85,7 @@ public class CheckZipTask extends Task {
manageFileList(fileList);
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
throw new BuildException(e.toString());
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -46,8 +46,6 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import net.sourceforge.plantuml.log.Logger;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Task;
@ -62,6 +60,7 @@ import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.SourceFileReader;
import net.sourceforge.plantuml.Splash;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.stats.StatsUtils;
@ -132,10 +131,10 @@ public class PlantUmlTask extends Task {
}
this.log("Nb images generated: " + nbFiles.get());
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
throw new BuildException(e.toString());
} catch (InterruptedException e) {
Logger.error(e);
Logme.error(e);
throw new BuildException(e.toString());
}

View File

@ -37,7 +37,6 @@ package net.sourceforge.plantuml.api;
import net.sourceforge.plantuml.annotation.HaxeIgnored;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.core.ImageData;
public abstract class ImageDataAbstract implements ImageData {

View File

@ -35,10 +35,9 @@
*/
package net.sourceforge.plantuml.api;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.CMapData;
import net.sourceforge.plantuml.annotation.HaxeIgnored;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
public class ImageDataComplex extends ImageDataAbstract {

View File

@ -37,7 +37,6 @@ package net.sourceforge.plantuml.api;
import net.sourceforge.plantuml.annotation.HaxeIgnored;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.core.ImageData;
public class ImageDataSimple extends ImageDataAbstract {

View File

@ -3,12 +3,12 @@
* ========================================================================
*
* 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
@ -35,8 +35,7 @@ import java.util.prefs.Preferences;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.annotation.HaxeIgnored;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
@HaxeIgnored
public class NumberAnalyzed implements INumberAnalyzed {
@ -123,7 +122,7 @@ public class NumberAnalyzed implements INumberAnalyzed {
Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(
st.nextToken(), 36), Long.parseLong(st.nextToken(), 36));
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
Log.info("Error reading " + value);
return null;
}

View File

@ -3,12 +3,12 @@
* ========================================================================
*
* 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
@ -34,7 +34,7 @@ import java.util.prefs.Preferences;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.annotation.HaxeIgnored;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
@HaxeIgnored
public class NumberAnalyzed2 implements INumberAnalyzed {
@ -96,7 +96,7 @@ public class NumberAnalyzed2 implements INumberAnalyzed {
Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(
st.nextToken(), 36), Long.parseLong(st.nextToken(), 36));
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
Log.info("Error reading " + value);
return null;
}

View File

@ -3,12 +3,12 @@
* ========================================================================
*
* 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
@ -34,7 +34,7 @@ import java.util.prefs.Preferences;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.annotation.HaxeIgnored;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
@HaxeIgnored
public class NumberAnalyzedDated extends NumberAnalyzed {
@ -105,7 +105,7 @@ public class NumberAnalyzedDated extends NumberAnalyzed {
Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(
st.nextToken(), 36), st.nextToken());
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
Log.info("Error reading " + value);
return null;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -35,10 +35,10 @@
*/
package net.sourceforge.plantuml.api;
import net.sourceforge.plantuml.log.Logger;
import java.util.concurrent.atomic.AtomicBoolean;
import net.sourceforge.plantuml.log.Logme;
public final class TimeoutExecutor {
private final long ms;
@ -55,7 +55,7 @@ public final class TimeoutExecutor {
mainThread.join(ms);
} catch (InterruptedException e) {
System.err.println("TimeoutExecutorA " + e);
Logger.error(e);
Logme.error(e);
return false;
} finally {
done = mainThread.done.get();
@ -82,7 +82,7 @@ public final class TimeoutExecutor {
done.set(true);
} catch (InterruptedException e) {
System.err.println("TimeoutExecutorB " + e);
Logger.error(e);
Logme.error(e);
}
}

View File

@ -26,7 +26,6 @@
package net.sourceforge.plantuml.argon2.blake2;
import net.sourceforge.plantuml.log.Logger;
import static net.sourceforge.plantuml.argon2.blake2.Blake2b.Engine.Assert.*;
import static net.sourceforge.plantuml.argon2.blake2.Blake2b.Engine.LittleEndian.*;
@ -897,7 +896,7 @@ public interface Blake2b {
public final static String exclusiveLowerBound = "'%s' %d is <= %d";
public final static String inclusiveLowerBound = "'%s' %d is < %d";
static <T extends Number> String assertFail(final String name, final T v, final String err, final T spec) {
Logger.error(new Exception());
new Exception().printStackTrace();
return String.format(err, name, v, spec);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -41,7 +41,7 @@ import java.io.IOException;
import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.brotli.BrotliInputStream;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class CompressionBrotli implements Compression {
@ -57,7 +57,7 @@ public class CompressionBrotli implements Compression {
FileUtils.copyToStream(brotli, result);
return ByteArray.from(result.toByteArray());
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
throw new NoPlantumlCompressionException(e);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -91,7 +91,7 @@ public class CompressionZlibAttic implements Compression {
return ByteArray.from(result);
} catch (IOException e) {
// Logger.error(e);
// Logme.error(e);
throw new NoPlantumlCompressionException(e);
}
@ -115,7 +115,7 @@ public class CompressionZlibAttic implements Compression {
final byte[] result = copyArray(tmp, resultLength);
return result;
} catch (DataFormatException e) {
// Logger.error(e);
// Logme.error(e);
throw new IOException(e.toString());
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -35,12 +35,12 @@
*/
package net.sourceforge.plantuml.code;
import net.sourceforge.plantuml.log.Logger;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import net.sourceforge.plantuml.log.Logme;
public class Upf9Encoder {
private Upf9Encoder() {
@ -58,7 +58,7 @@ public class Upf9Encoder {
if (c == Upf9Decoder.decodeChar(new ByteArrayInputStream(result)))
return true;
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
return false;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.command;
@ -64,7 +64,7 @@ public class CommandSkinParam extends SingleLineCommand2<TitledDiagram> {
diagram.setParam(arg.get("NAME", 0), arg.get("VALUE", 0));
return CommandExecutionResult.ok();
} catch (NoStyleAvailableException e) {
// Logger.error(e);
// Logme.error(e);
return CommandExecutionResult.error("General failure: no style available.");
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.command;
@ -39,7 +39,7 @@ import java.util.Objects;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.version.Version;
public class ProtectedCommand<S extends Diagram> implements Command<S> {
@ -59,11 +59,12 @@ public class ProtectedCommand<S extends Diagram> implements Command<S> {
// }
return result;
} catch (Throwable t) {
Logger.error("Error ", t);
Log.error("Error " + t);
Logme.error(t);
String msg = "You should send a mail to plantuml@gmail.com or post to http://plantuml.com/qa with this log (V"
+ Version.versionString() + ")";
Logger.error(msg);
msg += " " + t;
Log.error(msg);
msg += " " + t.toString();
return CommandExecutionResult.error(msg, t);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.command;
@ -106,7 +106,7 @@ public class SkinLoader {
}
return CommandExecutionResult.ok();
} catch (NoStyleAvailableException e) {
// Logger.error(e);
// Logme.error(e);
return CommandExecutionResult.error("General failure: no style available.");
}

View File

@ -35,9 +35,9 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UShape;

View File

@ -35,9 +35,8 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.emoji.Emoji;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -35,10 +35,10 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.creole.atom;
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.creole.atom;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.awt.Color;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
@ -46,6 +45,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FileSystem;
import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.code.Base64Coder;
import net.sourceforge.plantuml.creole.legacy.AtomTextUtils;
import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
@ -54,9 +54,9 @@ import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.ImgValign;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TileImageSvg;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SURL;
import net.sourceforge.plantuml.security.SecurityProfile;
import net.sourceforge.plantuml.security.SecurityUtils;
@ -121,38 +121,38 @@ public class AtomImg extends AbstractAtom implements Atom {
try {
// Check if valid URL
if (src.startsWith("http:") || src.startsWith("https:")) {
if (src.endsWith(".svg"))
if (src.endsWith(".svg"))
return buildSvgFromUrl(src, fc, SURL.create(src), scale, url);
return buildRasterFromUrl(src, fc, SURL.create(src), scale, url);
}
final SFile f = FileSystem.getInstance().getFile(src);
if (f.exists() == false) {
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
return AtomTextUtils.createLegacy("(File not found: " + f.getPrintablePath() + ")", fc);
return AtomTextUtils.createLegacy("(Cannot decode)", fc);
}
if (f.getName().endsWith(".svg")) {
final String tmp = FileUtils.readSvg(f);
if (tmp == null)
if (tmp == null)
return AtomTextUtils.createLegacy("(Cannot decode)", fc);
return new AtomImgSvg(new TileImageSvg(tmp, scale));
}
final BufferedImage read = f.readRasterImageFromFile();
if (read == null) {
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
return AtomTextUtils.createLegacy("(Cannot decode: " + f.getPrintablePath() + ")", fc);
return AtomTextUtils.createLegacy("(Cannot decode)", fc);
}
return new AtomImg(f.readRasterImageFromFile(), scale, url, src);
} catch (IOException e) {
Logger.error(e);
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
Logme.error(e);
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
return AtomTextUtils.createLegacy("ERROR " + e.toString(), fc);
return AtomTextUtils.createLegacy("ERROR", fc);
}
}

View File

@ -36,7 +36,6 @@
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TileImageSvg;
import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -36,10 +36,10 @@
package net.sourceforge.plantuml.creole.atom;
import java.awt.Color;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.math.ScientificEquationSafe;
import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -35,9 +35,8 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -35,9 +35,8 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -35,9 +35,8 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.sprite.Sprite;

View File

@ -35,13 +35,13 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.creole.Position;
import net.sourceforge.plantuml.creole.SheetBlock1;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;

View File

@ -35,13 +35,13 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.salt.element.Skeleton2;
import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -35,10 +35,10 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;

View File

@ -35,12 +35,12 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;

View File

@ -35,9 +35,8 @@
*/
package net.sourceforge.plantuml.creole.atom;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UEllipse;

View File

@ -35,12 +35,12 @@
*/
package net.sourceforge.plantuml.cucadiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;

View File

@ -36,11 +36,11 @@
*/
package net.sourceforge.plantuml.cucadiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
import java.util.EnumSet;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.svek.ShapeType;
import net.sourceforge.plantuml.ugraphic.Shadowable;
import net.sourceforge.plantuml.ugraphic.UEllipse;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.cucadiagram;
@ -38,7 +38,7 @@ package net.sourceforge.plantuml.cucadiagram;
import java.io.IOException;
import java.io.PrintWriter;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
public class GroupPrinter {
@ -91,7 +91,7 @@ public class GroupPrinter {
new GroupPrinter(pw).printGroup(rootGroup);
pw.println("</html>");
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}

View File

@ -42,13 +42,11 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineLocation;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;

View File

@ -35,7 +35,6 @@
*/
package net.sourceforge.plantuml.cucadiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Objects;
import net.sourceforge.plantuml.Hideable;
@ -45,6 +44,7 @@ import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.Removeable;
import net.sourceforge.plantuml.UmlDiagramType;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;

View File

@ -35,11 +35,11 @@
*/
package net.sourceforge.plantuml.cucadiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -35,9 +35,8 @@
*/
package net.sourceforge.plantuml.cucadiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
public enum NoteLinkStrategy {
NORMAL, HALF_PRINTED_FULL, HALF_NOT_PRINTED;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.cucadiagram.dot;
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
abstract class AbstractGraphviz implements Graphviz {
@ -76,7 +76,7 @@ abstract class AbstractGraphviz implements Graphviz {
this.dotString = dotString;
this.type = Objects.requireNonNull(type);
}
protected boolean findExecutableOnPath() {
return true;
}
@ -117,7 +117,7 @@ abstract class AbstractGraphviz implements Graphviz {
// }
Log.info("Ending process ok");
} catch (Throwable e) {
Logger.error(e);
Logme.error(e);
Log.error("Error: " + e);
Log.error("The command was " + cmd);
Log.error("");

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.cucadiagram.dot;
@ -51,7 +51,7 @@ public class DebugTrace {
try {
pw = out.createPrintWriter();
} catch (FileNotFoundException e) {
// ignore
}
}
return pw;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.cucadiagram.dot;
@ -45,7 +45,7 @@ import java.util.regex.Pattern;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SecurityProfile;
import net.sourceforge.plantuml.security.SecurityUtils;
@ -187,7 +187,7 @@ public class GraphvizUtils {
try {
return create(null, "png").graphviz244onWindows();
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
return false;
}
}
@ -228,8 +228,8 @@ public class GraphvizUtils {
result.add(red + err);
} catch (Exception e) {
result.add(red + e);
Logger.error(e);
result.add(red + e.toString());
Logme.error(e);
error = -1;
}
return error;
@ -269,8 +269,8 @@ public class GraphvizUtils {
}
}
} catch (Exception e) {
result.add(red + e);
Logger.error(e);
result.add(red + e.toString());
Logme.error(e);
error = -5;
}
} else {

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.cucadiagram.dot;
@ -43,7 +43,7 @@ import java.util.List;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.windowsdot.WindowsDotArchive;
class GraphvizWindowsOld extends AbstractGraphviz {
@ -67,7 +67,7 @@ class GraphvizWindowsOld extends AbstractGraphviz {
try {
return GraphvizUtils.getDotVersion() == 244;
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
return false;
}
}

View File

@ -35,7 +35,6 @@
*/
package net.sourceforge.plantuml.cucadiagram.dot;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
@ -43,6 +42,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Link;
import net.sourceforge.plantuml.svek.Bibliotekon;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.cucadiagram.dot;
@ -44,7 +44,7 @@ import java.util.concurrent.locks.ReentrantLock;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.api.MyRunnable;
import net.sourceforge.plantuml.api.TimeoutExecutor;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
public class ProcessRunner {
@ -163,14 +163,14 @@ public class ProcessRunner {
try {
process = Runtime.getRuntime().exec(cmd, null, dir == null ? null : dir.conv());
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
changeState.lock();
try {
state = ProcessState.IO_EXCEPTION1(e);
} finally {
changeState.unlock();
}
Logger.error(e);
Logme.error(e);
return;
}
errorStream = new ThreadStream(process.getErrorStream(), null);
@ -192,7 +192,7 @@ public class ProcessRunner {
} finally {
changeState.unlock();
}
Logger.error(e);
Logme.error(e);
}
}
}
@ -249,9 +249,9 @@ public class ProcessRunner {
}
} catch (Throwable e) {
System.err.println("ProcessRunnerA " + e);
Logger.error(e);
Logme.error(e);
sb.append('\n');
sb.append(e);
sb.append(e.toString());
}
}
}
@ -270,7 +270,7 @@ public class ProcessRunner {
is.close();
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
@ -280,7 +280,7 @@ public class ProcessRunner {
os.close();
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.dedication;
@ -41,7 +41,7 @@ import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.utils.MTRandom;
public class DedicationCrypted implements Dedication {
@ -114,7 +114,7 @@ public class DedicationCrypted implements Dedication {
this.solution = line;
return img;
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
return null;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,16 +30,16 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.dedication;
import net.sourceforge.plantuml.log.Logger;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import net.sourceforge.plantuml.log.Logme;
public class DedicationSimple implements Dedication {
private final byte crypted[];
@ -63,7 +63,7 @@ public class DedicationSimple implements Dedication {
current = decoded.toByteArray(512);
return PSystemDedication.getBufferedImage(new ByteArrayInputStream(current));
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
return null;
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.dedication;
@ -44,7 +44,7 @@ import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class Dedications {
@ -65,7 +65,7 @@ public class Dedications {
all.add(secret(1, "ae8a7cf3997ccd6418866fc59e596502e1bd1c0265bba2fc380ad7f51c76518f", new BigInteger(
"987988542836850639056829173787067531749177506648884857100630852970876999799588072360773169026225182488073794585127241896588994816566037813451743416913613428321215803586563629080034406083114565732322220091545330060636171674602040157")));
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
}
}

View File

@ -47,7 +47,7 @@ import net.sourceforge.plantuml.PlainDiagram;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
import net.sourceforge.plantuml.ugraphic.PixelImage;
@ -88,7 +88,7 @@ public class PSystemDedication extends PlainDiagram {
// final VP8Frame frame = vp8Decoder.getFrame();
// return frame.getBufferedImage();
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
return null;
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -53,7 +53,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.svek.GraphvizCrash;
@ -86,7 +86,7 @@ public class PSystemDitaa extends AbstractPSystem {
this.processingOptions.getClass().getMethod("setAllCornersAreRound", boolean.class)
.invoke(this.processingOptions, allCornersAreRound);
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
this.processingOptions = null;
}
this.transparentBackground = transparentBackground;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.donors;
@ -57,7 +57,7 @@ import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
import net.sourceforge.plantuml.ugraphic.PixelImage;
@ -98,7 +98,7 @@ public class PSystemDonors extends PlainDiagram {
/*
* Special thanks to our sponsors and donors:
*
*
* - Noam Tamim
*/
@ -154,7 +154,7 @@ public class PSystemDonors extends PlainDiagram {
lines.add(st.nextToken());
}
} catch (NoPlantumlCompressionException e) {
Logger.error(e);
Logme.error(e);
}
return lines;
}

View File

@ -35,7 +35,6 @@
*/
package net.sourceforge.plantuml.donors;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@ -43,6 +42,7 @@ import java.util.List;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.PlainDiagram;
import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.graphic.GraphicStrings;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.eggs;
@ -41,7 +41,7 @@ import net.sourceforge.plantuml.AbstractPSystem;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.command.PSystemSingleLineFactory;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class PSystemAppleTwoFactory extends PSystemSingleLineFactory {
@ -54,7 +54,7 @@ public class PSystemAppleTwoFactory extends PSystemSingleLineFactory {
return new PSystemAppleTwo(source);
} catch (IOException e) {
Log.error("Error " + e);
Logger.error(e);
Logme.error(e);
}
}
return null;

View File

@ -35,7 +35,6 @@
*/
package net.sourceforge.plantuml.eggs;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Collection;
@ -48,6 +47,7 @@ import net.sourceforge.plantuml.BackSlash;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.PlainDiagram;
import net.sourceforge.plantuml.SpriteContainerEmpty;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.cucadiagram.Display;

View File

@ -35,12 +35,12 @@
*/
package net.sourceforge.plantuml.eggs;
import java.util.StringTokenizer;
import net.sourceforge.plantuml.PlainStringsDiagram;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import java.util.StringTokenizer;
public class PSystemEgg extends PlainStringsDiagram {
PSystemEgg(UmlSource source, String sentence) {

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.eggs;
@ -41,7 +41,7 @@ import net.sourceforge.plantuml.AbstractPSystem;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.command.PSystemSingleLineFactory;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class PSystemRIPFactory extends PSystemSingleLineFactory {
@ -52,7 +52,7 @@ public class PSystemRIPFactory extends PSystemSingleLineFactory {
return new PSystemRIP(source);
} catch (IOException e) {
Log.error("Error " + e);
Logger.error(e);
Logme.error(e);
}
}
return null;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.elk;
@ -67,13 +67,13 @@ import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory;
/*
* You can choose between real "org.eclipse.elk..." classes or proxied "net.sourceforge.plantuml.elk.proxy..."
*
*
* Using proxied classes allows to compile PlantUML without having ELK available on the classpath.
* Since GraphViz is the default layout engine up to now, we do not want to enforce the use of ELK just for compilation.
* (for people not using maven)
*
*
* If you are debugging, you should probably switch to "org.eclipse.elk..." classes
*
*
*/
/*
@ -111,7 +111,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.graphic.USymbolFolder;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style;
@ -135,7 +135,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
/*
* Some notes:
*
*
https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure.html
https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure/coordinatesystem.html
@ -522,7 +522,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
}
static private List<String> getFailureText3(Throwable exception) {
Logger.error(exception);
Logme.error(exception);
final List<String> strings = new ArrayList<>();
strings.add("An error has occured : " + exception);
final String quote = StringUtils.rot(QuoteUtils.getSomeQuote());

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -35,12 +35,12 @@
*/
package net.sourceforge.plantuml.elk.proxy;
import net.sourceforge.plantuml.log.Logger;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import net.sourceforge.plantuml.log.Logme;
/*
* Various methods to do Java introspection
*/
@ -50,7 +50,7 @@ public class Reflect {
try {
return Class.forName(className);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -65,7 +65,7 @@ public class Reflect {
}
throw new UnsupportedOperationException(name);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -76,7 +76,7 @@ public class Reflect {
final Field field = cl.getField(fieldname);
return field.get(null);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -86,7 +86,7 @@ public class Reflect {
final Class<?> cl = Class.forName(className);
return cl.newInstance();
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -97,7 +97,7 @@ public class Reflect {
final Constructor<?> m = cl.getConstructor(arg1.getClass());
return m.newInstance(arg1);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -108,7 +108,7 @@ public class Reflect {
final Constructor<?> m = cl.getConstructor(Double.TYPE, Double.TYPE, Double.TYPE, Double.TYPE);
return m.newInstance(arg1, arg2, arg3, arg4);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -119,7 +119,7 @@ public class Reflect {
final Field f = cl.getField(fieldName);
return f.get(null);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -130,7 +130,7 @@ public class Reflect {
final Method m = cl.getMethod(method);
return m.invoke(null);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -141,7 +141,7 @@ public class Reflect {
final Method m = cl.getMethod(method, arg1.getClass());
return m.invoke(null, arg1);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -152,7 +152,7 @@ public class Reflect {
final Method m = cl.getMethod(method, arg1.getClass(), arg2.getClass());
return m.invoke(null, arg1, arg2);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -163,7 +163,7 @@ public class Reflect {
final Method m = getStaticMethod(cl, method, 1);
return m.invoke(null, arg1);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -174,7 +174,7 @@ public class Reflect {
final Method m = getStaticMethod(cl, method, 2);
return m.invoke(null, arg1, arg2);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -193,7 +193,7 @@ public class Reflect {
final Method m = instance.getClass().getMethod(method);
return m.invoke(instance);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -203,7 +203,7 @@ public class Reflect {
final Method m = instance.getClass().getMethod(method, arg1.getClass());
return m.invoke(instance, arg1);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -213,7 +213,7 @@ public class Reflect {
final Method m = instance.getClass().getMethod(method, arg1.getClass(), arg2.getClass());
return m.invoke(instance, arg1, arg2);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}
@ -223,7 +223,7 @@ public class Reflect {
final Method m = getMethod(instance, method, 2);
return m.invoke(instance, arg1, arg2);
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
throw new IllegalArgumentException(t);
}
}

View File

@ -12,7 +12,7 @@ import java.util.Map;
import java.util.TreeMap;
import net.sourceforge.plantuml.emoji.data.Dummy;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.color.HColor;
@ -30,7 +30,7 @@ public class Emoji {
new Emoji(s);
}
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
@ -88,7 +88,7 @@ public class Emoji {
try {
loadIfNeed();
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
nano.drawU(ug, scale, colorForMonochrome);
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.emoji;
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.sprite.Sprite;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
@ -96,7 +96,7 @@ public class SpriteSvgNanoParser implements Sprite {
try {
return new SpriteSvgNanoParser(SImageIO.read(is));
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
return null;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.ftp;
@ -54,7 +54,7 @@ import java.util.StringTokenizer;
import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SecurityUtils;
class FtpLoop implements Runnable {
@ -328,7 +328,7 @@ class FtpLoop implements Runnable {
try {
runInternal();
} catch (Throwable t) {
Logger.error(t);
Logme.error(t);
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.ftp;
@ -50,7 +50,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class FtpServer {
@ -115,7 +115,7 @@ public class FtpServer {
try {
connexion.processImage(name);
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
}
});

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -43,7 +43,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SImageIO;
public class IconLoader {
@ -94,7 +94,7 @@ public class IconLoader {
is.close();
return image;
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
}
return null;
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.graphic;
@ -44,7 +44,7 @@ import net.sourceforge.plantuml.StringUtils;
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.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SURL;
@ -124,8 +124,8 @@ public class Img implements HtmlCommand {
return new Img(new TileImage(f.readRasterImageFromFile(), valign, vspace));
} catch (IOException e) {
Logger.error(e);
return new Text("ERROR " + e);
Logme.error(e);
return new Text("ERROR " + e.toString());
}
}

View File

@ -311,7 +311,11 @@ public class QuoteUtils {
"Guvf qbrfa'g frrz yvxr n jryy gubhtug bhg cyna.",
"Vg qbrf abg znxr frafr gung uhznaf qryvorengryl znyshapgvba.",
"Gb fhpprrq, cynaavat nybar vf vafhssvpvrag. Bar zhfg vzcebivfr nf jryy.",
"Arire yrg lbhe frafr bs zbenyf cerirag lbh sebz qbvat jung vf evtug.");
"Arire yrg lbhe frafr bs zbenyf cerirag lbh sebz qbvat jung vf evtug.", "Jr arrq ab ybatre srne gur onanan",
"Vg jnf n znggre bs fheiviny. Jr gbbx ab fngvfsnpgvba va gur qrfgehpgvba bs bhe ohvyqref.",
"Znxr yvxr n gerr naq trg bhg bs urer", "Vg'f fgebat naq vg'f fhqqra naq vg'f pehry fbzrgvzrf",
"Uryy vf rzcgl naq nyy gur qrivyf ner urer", "Rg cbhe fbegve qrf zbzragf qvssvpvyrf...",
"cynaghzy: qvntenzf sbe pbashfvat crbcyr zber", "Ha zbeprnh dhv onynapr qh gbaareer?");
private QuoteUtils() {
}

View File

@ -46,7 +46,6 @@ import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.Value;
import net.sourceforge.plantuml.style.ValueNull;
import net.sourceforge.plantuml.ugraphic.color.ColorUtils;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.graphic;
@ -139,7 +139,7 @@ public class UnusedSpace {
// ImageIO.write(im, "png", SecurityUtils.File("c:/img" + cpt + ".png"));
// cpt++;
// } catch (IOException e) {
// Logger.error(e);
// Logme.error(e);
// }
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.hcl;
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.json.JsonValue;
import net.sourceforge.plantuml.jsondiagram.JsonDiagram;
import net.sourceforge.plantuml.jsondiagram.StyleExtractor;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class HclDiagramFactory extends PSystemAbstractFactory {
@ -77,7 +77,7 @@ public class HclDiagramFactory extends PSystemAbstractFactory {
HclParser parser = new HclParser(list);
data = parser.parseMe();
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
final JsonDiagram result = new JsonDiagram(style, source, UmlDiagramType.HCL, data, highlighted);
// if (styleExtractor != null) {

View File

@ -45,7 +45,7 @@ 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.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.theme.ThemeUtils;
public class CommandHelpTheme extends SingleLineCommand2<Help> {
@ -77,7 +77,7 @@ public class CommandHelpTheme extends SingleLineCommand2<Help> {
} catch (IOException e) {
final String message = "Unexpected error listing themes: " + e.getMessage();
Log.error(message);
Logger.error(e);
Logme.error(e);
return CommandExecutionResult.error(message);
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.jcckit;
@ -49,7 +49,7 @@ import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.core.DiagramType;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
public class PSystemJcckitFactory extends PSystemBasicFactory<PSystemJcckit> {
@ -100,7 +100,7 @@ public class PSystemJcckitFactory extends PSystemBasicFactory<PSystemJcckit> {
// p.load(new ByteArrayInputStream(data.toString().getBytes("ISO-8859-1")));
} catch (IOException e) {
Log.error("Error " + e);
Logger.error(e);
Logme.error(e);
return null;
}
return new PSystemJcckit(source, p, width, height);

View File

@ -1,57 +0,0 @@
package net.sourceforge.plantuml.log;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.logging.ConsoleHandler;
import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;
public class Logger {
private static final java.util.logging.Logger logger;
static {
logger = java.util.logging.Logger.getLogger("com.plantuml");
logger.setUseParentHandlers(false);
ConsoleHandler handler = new ConsoleHandler();
handler.setFormatter(new Formatter() {
@Override
public synchronized String format(LogRecord lr) {
String throwable = "";
if (lr.getThrown() != null) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println();
lr.getThrown().printStackTrace(pw);
pw.close();
throwable = sw.toString().trim();
}
String message = lr.getMessage();
StringBuilder sb = new StringBuilder();
if (message.trim().length() > 0) {
sb.append(message);
sb.append(System.lineSeparator());
}
if (throwable.length() > 0) {
sb.append(throwable);
sb.append(System.lineSeparator());
}
return sb.toString();
}
});
logger.addHandler(handler);
}
public static void error(Throwable thrown) {
logger.log(Level.SEVERE, "", thrown);
}
public static void error(String msg, Throwable thrown) {
logger.log(Level.SEVERE, msg, thrown);
}
public static void error(String msg) {
logger.log(Level.SEVERE, msg);
}
}

View File

@ -0,0 +1,67 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2023, 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: Guillaume Grossetie
*
*
*/
package net.sourceforge.plantuml.log;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Logme {
private static final Logger logger;
static {
logger = Logger.getLogger("com.plantuml");
logger.setUseParentHandlers(false);
final ConsoleHandler handler = new ConsoleHandler();
handler.setFormatter(new SimpleFormatter());
logger.addHandler(handler);
}
public static void error(Throwable thrown) {
logger.log(Level.SEVERE, "", thrown);
}
// Unused right now
//
// public static void error(String msg, Throwable thrown) {
// logger.log(Level.SEVERE, msg, thrown);
// }
//
// public static void error(String msg) {
// logger.log(Level.SEVERE, msg);
// }
}

View File

@ -0,0 +1,74 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2023, 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: Guillaume Grossetie
*
*
*/
package net.sourceforge.plantuml.log;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;
public class SimpleFormatter extends Formatter {
@Override
public synchronized String format(LogRecord record) {
final String throwable;
if (record.getThrown() == null) {
throwable = "";
} else {
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
pw.println();
record.getThrown().printStackTrace(pw);
pw.close();
throwable = sw.toString().trim();
}
final String message = record.getMessage();
final StringBuilder sb = new StringBuilder();
if (message.trim().length() > 0) {
sb.append(message);
sb.append(System.lineSeparator());
}
if (throwable.length() > 0) {
sb.append(throwable);
sb.append(System.lineSeparator());
}
return sb.toString();
}
}

View File

@ -36,12 +36,12 @@
package net.sourceforge.plantuml.math;
import java.awt.Color;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import javax.script.ScriptException;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ugraphic.MutableImage;
import net.sourceforge.plantuml.ugraphic.UImageSvg;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.math;
@ -38,7 +38,6 @@ package net.sourceforge.plantuml.math;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.io.CharArrayWriter;
import java.io.IOException;
import java.io.Writer;
@ -47,12 +46,12 @@ import java.lang.reflect.Method;
import javax.swing.Icon;
import net.sourceforge.plantuml.log.Logger;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.log.Logme;
public class ConverterSvg {
@ -75,7 +74,7 @@ public class ConverterSvg {
Class.forName("org.scilab.forge.jlatexmath.greek.GreekRegistration").newInstance());
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
}

View File

@ -37,13 +37,13 @@ package net.sourceforge.plantuml.math;
import java.awt.Color;
import java.awt.Graphics2D;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import javax.swing.Icon;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ugraphic.MutableImage;
import net.sourceforge.plantuml.ugraphic.UImageSvg;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.math;
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
@ -94,7 +94,7 @@ public class PSystemLatex extends AbstractPSystem {
scale = scale1;
}
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
} else if (lineLower.startsWith("dpi ")) {
final String value = line.substring("dpi ".length());
@ -104,7 +104,7 @@ public class PSystemLatex extends AbstractPSystem {
scale = dpi1 / 96;
}
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
} else {
this.latex = line;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.math;
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
@ -94,7 +94,7 @@ public class PSystemMath extends AbstractPSystem {
scale = scale1;
}
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
} else if (lineLower.startsWith("dpi ")) {
final String value = line.substring("dpi ".length());
@ -104,7 +104,7 @@ public class PSystemMath extends AbstractPSystem {
scale = dpi1 / 96;
}
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
}
} else {
this.math = line;

View File

@ -36,10 +36,10 @@
package net.sourceforge.plantuml.math;
import java.awt.Color;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ugraphic.MutableImage;
import net.sourceforge.plantuml.ugraphic.UImageSvg;

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,7 +30,7 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.math;
@ -52,7 +52,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.eps.EpsGraphics;
import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
@ -74,7 +74,7 @@ public class ScientificEquationSafe {
try {
return new ScientificEquationSafe(formula, new AsciiMath(formula));
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
Log.info("Error parsing " + formula);
return new ScientificEquationSafe(formula, null);
}
@ -84,7 +84,7 @@ public class ScientificEquationSafe {
try {
return new ScientificEquationSafe(formula, new LatexBuilder(formula));
} catch (Exception e) {
Logger.error(e);
Logme.error(e);
Log.info("Error parsing " + formula);
return new ScientificEquationSafe(formula, null);
}
@ -130,7 +130,7 @@ public class ScientificEquationSafe {
if (equation != null) {
System.err.println("Latex=" + equation.getSource());
}
Logger.error(e);
Logme.error(e);
}
private TextBlockBackcolored getRollback() {

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -126,7 +126,7 @@ public class MindMap implements UDrawable {
return this.regular.add(skinParam.getCurrentStyleBuilder(), backColor, level, label, shape, stereotype);
} catch (NoStyleAvailableException e) {
// Logger.error(e);
// Logme.error(e);
return CommandExecutionResult.error("General failure: no style available.");
}
}

View File

@ -5,12 +5,12 @@
* (C) Copyright 2009-2023, 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
@ -30,12 +30,11 @@
*
*
* Original Author: Arnaud Roques
*
*
*
*/
package net.sourceforge.plantuml.openiconic;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@ -45,10 +44,11 @@ import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.log.Logger;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.openiconic.data.DummyIcon;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.ugraphic.UGraphic;
@ -70,7 +70,7 @@ public class OpenIcon {
try {
return new OpenIcon(is, name);
} catch (IOException e) {
Logger.error(e);
Logme.error(e);
return null;
}
}

Some files were not shown because too many files have changed in this diff Show More