mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-21 20:45:10 +00:00
version 1.2020.9
This commit is contained in:
parent
e9fb57cbbe
commit
5bd20214e2
8
pom.xml
8
pom.xml
@ -35,7 +35,7 @@
|
||||
|
||||
<groupId>net.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantuml</artifactId>
|
||||
<version>1.2020.9-SNAPSHOT</version>
|
||||
<version>1.2020.9</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>PlantUML</name>
|
||||
@ -75,9 +75,9 @@
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:svn://svn.code.sf.net/p/plantuml/code/trunk</connection>
|
||||
<developerConnection>scm:svn:https://svn.code.sf.net/p/plantuml/code/trunk</developerConnection>
|
||||
<url>svn://svn.code.sf.net/p/plantuml/code/trunk</url>
|
||||
<connection>scm:svn:svn://svn.code.sf.net/p/plantuml/code/tags/plantuml-1.2020.9</connection>
|
||||
<developerConnection>scm:svn:https://svn.code.sf.net/p/plantuml/code/tags/plantuml-1.2020.9</developerConnection>
|
||||
<url>svn://svn.code.sf.net/p/plantuml/code/tags/plantuml-1.2020.9</url>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
|
@ -13,6 +13,10 @@ root {
|
||||
Shadowing 0.0
|
||||
}
|
||||
|
||||
document {
|
||||
BackGroundColor White
|
||||
}
|
||||
|
||||
stereotype {
|
||||
FontStyle italic
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class ByteArray {
|
||||
}
|
||||
|
||||
public String toUPF9String() throws IOException {
|
||||
return Upf9.decodeString(data, length);
|
||||
return Upf9Decoder.decodeString(data, length);
|
||||
}
|
||||
|
||||
public int getByteAt(int i) {
|
||||
|
@ -40,28 +40,35 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class Keywords {
|
||||
public class Tokens {
|
||||
|
||||
private final List<String> keywords = new ArrayList<String>();
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.err.println("keywords=" + new Keywords().keywords.size());
|
||||
final Set<String> sorted = new TreeSet<String>(new Keywords().keywords);
|
||||
System.err.println("keywords=" + new Tokens().keywords.size());
|
||||
final Set<String> sorted = new TreeSet<String>(new Tokens().keywords);
|
||||
for (String s : sorted) {
|
||||
System.err.println(s);
|
||||
}
|
||||
}
|
||||
|
||||
public String compress(String s) {
|
||||
public String compressUnicodeE000(String s) {
|
||||
for (int i = 0; i < keywords.size(); i++) {
|
||||
final char c = (char) ('\uE000' + i);
|
||||
s = s.replace(keywords.get(i), "" + c);
|
||||
}
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
public Keywords() {
|
||||
public String compressAscii128(String s) {
|
||||
for (int i = 0; i < keywords.size(); i++) {
|
||||
final char c = (char) (128 + i);
|
||||
s = s.replace(keywords.get(i), "" + c);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public Tokens() {
|
||||
add("actor");
|
||||
add("participant");
|
||||
add("usecase");
|
||||
@ -145,37 +152,64 @@ public class Keywords {
|
||||
add("stereotype");
|
||||
add("split");
|
||||
add("style");
|
||||
add("sprite");
|
||||
|
||||
add("!exit");
|
||||
add("!include");
|
||||
add("!pragma");
|
||||
add("!undef");
|
||||
add("!ifdef");
|
||||
add("!endif");
|
||||
add("!ifndef");
|
||||
add("!else");
|
||||
add("!function");
|
||||
add("!procedure");
|
||||
add("!endfunction");
|
||||
add("!endprocedure");
|
||||
add("!unquoted");
|
||||
add("!return");
|
||||
add("!startsub");
|
||||
add("!endsub");
|
||||
add("!assert");
|
||||
add("!local");
|
||||
add("exit");
|
||||
add("include");
|
||||
add("pragma");
|
||||
add("undef");
|
||||
add("ifdef");
|
||||
// add("endif");
|
||||
add("ifndef");
|
||||
// add("else");
|
||||
add("function");
|
||||
add("procedure");
|
||||
add("endfunction");
|
||||
add("endprocedure");
|
||||
add("unquoted");
|
||||
// add("return");
|
||||
add("startsub");
|
||||
add("endsub");
|
||||
add("assert");
|
||||
add("local");
|
||||
|
||||
add("!definelong");
|
||||
add("!enddefinelong");
|
||||
add("!define");
|
||||
|
||||
add("define");
|
||||
add("alias");
|
||||
add("shape");
|
||||
add("label");
|
||||
add("BackgroundColor");
|
||||
add("Color");
|
||||
add("color");
|
||||
add("Entity");
|
||||
add("ENTITY");
|
||||
add("COLOR");
|
||||
add("LARGE");
|
||||
add("stereo");
|
||||
add("AZURE");
|
||||
add("Azure");
|
||||
|
||||
}
|
||||
|
||||
private void add(String string) {
|
||||
if (keywords.contains(string)) {
|
||||
System.err.println(string);
|
||||
throw new IllegalArgumentException(string);
|
||||
}
|
||||
if (string.length() <= 3) {
|
||||
System.err.println(string);
|
||||
throw new IllegalArgumentException(string);
|
||||
}
|
||||
if (string.matches("[!@]?[A-Za-z]+") == false) {
|
||||
System.err.println(string);
|
||||
throw new IllegalArgumentException(string);
|
||||
}
|
||||
keywords.add(string);
|
||||
if (keywords.size() > 127) {
|
||||
System.err.println(string);
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
@ -70,7 +70,7 @@ public class TranscoderImpl implements Transcoder {
|
||||
if (format == Format.UTF8)
|
||||
data = stringAnnoted.getBytes("UTF-8");
|
||||
else
|
||||
data = Upf9.getBytes(stringAnnoted);
|
||||
data = Upf9Encoder.getBytes(stringAnnoted);
|
||||
|
||||
final byte[] compressedData = compression.compress(data);
|
||||
|
||||
|
85
src/net/sourceforge/plantuml/code/Upf9Decoder.java
Normal file
85
src/net/sourceforge/plantuml/code/Upf9Decoder.java
Normal file
@ -0,0 +1,85 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2020, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlantUML distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
* USA.
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.code;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class Upf9Decoder {
|
||||
|
||||
private Upf9Decoder() {
|
||||
}
|
||||
|
||||
static int decodeChar(InputStream is) throws IOException {
|
||||
final int read0 = is.read();
|
||||
if (read0 == -1) {
|
||||
return -1;
|
||||
}
|
||||
if (read0 == 0x0B) {
|
||||
final int read1 = is.read();
|
||||
if (read1 >= 0x80)
|
||||
return (char) read1;
|
||||
return (char) ((0xE0 << 8) + read1);
|
||||
}
|
||||
if (read0 == 0x0C) {
|
||||
final int read1 = is.read();
|
||||
final int read2 = is.read();
|
||||
return (char) ((read1 << 8) + read2);
|
||||
}
|
||||
if (read0 >= 0x01 && read0 <= 0x08) {
|
||||
final int read1 = is.read();
|
||||
return (char) ((read0 << 8) + read1);
|
||||
}
|
||||
if (read0 >= 0x80 && read0 <= 0xFF) {
|
||||
final int read1 = is.read();
|
||||
return (char) (((read0 - 0x60) << 8) + read1);
|
||||
}
|
||||
return (char) read0;
|
||||
}
|
||||
|
||||
public static String decodeString(byte[] data, int length) throws IOException {
|
||||
final ByteArrayInputStream bais = new ByteArrayInputStream(data, 0, length);
|
||||
final StringBuilder result = new StringBuilder();
|
||||
int read;
|
||||
while ((read = decodeChar(bais)) != -1) {
|
||||
result.append((char) read);
|
||||
}
|
||||
bais.close();
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
}
|
@ -38,11 +38,10 @@ package net.sourceforge.plantuml.code;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class Upf9 {
|
||||
public class Upf9Encoder {
|
||||
|
||||
private Upf9() {
|
||||
private Upf9Encoder() {
|
||||
|
||||
}
|
||||
|
||||
@ -54,7 +53,7 @@ public class Upf9 {
|
||||
|
||||
private static boolean checkBack(char c, byte[] result) {
|
||||
try {
|
||||
if (c == decodeChar(new ByteArrayInputStream(result)))
|
||||
if (c == Upf9Decoder.decodeChar(new ByteArrayInputStream(result)))
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
@ -64,67 +63,36 @@ public class Upf9 {
|
||||
|
||||
private static byte[] encodeCharInternal(char c) {
|
||||
if (c == '\n' || c == '\r' || c == '\t') {
|
||||
// Using regular ASCII code for <u+0009> <u+000A> and <u+000D>
|
||||
return new byte[] { (byte) c };
|
||||
}
|
||||
if (c >= '\u000E' && c <= '\u0012') {
|
||||
return new byte[] { (byte) c };
|
||||
}
|
||||
if (c >= '\u0020' && c <= '\u007E') {
|
||||
// Using regular ASCII code for ASCII printable char
|
||||
return new byte[] { (byte) c };
|
||||
}
|
||||
if (c >= '\u0080' && c <= '\u00FF') {
|
||||
// Char from <u+0080> to <u+00FF> are encoded as [0x0B 0x80] to [0x0B 0xFF]
|
||||
return new byte[] { 0x0B, (byte) c };
|
||||
}
|
||||
if (c >= '\u0100' && c <= '\u08FF') {
|
||||
// Char from <u+0100> to <u+08FF> are encoded as [0x01 0x00] to [0x08 0xFF]
|
||||
return new byte[] { highByte(c), lowByte(c) };
|
||||
}
|
||||
if (c >= '\u0900' && c <= '\u10FF') {
|
||||
return new byte[] { (byte) (5 + highByte(c)), lowByte(c) };
|
||||
}
|
||||
if (c >= '\u1900' && c <= '\u1FFF') {
|
||||
return new byte[] { (byte) (-3 + highByte(c)), lowByte(c) };
|
||||
}
|
||||
if (c >= '\u2000' && c <= '\u9FFF') {
|
||||
return new byte[] { (byte) (96 + highByte(c)), lowByte(c) };
|
||||
// Char from <u+2000> to <u+9FFF> are encoded as [0x80 0x00] to [0xFF 0xFF]
|
||||
return new byte[] { (byte) (0x60 + highByte(c)), lowByte(c) };
|
||||
}
|
||||
if (c >= '\uE000' && c <= '\uE07F') {
|
||||
// Char from <u+E000> to <u+E07F> are encoded as [0x0B 0x00] to [0x0B 0x7F]
|
||||
return new byte[] { 0x0B, lowByte(c) };
|
||||
}
|
||||
// All other char are encoded on 3 bytes, starting with 0x0C
|
||||
return new byte[] { 0x0C, highByte(c), lowByte(c) };
|
||||
}
|
||||
|
||||
static int decodeChar(InputStream is) throws IOException {
|
||||
final int read0 = is.read();
|
||||
if (read0 == -1) {
|
||||
return -1;
|
||||
}
|
||||
if (read0 == 0x0B) {
|
||||
final int read1 = is.read();
|
||||
if (read1 >= 0x80)
|
||||
return (char) read1;
|
||||
return (char) ((0xE0 << 8) + read1);
|
||||
}
|
||||
if (read0 == 0x0C) {
|
||||
final int read1 = is.read();
|
||||
final int read2 = is.read();
|
||||
return (char) ((read1 << 8) + read2);
|
||||
}
|
||||
if (read0 >= 0x01 && read0 <= 0x08) {
|
||||
final int read1 = is.read();
|
||||
return (char) ((read0 << 8) + read1);
|
||||
}
|
||||
if (read0 >= 0x0E && read0 <= 0x15) {
|
||||
final int read1 = is.read();
|
||||
return (char) (((read0 - 5) << 8) + read1);
|
||||
}
|
||||
if (read0 >= 0x16 && read0 <= 0x1C) {
|
||||
final int read1 = is.read();
|
||||
return (char) (((read0 + 3) << 8) + read1);
|
||||
}
|
||||
if (read0 >= 0x80 && read0 <= 0xFF) {
|
||||
final int read1 = is.read();
|
||||
return (char) (((read0 - 96) << 8) + read1);
|
||||
}
|
||||
return (char) read0;
|
||||
}
|
||||
|
||||
private static byte lowByte(char c) {
|
||||
return (byte) (c & 0x00FF);
|
||||
}
|
||||
@ -139,18 +107,9 @@ public class Upf9 {
|
||||
baos.write(encodeChar(s.charAt(i)));
|
||||
}
|
||||
baos.close();
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
public static String decodeString(byte[] data, int length) throws IOException {
|
||||
final ByteArrayInputStream bais = new ByteArrayInputStream(data, 0, length);
|
||||
final StringBuilder result = new StringBuilder();
|
||||
int read;
|
||||
while ((read = decodeChar(bais)) != -1) {
|
||||
result.append((char) read);
|
||||
}
|
||||
bais.close();
|
||||
return result.toString();
|
||||
final byte[] result = baos.toByteArray();
|
||||
assert s.endsWith(Upf9Decoder.decodeString(result, result.length));
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -72,25 +72,25 @@ public class PSystemDonors extends AbstractPSystem {
|
||||
private static final int COLS = 6;
|
||||
private static final int FREE_LINES = 6;
|
||||
|
||||
public static final String DONORS = "6qmB02mFUBXRGOc9nbfsvvsjZ8ybZ2OHBCyJYiF08fxk1iGVuDxfSR-H_YAwqhrlcX5jsPhYF6E8M13q"
|
||||
+ "U9fSCsnpRmyyvfxff-Ixcz4JPiBaVmA4fYcNj0L8bI4b-FUTh_mIz0xls23HNANHuiWzilk5zpV3UUuq"
|
||||
+ "Fdhf6V08LJz5zxN_Dvr8N1uAOPPcAup1g6Y4sXSuHUTOxlzJgKkZsdrNHNMhAiTqwk8OhWeRqDK9ZmMh"
|
||||
+ "cLguQvnNXoQZOhARI8cqHWaHepD3JqvgNo47CaZyKJz0XyqLbehS4uhBA4bqVJrtPDj0ymiIBuLWY0MR"
|
||||
+ "1-PGok7TeCIv4ICH5453rofwOnkEB7dYWY4EBUpX7utaY4SgiwQZHIBa4IY8U1e79BrGZoOnExqOK7ra"
|
||||
+ "j1Yn95LNnqsuVnuMKhGs6ku1Yn0Bp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
|
||||
+ "EiwhxZNUhsBRty9xqeVq_2C3VgPt1YBbHposhVoZIBUEYbcifMxMvRkw7nmyTCU2CrYqX1bjjaEcGU5i"
|
||||
+ "CixKhqn-MZBy7OUivlU6PgyWUYTiX0Wpci7jhSarDRbC8cWwo_6n2uWYjNZ5hhXm1qBTB2l55ZR5oZDM"
|
||||
+ "Zq92ViTyWaZbNJYjM6lk9ZmZUnJKuRmxLYthrw6MRG7LvZ11HbgeQgIQ8tqja85hTNeMMmVRdnPOCBRn"
|
||||
+ "g8eLX-8x9jgltA1W2imKuNvH48boGLfABp59JE1__lnAFRclWutlZFB9E4ZsaCH05N9rnechfe7p65R6"
|
||||
+ "Ues_Nszjzmh-_7iTRN9gYsT-YY1w3fBZtqbnp8LIrl4qobzdmsB08LPmqKR1bLkMtWmaBDY1TsPHZmyp"
|
||||
+ "6ZSnMMvQBdh5zg4gVZkv0HVp8JRikCYaEKOikTBRRZseuhRlU6Dna8FYxwBAk4okSlKQ654WjhuN9prs"
|
||||
+ "6sLuoYe5M50Tjmci_Ugtqonl6dFUeLGtN0RopO6SAlK8BQofQSrO26mGOtvlOJ-LzFXF1lh5jTQFlNhe"
|
||||
+ "EQYyXtU3Xczxa7x6I31S9EsOeBVqEPc1XsyOv8svEV7fOicLYsuOTe5WXVr6NoOB2I_iQ9LBDDSUNdFw"
|
||||
+ "vLtEQZjow1QoZrQZ-OMYYfY1N5YirTM9XLAE1r8a1NFsbl42QGUzmIKz0JX5mV7-xaCulT3yY6RjuncD" + "OgwA2G00";
|
||||
|
||||
/*
|
||||
* Special thanks to our sponsors and donors:
|
||||
|
@ -267,7 +267,8 @@ public class QuoteUtils {
|
||||
"Gunax lbh sbe pubbfvat Bprnavp Nveyvarf", "4-8-15-16-23-42",
|
||||
"...naq gnk phgf. Gung'yy fubj gurz znegvnaf.",
|
||||
"Jurarire V srry gur arrq gb rkrepvfr, V yvr qbja hagvy vg tbrf njnl", "Ernyvgl pbagvahrf gb ehva zl yvsr",
|
||||
"Vs lbh gvpxyr hf, qb jr abg ynhtu?", "V xabj n HQC wbxr, ohg lbh zvtug abg trg vg");
|
||||
"Vs lbh gvpxyr hf, qb jr abg ynhtu?", "V xabj n HQC wbxr, ohg lbh zvtug abg trg vg",
|
||||
"Chvfdhr prf zlfgrerf abhf qrcnffrag, srvtabaf q'ra rger y'betnavfngrhe.");
|
||||
|
||||
private QuoteUtils() {
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ import net.sourceforge.plantuml.OptionFlags;
|
||||
|
||||
public class ImportedFiles {
|
||||
|
||||
private static final List<File> INCLUDE_PATH = FileSystem.getPath("plantuml.include.path", true);
|
||||
private final List<File> imported;
|
||||
private final AParentFolder currentDir;
|
||||
|
||||
@ -107,11 +106,15 @@ public class ImportedFiles {
|
||||
|
||||
public List<File> getPath() {
|
||||
final List<File> result = new ArrayList<File>(imported);
|
||||
result.addAll(INCLUDE_PATH);
|
||||
result.addAll(includePath());
|
||||
result.addAll(FileSystem.getPath("java.class.path", true));
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<File> includePath() {
|
||||
return FileSystem.getPath("plantuml.include.path", true);
|
||||
}
|
||||
|
||||
private boolean isAbsolute(String nameOrPath) {
|
||||
final File f = new File(nameOrPath);
|
||||
return f.isAbsolute();
|
||||
@ -148,8 +151,9 @@ public class ImportedFiles {
|
||||
}
|
||||
if (file != null) {
|
||||
final File folder = file.getSystemFolder();
|
||||
// System.err.println("canonicalPath=" + path + " " + folder + " " + INCLUDE_PATH);
|
||||
if (INCLUDE_PATH.contains(folder)) {
|
||||
// System.err.println("canonicalPath=" + path + " " + folder + " " +
|
||||
// INCLUDE_PATH);
|
||||
if (includePath().contains(folder)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -119,19 +119,20 @@ abstract class ExtremityExtendsLike extends Extremity {
|
||||
private final UTranslate pos1, pos2;
|
||||
private final UEllipse dot;
|
||||
|
||||
private static UTranslate getDotPos(double x, double y, double angle, double size, Point2D porig) {
|
||||
Point p = new Point(x, y);
|
||||
p.rotate(angle);
|
||||
p.x -= size;
|
||||
p.y -= size;
|
||||
return p.getPos(porig);
|
||||
}
|
||||
|
||||
public DefinedBy(Point2D porig, double angle, HColor backgroundColor) {
|
||||
super(porig, angle, backgroundColor);
|
||||
double w = HALF_WIDTH - DOTHSIZE;
|
||||
|
||||
Point p1 = new Point(XSUFFIX, -w);
|
||||
p1.rotate(angle);
|
||||
p1.x -= DOTHSIZE;
|
||||
this.pos1 = p1.getPos(porig);
|
||||
|
||||
Point p2 = new Point(XSUFFIX, +w);
|
||||
p2.rotate(angle);
|
||||
p2.x -= DOTHSIZE;
|
||||
this.pos2 = p2.getPos(porig);
|
||||
this.pos1 = getDotPos(XSUFFIX, -w, angle, DOTHSIZE, porig);
|
||||
this.pos2 = getDotPos(XSUFFIX, +w, angle, DOTHSIZE, porig);
|
||||
|
||||
double s = DOTHSIZE + DOTHSIZE;
|
||||
this.dot = new UEllipse(s, s);
|
||||
@ -170,4 +171,4 @@ abstract class ExtremityExtendsLike extends Extremity {
|
||||
ug.apply(back).draw(trig);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -161,6 +161,7 @@ public class LanguageDescriptor {
|
||||
keyword.add("stereotype");
|
||||
keyword.add("split");
|
||||
keyword.add("style");
|
||||
keyword.add("sprite");
|
||||
|
||||
preproc.add("!exit");
|
||||
preproc.add("!include");
|
||||
|
@ -305,7 +305,7 @@ public enum License {
|
||||
text.add(" ");
|
||||
text.add("Project Info: https://plantuml.com");
|
||||
text.add(" ");
|
||||
|
||||
|
||||
if (licenseInfo.isValid() == false) {
|
||||
text.add("If you like this project or if you find it useful, you can support us at:");
|
||||
text.add(" ");
|
||||
@ -313,7 +313,8 @@ public enum License {
|
||||
text.add("https://plantuml.com/liberapay (only 1\u20ac per month!)");
|
||||
text.add("https://plantuml.com/paypal");
|
||||
if (withQrcode) {
|
||||
text.add("\t<qrcode:http://plantuml.com/patreon>\t\t<qrcode:http://plantuml.com/lp>\t\t<qrcode:http://plantuml.com/paypal>");
|
||||
text.add(
|
||||
"\t<qrcode:http://plantuml.com/patreon>\t\t<qrcode:http://plantuml.com/lp>\t\t<qrcode:http://plantuml.com/paypal>");
|
||||
} else {
|
||||
text.add("");
|
||||
text.add(" ");
|
||||
@ -325,7 +326,8 @@ public enum License {
|
||||
if (licenseInfo.getLicenseType() == LicenseType.NAMED) {
|
||||
text.add("| ");
|
||||
text.add("| LICENSED TO : " + licenseInfo.getOwner());
|
||||
text.add("| EXPIRATION DATE : " + DateFormat.getDateInstance().format(licenseInfo.getExpirationDate()));
|
||||
text.add(
|
||||
"| EXPIRATION DATE : " + DateFormat.getDateInstance().format(licenseInfo.getExpirationDate()));
|
||||
text.add("| ");
|
||||
} else if (licenseInfo.getLicenseType() == LicenseType.DISTRIBUTOR) {
|
||||
text.add("| ");
|
||||
@ -338,7 +340,7 @@ public enum License {
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getJavaHeader() {
|
||||
public List<String> getJavaHeader(List<String> contributors) {
|
||||
final List<String> h = new ArrayList<String>();
|
||||
h.add("/* ========================================================================");
|
||||
h.add(" * PlantUML : a free UML diagram generator");
|
||||
@ -468,6 +470,7 @@ public enum License {
|
||||
}
|
||||
h.add(" *");
|
||||
h.add(" * Original Author: Arnaud Roques");
|
||||
h.addAll(contributors);
|
||||
h.add(" */");
|
||||
return Collections.unmodifiableList(h);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class Version {
|
||||
private static final int MAJOR_SEPARATOR = 1000000;
|
||||
|
||||
public static int version() {
|
||||
return 1202008;
|
||||
return 1202009;
|
||||
}
|
||||
|
||||
public static int versionPatched() {
|
||||
@ -79,7 +79,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static int beta() {
|
||||
final int beta = 18;
|
||||
final int beta = 0;
|
||||
return beta;
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ public class Version {
|
||||
}
|
||||
|
||||
public static long compileTime() {
|
||||
return 1587910102162L;
|
||||
return 1589107866768L;
|
||||
}
|
||||
|
||||
public static String compileTimeString() {
|
||||
|
Loading…
Reference in New Issue
Block a user