mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
version 1.2018.11
This commit is contained in:
parent
4758fa1d66
commit
414f51d257
@ -43,38 +43,38 @@ public final class MatrixToImageWriter {
|
||||
* Renders a {@link BitMatrix} as an image, where "false" bits are rendered
|
||||
* as white, and "true" bits are rendered as black.
|
||||
*/
|
||||
public static BufferedImage toBufferedImage(BitMatrix matrix) {
|
||||
public static BufferedImage toBufferedImage(BitMatrix matrix, int fore, int back) {
|
||||
int width = matrix.getWidth();
|
||||
int height = matrix.getHeight();
|
||||
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
|
||||
image.setRGB(x, y, matrix.get(x, y) ? fore : back);
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a {@link BitMatrix} to a file.
|
||||
*
|
||||
* @see #toBufferedImage(BitMatrix)
|
||||
*/
|
||||
public static void writeToFile(BitMatrix matrix, String format, File file)
|
||||
throws IOException {
|
||||
BufferedImage image = toBufferedImage(matrix);
|
||||
ImageIO.write(image, format, file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a {@link BitMatrix} to a stream.
|
||||
*
|
||||
* @see #toBufferedImage(BitMatrix)
|
||||
*/
|
||||
public static void writeToStream(BitMatrix matrix, String format, OutputStream stream)
|
||||
throws IOException {
|
||||
BufferedImage image = toBufferedImage(matrix);
|
||||
ImageIO.write(image, format, stream);
|
||||
}
|
||||
// /**
|
||||
// * Writes a {@link BitMatrix} to a file.
|
||||
// *
|
||||
// * @see #toBufferedImage(BitMatrix)
|
||||
// */
|
||||
// public static void writeToFile(BitMatrix matrix, String format, File file)
|
||||
// throws IOException {
|
||||
// BufferedImage image = toBufferedImage(matrix);
|
||||
// ImageIO.write(image, format, file);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Writes a {@link BitMatrix} to a stream.
|
||||
// *
|
||||
// * @see #toBufferedImage(BitMatrix)
|
||||
// */
|
||||
// public static void writeToStream(BitMatrix matrix, String format, OutputStream stream)
|
||||
// throws IOException {
|
||||
// BufferedImage image = toBufferedImage(matrix);
|
||||
// ImageIO.write(image, format, stream);
|
||||
// }
|
||||
|
||||
}
|
||||
|
54
src/net/sourceforge/plantuml/AFile.java
Normal file
54
src/net/sourceforge/plantuml/AFile.java
Normal file
@ -0,0 +1,54 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public interface AFile {
|
||||
|
||||
public InputStream open() throws IOException;
|
||||
|
||||
public boolean isOk();
|
||||
|
||||
public AParentFolder getParentFile();
|
||||
|
||||
public String getAbsolutePath();
|
||||
|
||||
public File getUnderlyingFile();
|
||||
|
||||
}
|
84
src/net/sourceforge/plantuml/AFileRegular.java
Normal file
84
src/net/sourceforge/plantuml/AFileRegular.java
Normal file
@ -0,0 +1,84 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class AFileRegular implements AFile {
|
||||
|
||||
private final File file;
|
||||
|
||||
public AFileRegular(File file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
public InputStream open() throws IOException {
|
||||
return new FileInputStream(file);
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
return file.exists() && file.isDirectory() == false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return file.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof AFileRegular == false) {
|
||||
return false;
|
||||
}
|
||||
return this.file.equals(((AFileRegular) obj).file);
|
||||
}
|
||||
|
||||
public AParentFolder getParentFile() {
|
||||
return new AParentFolderRegular(file.getParentFile());
|
||||
}
|
||||
|
||||
public String getAbsolutePath() {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
|
||||
public File getUnderlyingFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
}
|
119
src/net/sourceforge/plantuml/AFileZipEntry.java
Normal file
119
src/net/sourceforge/plantuml/AFileZipEntry.java
Normal file
@ -0,0 +1,119 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
public class AFileZipEntry implements AFile {
|
||||
|
||||
private final File zipFile;
|
||||
private final String entry;
|
||||
|
||||
public AFileZipEntry(File file, String entry) {
|
||||
this.zipFile = file;
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public InputStream open() throws IOException {
|
||||
final ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
|
||||
ZipEntry ze = zis.getNextEntry();
|
||||
|
||||
while (ze != null) {
|
||||
final String fileName = ze.getName();
|
||||
if (ze.isDirectory()) {
|
||||
} else if (fileName.trim().equalsIgnoreCase(entry.trim())) {
|
||||
return zis;
|
||||
}
|
||||
ze = zis.getNextEntry();
|
||||
}
|
||||
zis.closeEntry();
|
||||
zis.close();
|
||||
throw new IOException();
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
if (zipFile.exists() && zipFile.isDirectory() == false) {
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = open();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (is != null) {
|
||||
is.close();
|
||||
}
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return zipFile.hashCode() + entry.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof AFileZipEntry == false) {
|
||||
return false;
|
||||
}
|
||||
final AFileZipEntry other = (AFileZipEntry) obj;
|
||||
return this.zipFile.equals(other.zipFile) && this.entry.equals(other.entry);
|
||||
}
|
||||
|
||||
public AParentFolder getParentFile() {
|
||||
return new AParentFolderZip(zipFile, entry);
|
||||
}
|
||||
|
||||
public String getAbsolutePath() {
|
||||
return zipFile.getAbsolutePath() + "~" + entry;
|
||||
}
|
||||
|
||||
public File getUnderlyingFile() {
|
||||
return zipFile;
|
||||
}
|
||||
|
||||
}
|
44
src/net/sourceforge/plantuml/AParentFolder.java
Normal file
44
src/net/sourceforge/plantuml/AParentFolder.java
Normal file
@ -0,0 +1,44 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface AParentFolder {
|
||||
|
||||
public AFile getAFile(String nameOrPath) throws IOException;
|
||||
|
||||
}
|
60
src/net/sourceforge/plantuml/AParentFolderRegular.java
Normal file
60
src/net/sourceforge/plantuml/AParentFolderRegular.java
Normal file
@ -0,0 +1,60 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class AParentFolderRegular implements AParentFolder {
|
||||
|
||||
private final File dir;
|
||||
|
||||
public AParentFolderRegular(File dir) {
|
||||
this.dir = dir;
|
||||
}
|
||||
|
||||
public AFile getAFile(String nameOrPath) throws IOException {
|
||||
if (dir == null) {
|
||||
return null;
|
||||
}
|
||||
final File filecurrent = new File(dir.getAbsoluteFile(), nameOrPath);
|
||||
if (filecurrent.exists()) {
|
||||
return new AFileRegular(filecurrent.getCanonicalFile());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
71
src/net/sourceforge/plantuml/AParentFolderZip.java
Normal file
71
src/net/sourceforge/plantuml/AParentFolderZip.java
Normal file
@ -0,0 +1,71 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class AParentFolderZip implements AParentFolder {
|
||||
|
||||
private final File zipFile;
|
||||
private final String parent;
|
||||
|
||||
public AParentFolderZip(File zipFile, String entry) {
|
||||
this.zipFile = zipFile;
|
||||
final int idx = entry.lastIndexOf('/');
|
||||
if (idx == -1) {
|
||||
parent = "";
|
||||
} else {
|
||||
parent = entry.substring(0, idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public AFile getAFile(String nameOrPath) throws IOException {
|
||||
return new AFileZipEntry(zipFile, merge(parent + nameOrPath));
|
||||
}
|
||||
|
||||
String merge(String full) {
|
||||
// full = full.replaceFirst("\\.", "Z");
|
||||
while (true) {
|
||||
int len = full.length();
|
||||
full = full.replaceFirst("[^/]+/\\.\\./", "");
|
||||
if (full.length() == len) {
|
||||
return full;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -54,12 +54,11 @@ import net.sourceforge.plantuml.version.Version;
|
||||
public class BlockUml {
|
||||
|
||||
private final List<CharSequence2> data;
|
||||
private final int startLine;
|
||||
private Diagram system;
|
||||
private final Defines localDefines;
|
||||
|
||||
BlockUml(String... strings) {
|
||||
this(convert(strings), 0, Defines.createEmpty());
|
||||
this(convert(strings), Defines.createEmpty());
|
||||
}
|
||||
|
||||
public String getEncodedUrl() throws IOException {
|
||||
@ -93,8 +92,7 @@ public class BlockUml {
|
||||
return result;
|
||||
}
|
||||
|
||||
public BlockUml(List<CharSequence2> strings, int startLine, Defines defines) {
|
||||
this.startLine = startLine;
|
||||
public BlockUml(List<CharSequence2> strings, Defines defines) {
|
||||
this.localDefines = defines;
|
||||
final CharSequence2 s0 = strings.get(0).trin();
|
||||
if (StartUtils.startsWithSymbolAnd("start", s0) == false) {
|
||||
@ -132,15 +130,11 @@ public class BlockUml {
|
||||
|
||||
public Diagram getDiagram() {
|
||||
if (system == null) {
|
||||
system = new PSystemBuilder().createPSystem(data, startLine);
|
||||
system = new PSystemBuilder().createPSystem(data);
|
||||
}
|
||||
return system;
|
||||
}
|
||||
|
||||
public final int getStartLine() {
|
||||
return startLine;
|
||||
}
|
||||
|
||||
public final List<CharSequence2> getData() {
|
||||
return data;
|
||||
}
|
||||
|
@ -46,9 +46,10 @@ import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.Preprocessor;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineNumbered;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineReader;
|
||||
import net.sourceforge.plantuml.preproc.UncommentReadLine;
|
||||
import net.sourceforge.plantuml.preproc2.Preprocessor2;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
public final class BlockUmlBuilder implements DefinitionsContainer {
|
||||
@ -60,11 +61,12 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
|
||||
|
||||
public BlockUmlBuilder(List<String> config, String charset, Defines defines, Reader reader, File newCurrentDir,
|
||||
String desc) throws IOException {
|
||||
Preprocessor includer = null;
|
||||
ReadLineNumbered includer = null;
|
||||
this.defines = defines;
|
||||
try {
|
||||
reader2 = new UncommentReadLine(ReadLineReader.create(reader, desc));
|
||||
includer = new Preprocessor(config, reader2, charset, defines, newCurrentDir, this);
|
||||
// includer = new Preprocessor(config, reader2, charset, defines, newCurrentDir, this);
|
||||
includer = new Preprocessor2(config, reader2, charset, defines, new AParentFolderRegular(newCurrentDir), this);
|
||||
init(includer);
|
||||
} finally {
|
||||
if (includer != null) {
|
||||
@ -78,16 +80,15 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
|
||||
this(config, charset, defines, reader, null, null);
|
||||
}
|
||||
|
||||
private void init(Preprocessor includer) throws IOException {
|
||||
private void init(ReadLineNumbered includer) throws IOException {
|
||||
CharSequence2 s = null;
|
||||
List<CharSequence2> current2 = null;
|
||||
boolean paused = false;
|
||||
int startLine = 0;
|
||||
|
||||
while ((s = includer.readLine()) != null) {
|
||||
if (StartUtils.isArobaseStartDiagram(s)) {
|
||||
current2 = new ArrayList<CharSequence2>();
|
||||
paused = false;
|
||||
startLine = includer.getLineNumber();
|
||||
}
|
||||
if (StartUtils.isArobasePauseDiagram(s)) {
|
||||
paused = true;
|
||||
@ -114,7 +115,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
|
||||
if (paused) {
|
||||
current2.add(s);
|
||||
}
|
||||
blocks.add(new BlockUml(current2, startLine/* - config.size() */, defines.cloneMe()));
|
||||
blocks.add(new BlockUml(current2, defines.cloneMe()));
|
||||
current2 = null;
|
||||
reader2.setPaused(false);
|
||||
}
|
||||
|
@ -63,10 +63,10 @@ public class FileSystem {
|
||||
this.currentDir.set(dir);
|
||||
}
|
||||
|
||||
public File getCurrentDir() {
|
||||
return this.currentDir.get();
|
||||
}
|
||||
|
||||
// public File getCurrentDir() {
|
||||
// return this.currentDir.get();
|
||||
// }
|
||||
//
|
||||
public File getFile(String nameOrPath) throws IOException {
|
||||
final File dir = currentDir.get();
|
||||
if (dir == null || isAbsolute(nameOrPath)) {
|
||||
@ -76,22 +76,26 @@ public class FileSystem {
|
||||
if (filecurrent.exists()) {
|
||||
return filecurrent.getCanonicalFile();
|
||||
}
|
||||
for (File d : getPath("plantuml.include.path")) {
|
||||
final File file = new File(d, nameOrPath);
|
||||
if (file.exists()) {
|
||||
return file.getCanonicalFile();
|
||||
for (File d : getPath("plantuml.include.path", true)) {
|
||||
if (d.isDirectory()) {
|
||||
final File file = new File(d, nameOrPath);
|
||||
if (file.exists()) {
|
||||
return file.getCanonicalFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
for (File d : getPath("java.class.path")) {
|
||||
final File file = new File(d, nameOrPath);
|
||||
if (file.exists()) {
|
||||
return file.getCanonicalFile();
|
||||
for (File d : getPath("java.class.path", true)) {
|
||||
if (d.isDirectory()) {
|
||||
final File file = new File(d, nameOrPath);
|
||||
if (file.exists()) {
|
||||
return file.getCanonicalFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
return filecurrent;
|
||||
}
|
||||
|
||||
private List<File> getPath(String prop) {
|
||||
public static List<File> getPath(String prop, boolean onlyDir) {
|
||||
final List<File> result = new ArrayList<File>();
|
||||
String paths = System.getProperty(prop);
|
||||
if (paths == null) {
|
||||
@ -101,7 +105,7 @@ public class FileSystem {
|
||||
final StringTokenizer st = new StringTokenizer(paths, System.getProperty("path.separator"));
|
||||
while (st.hasMoreTokens()) {
|
||||
final File f = new File(st.nextToken());
|
||||
if (f.exists() && f.isDirectory()) {
|
||||
if (f.exists() && (onlyDir == false || f.isDirectory())) {
|
||||
result.add(f);
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.skin.ArrowDirection;
|
||||
import net.sourceforge.plantuml.svek.ConditionStyle;
|
||||
import net.sourceforge.plantuml.svek.PackageStyle;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapper;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
|
||||
@ -79,17 +78,15 @@ public interface ISkinParam extends ISkinSimple {
|
||||
|
||||
public int classAttributeIconSize();
|
||||
|
||||
public ColorMapper getColorMapper();
|
||||
|
||||
public DotSplines getDotSplines();
|
||||
|
||||
public String getDotExecutable();
|
||||
|
||||
public boolean shadowing();
|
||||
public boolean shadowing(Stereotype stereotype);
|
||||
|
||||
public boolean shadowingForNote(Stereotype stereotype);
|
||||
|
||||
public boolean shadowing2(SkinParameter skinParameter);
|
||||
public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter);
|
||||
|
||||
public PackageStyle getPackageStyle();
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapper;
|
||||
|
||||
public interface ISkinSimple extends SpriteContainer {
|
||||
|
||||
@ -50,5 +51,9 @@ public interface ISkinSimple extends SpriteContainer {
|
||||
public IHtmlColorSet getIHtmlColorSet();
|
||||
|
||||
public int getDpi();
|
||||
|
||||
public LineBreakStrategy wrapWidth();
|
||||
|
||||
public ColorMapper getColorMapper();
|
||||
|
||||
}
|
@ -94,14 +94,14 @@ public class PSystemBuilder {
|
||||
|
||||
public static final long startTime = System.currentTimeMillis();
|
||||
|
||||
final public Diagram createPSystem(final List<CharSequence2> strings2, int startLine) {
|
||||
final public Diagram createPSystem(final List<CharSequence2> strings2) {
|
||||
|
||||
final long now = System.currentTimeMillis();
|
||||
|
||||
Diagram result = null;
|
||||
try {
|
||||
final DiagramType type = DiagramType.getTypeFromArobaseStart(strings2.get(0).toString2());
|
||||
final UmlSource umlSource = new UmlSource(strings2, type == DiagramType.UML, startLine);
|
||||
final UmlSource umlSource = new UmlSource(strings2, type == DiagramType.UML);
|
||||
|
||||
// int cpt = 0;
|
||||
for (CharSequence2 s : strings2) {
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml;
|
||||
import java.awt.Color;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
@ -53,28 +54,39 @@ import net.sourceforge.plantuml.asciiart.UmlCharArea;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.eggs.PSystemWelcome;
|
||||
import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
|
||||
import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.GraphicPosition;
|
||||
import net.sourceforge.plantuml.graphic.GraphicStrings;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColor;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
|
||||
import net.sourceforge.plantuml.graphic.InnerStrategy;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.graphic.VerticalAlignment;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UImage;
|
||||
import net.sourceforge.plantuml.ugraphic.UTranslate;
|
||||
import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt;
|
||||
import net.sourceforge.plantuml.version.LicenseInfo;
|
||||
import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
|
||||
public class PSystemError extends AbstractPSystem {
|
||||
|
||||
private static final boolean TEST1 = false;
|
||||
|
||||
private final LineLocation higherErrorPosition;
|
||||
private final List<ErrorUml> printedErrors;
|
||||
private final List<String> debugLines = new ArrayList<String>();
|
||||
@ -145,9 +157,10 @@ public class PSystemError extends AbstractPSystem {
|
||||
udrawable = result;
|
||||
}
|
||||
final int min = (int) (System.currentTimeMillis() / 60000L) % 60;
|
||||
if (min == 0 /* && LicenseInfo.retrieveQuick().isValid() == false*/ ) {
|
||||
if (min == 0 && LicenseInfo.retrieveQuick().isValid() == false) {
|
||||
udrawable = addMessage(udrawable);
|
||||
|
||||
} else if (TEST1 || (min == 30 && LicenseInfo.retrieveQuick().isValid() == false)) {
|
||||
udrawable = addMessageDedication(udrawable);
|
||||
}
|
||||
imageBuilder.setUDrawable(udrawable);
|
||||
final ImageData imageData = imageBuilder.writeImageTOBEMOVED(fileFormat, seed(), os);
|
||||
@ -171,15 +184,59 @@ public class PSystemError extends AbstractPSystem {
|
||||
return result;
|
||||
}
|
||||
|
||||
private TextBlock addMessageDedication(final TextBlock source) throws IOException {
|
||||
final TextBlock message = getMessageDedication();
|
||||
TextBlock result = TextBlockUtils.mergeTB(message, source, HorizontalAlignment.LEFT);
|
||||
return result;
|
||||
}
|
||||
|
||||
private TextBlockBackcolored getMessageDedication() {
|
||||
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
|
||||
final HtmlColorSimple backColor = (HtmlColorSimple) new HtmlColorSetSimple().getColorIfValid("#DFDCD3");
|
||||
|
||||
final BufferedImage qrcode = smaller(utils.exportFlashcode("http://plantuml.com/dedication", Color.BLACK,
|
||||
backColor.getColor999()));
|
||||
final Display disp = Display.create("<b>Add your own dedication into PlantUML", " ",
|
||||
"For just $5 per month!", "Details on <i>[[http://plantuml.com/dedication]]");
|
||||
|
||||
final UFont font = UFont.sansSerif(14);
|
||||
final FontConfiguration fc = new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLACK, false);
|
||||
final TextBlock text = TextBlockUtils.withMargin(
|
||||
disp.create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()), 10, 0);
|
||||
final TextBlock result;
|
||||
if (qrcode == null) {
|
||||
result = text;
|
||||
} else {
|
||||
final UImage qr = new UImage(qrcode).scaleNearestNeighbor(3);
|
||||
result = TextBlockUtils.mergeLR(text, TextBlockUtils.fromUImage(qr), VerticalAlignment.CENTER);
|
||||
}
|
||||
return TextBlockUtils.addBackcolor(result, backColor);
|
||||
|
||||
}
|
||||
|
||||
private TextBlockBackcolored getMessage() {
|
||||
final UImage message = new UImage(PSystemVersion.getTime());
|
||||
final HtmlColor backImage = new HtmlColorSimple(new Color(message.getImage().getRGB(0, 0)), false);
|
||||
final double imWidth = message.getWidth();
|
||||
final double imHeight = message.getHeight();
|
||||
final Color back = new Color(message.getImage().getRGB(0, 0));
|
||||
final HtmlColor backColor = new HtmlColorSimple(back, false);
|
||||
|
||||
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
|
||||
final BufferedImage qrcode = smaller(utils.exportFlashcode("http://plantuml.com/patreon", back, Color.WHITE));
|
||||
|
||||
final int scale = 2;
|
||||
|
||||
final double imWidth = message.getWidth() + (qrcode == null ? 0 : qrcode.getWidth() * scale + 20);
|
||||
final double imHeight = qrcode == null ? message.getHeight() : Math.max(message.getHeight(), qrcode.getHeight()
|
||||
* scale + 10);
|
||||
return new TextBlockBackcolored() {
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
ug.apply(new UTranslate(1, 1)).draw(message);
|
||||
if (qrcode == null) {
|
||||
ug.apply(new UTranslate(1, 1)).draw(message);
|
||||
} else {
|
||||
final UImage qr = new UImage(qrcode).scaleNearestNeighbor(scale);
|
||||
ug.apply(new UTranslate(1, (imHeight - message.getHeight()) / 2)).draw(message);
|
||||
ug.apply(new UTranslate(1 + message.getWidth(), (imHeight - qr.getHeight()) / 2)).draw(qr);
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
|
||||
@ -195,12 +252,20 @@ public class PSystemError extends AbstractPSystem {
|
||||
}
|
||||
|
||||
public HtmlColor getBackcolor() {
|
||||
return backImage;
|
||||
return backColor;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
private BufferedImage smaller(BufferedImage im) {
|
||||
if (im == null) {
|
||||
return null;
|
||||
}
|
||||
final int nb = 1;
|
||||
return im.getSubimage(nb, nb, im.getWidth() - 2 * nb, im.getHeight() - 2 * nb);
|
||||
}
|
||||
|
||||
private List<String> getTextStrings() {
|
||||
final List<String> result = new ArrayList<String>(getStack());
|
||||
if (result.size() > 0) {
|
||||
|
@ -415,6 +415,8 @@ public class SkinParam implements ISkinParam {
|
||||
result.add("SameClassWidth");
|
||||
result.add("HyperlinkUnderline");
|
||||
result.add("Padding");
|
||||
result.add("BoxPadding");
|
||||
result.add("ParticipantPadding");
|
||||
result.add("Guillemet");
|
||||
result.add("SvglinkTarget");
|
||||
result.add("DefaultMonospacedFontName");
|
||||
@ -559,7 +561,14 @@ public class SkinParam implements ISkinParam {
|
||||
return new ColorMapperReverse(order);
|
||||
}
|
||||
|
||||
public boolean shadowing() {
|
||||
public boolean shadowing(Stereotype stereotype) {
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
final String value2 = getValue("shadowing" + stereotype.getLabel(false));
|
||||
if (value2 != null) {
|
||||
return value2.equalsIgnoreCase("true");
|
||||
}
|
||||
}
|
||||
final String value = getValue("shadowing");
|
||||
if ("false".equalsIgnoreCase(value)) {
|
||||
return false;
|
||||
@ -585,17 +594,25 @@ public class SkinParam implements ISkinParam {
|
||||
if (value2 != null) {
|
||||
return value2.equalsIgnoreCase("true");
|
||||
}
|
||||
return shadowing();
|
||||
return shadowing(stereotype);
|
||||
}
|
||||
|
||||
public boolean shadowing2(SkinParameter skinParameter) {
|
||||
public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) {
|
||||
if (skinParameter == null) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
final String name = skinParameter.getUpperCaseName();
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
final String value2 = getValue(name + "shadowing" + stereotype.getLabel(false));
|
||||
if (value2 != null) {
|
||||
return value2.equalsIgnoreCase("true");
|
||||
}
|
||||
}
|
||||
|
||||
final String value = getValue(name + "shadowing");
|
||||
if (value == null) {
|
||||
return shadowing();
|
||||
return shadowing(stereotype);
|
||||
}
|
||||
if ("false".equalsIgnoreCase(value)) {
|
||||
return false;
|
||||
|
@ -55,9 +55,9 @@ public class SkinParamColors extends SkinParamDelegator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shadowing() {
|
||||
public boolean shadowing(Stereotype stereotype) {
|
||||
if (colors.getShadowing() == null) {
|
||||
return super.shadowing();
|
||||
return super.shadowing(stereotype);
|
||||
}
|
||||
return colors.getShadowing();
|
||||
}
|
||||
|
@ -111,12 +111,12 @@ public class SkinParamDelegator implements ISkinParam {
|
||||
return skinParam.getColorMapper();
|
||||
}
|
||||
|
||||
public boolean shadowing() {
|
||||
return skinParam.shadowing();
|
||||
public boolean shadowing(Stereotype stereotype) {
|
||||
return skinParam.shadowing(stereotype);
|
||||
}
|
||||
|
||||
public boolean shadowing2(SkinParameter skinParameter) {
|
||||
return skinParam.shadowing2(skinParameter);
|
||||
public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) {
|
||||
return skinParam.shadowing2(stereotype, skinParameter);
|
||||
}
|
||||
|
||||
public PackageStyle getPackageStyle() {
|
||||
|
@ -38,6 +38,8 @@ package net.sourceforge.plantuml;
|
||||
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
|
||||
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapper;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
|
||||
import net.sourceforge.plantuml.ugraphic.sprite.SpriteImage;
|
||||
|
||||
@ -75,4 +77,12 @@ public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple {
|
||||
return 96;
|
||||
}
|
||||
|
||||
public LineBreakStrategy wrapWidth() {
|
||||
return LineBreakStrategy.NONE;
|
||||
}
|
||||
|
||||
public ColorMapper getColorMapper() {
|
||||
return new ColorMapperIdentity();
|
||||
}
|
||||
|
||||
}
|
@ -35,6 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
@ -209,7 +210,9 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
|
||||
throws IOException {
|
||||
|
||||
final HtmlColor hover = getSkinParam().getHoverPathColor();
|
||||
fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget());
|
||||
if (fileFormatOption.getSvgLinkTarget() == null) {
|
||||
fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget());
|
||||
}
|
||||
fileFormatOption = fileFormatOption.withTikzFontDistortion(getSkinParam().getTikzFontDistortion());
|
||||
if (hover != null) {
|
||||
fileFormatOption = fileFormatOption.withHoverColor(StringUtils.getAsHtml(getSkinParam().getColorMapper()
|
||||
@ -254,7 +257,7 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
|
||||
metadata, null, 0, 0, null, false);
|
||||
|
||||
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
|
||||
final BufferedImage im = utils.exportFlashcode(flash);
|
||||
final BufferedImage im = utils.exportFlashcode(flash, Color.BLACK, Color.WHITE);
|
||||
if (im != null) {
|
||||
GraphvizCrash.addDecodeHint(strings);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ public class ActivityDiagram3 extends UmlDiagram {
|
||||
// COMPRESSION
|
||||
TextBlock result = swinlanes;
|
||||
// result = new TextBlockCompressedOnY(CompressionMode.ON_Y, result);
|
||||
// result = new TextBlockCompressedOnXorY(CompressionMode.ON_X, result);
|
||||
result = new TextBlockCompressedOnXorY(CompressionMode.ON_X, result);
|
||||
result = new TextBlockCompressedOnXorY(CompressionMode.ON_Y, result);
|
||||
result = new TextBlockRecentred(result);
|
||||
final ISkinParam skinParam = getSkinParam();
|
||||
|
@ -76,12 +76,11 @@ public class Branch {
|
||||
this.labelPositive = labelPositive;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
public Collection<WeldingPoint> getWeldingPoints() {
|
||||
return ftile.getWeldingPoints();
|
||||
}
|
||||
|
||||
|
||||
public void add(Instruction ins) {
|
||||
list.add(ins);
|
||||
}
|
||||
@ -153,4 +152,14 @@ public class Branch {
|
||||
return list.isOnlySingleStopOrSpot();
|
||||
}
|
||||
|
||||
private LinkRendering special;
|
||||
|
||||
public void setSpecial(LinkRendering link) {
|
||||
this.special = link;
|
||||
}
|
||||
|
||||
public final LinkRendering getSpecial() {
|
||||
return special;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -128,7 +128,8 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
|
||||
if (elseBranch != null) {
|
||||
return false;
|
||||
}
|
||||
this.current.setInlinkRendering(nextLinkRenderer);
|
||||
// this.current.setInlinkRendering(nextLinkRenderer);
|
||||
this.current.setSpecial(nextLinkRenderer);
|
||||
this.current = new Branch(swimlane, whenThen, test, color, inlabel);
|
||||
this.thens.add(current);
|
||||
return true;
|
||||
@ -140,6 +141,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
|
||||
if (elseBranch == null) {
|
||||
this.elseBranch = new Branch(swimlane, Display.NULL, Display.NULL, null, Display.NULL);
|
||||
}
|
||||
this.elseBranch.setSpecial(nextLinkRenderer);
|
||||
this.current.setInlinkRendering(nextLinkRenderer);
|
||||
}
|
||||
|
||||
@ -149,7 +151,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
|
||||
if (branch.getLast().kill() == false) {
|
||||
return false;
|
||||
}
|
||||
if (elseBranch != null && elseBranch.getLast()!=null && elseBranch.getLast().kill() == false) {
|
||||
if (elseBranch != null && elseBranch.getLast() != null && elseBranch.getLast().kill() == false) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -76,7 +76,7 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
|
||||
skinParam, CreoleMode.FULL).createSheet(note);
|
||||
final SheetBlock2 sheetBlock2 = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this,
|
||||
new UStroke(1));
|
||||
this.opale = new Opale(borderColor, noteBackgroundColor, sheetBlock2, skinParam.shadowing(), false);
|
||||
this.opale = new Opale(borderColor, noteBackgroundColor, sheetBlock2, skinParam.shadowing(null), false);
|
||||
|
||||
// this.text = sheetBlock2;
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class FtileFactoryDelegatorAddNote extends FtileFactoryDelegator {
|
||||
if (note.getColors() != null) {
|
||||
skinParam = note.getColors().mute(skinParam);
|
||||
}
|
||||
return new FtileNoteAlone(skinParam.shadowing(), note.getDisplay(), skinParam,
|
||||
return new FtileNoteAlone(skinParam.shadowing(null), note.getDisplay(), skinParam,
|
||||
note.getType() == NoteType.NOTE, swimlane);
|
||||
}
|
||||
return FtileWithNoteOpale.create(ftile, notes, skinParam, true);
|
||||
|
@ -197,7 +197,7 @@ public class FtileGroup extends AbstractFtile {
|
||||
final Dimension2D dimTotal = calculateDimension(stringBounder);
|
||||
|
||||
final SymbolContext symbolContext = new SymbolContext(backColor, borderColor).withShadow(
|
||||
skinParam().shadowing()).withStroke(stroke);
|
||||
skinParam().shadowing(null)).withStroke(stroke);
|
||||
type.asBig(name, inner.skinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null),
|
||||
TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext).drawU(ug);
|
||||
|
||||
|
@ -45,6 +45,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.activitydiagram3.Branch;
|
||||
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
|
||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection;
|
||||
@ -195,8 +196,13 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
final Rainbow rainbowIn = FtileIfWithLinks.getInColor(thens.get(i), arrowColor);
|
||||
final Branch branch = thens.get(i);
|
||||
final Rainbow rainbowOut = branch.getInlinkRenderingColorAndStyle();
|
||||
TextBlock out2 = null;
|
||||
if (branch.getSpecial() != null) {
|
||||
out2 = branch.getSpecial().getDisplay()
|
||||
.create(fcTest, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
||||
}
|
||||
conns.add(result.new ConnectionVerticalIn(diam, ftile, rainbowIn.size() == 0 ? arrowColor : rainbowIn));
|
||||
conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut));
|
||||
conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut, out2));
|
||||
}
|
||||
|
||||
final Rainbow topInColor = topInlinkRendering.getRainbow(arrowColor);
|
||||
@ -206,8 +212,13 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
conns.add(result.new ConnectionHorizontal(diam1, diam2, arrowColor));
|
||||
}
|
||||
conns.add(result.new ConnectionIn(topInColor));
|
||||
TextBlock out2 = null;
|
||||
if (branch2.getSpecial() != null) {
|
||||
out2 = branch2.getSpecial().getDisplay().create(fcTest, HorizontalAlignment.LEFT, ftileFactory.skinParam());
|
||||
}
|
||||
|
||||
conns.add(result.new ConnectionLastElseIn(FtileIfWithLinks.getInColor(branch2, arrowColor)));
|
||||
conns.add(result.new ConnectionLastElseOut(arrowColor));
|
||||
conns.add(result.new ConnectionLastElseOut(arrowColor, out2));
|
||||
final Rainbow horizontalOutColor = afterEndwhile.getRainbow(arrowColor);
|
||||
conns.add(result.new ConnectionHline(horizontalOutColor));
|
||||
// conns.add(result.new ConnectionHline(HtmlColorUtils.BLUE));
|
||||
@ -215,6 +226,13 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
return FtileUtils.addConnection(result, conns);
|
||||
}
|
||||
|
||||
static private TextBlock getSpecial(Branch branch, FontConfiguration fcTest, ISkinParam skinParam) {
|
||||
if (branch.getSpecial() == null) {
|
||||
return null;
|
||||
}
|
||||
return branch.getSpecial().getDisplay().create(fcTest, HorizontalAlignment.LEFT, skinParam);
|
||||
}
|
||||
|
||||
class ConnectionHorizontal extends AbstractConnection {
|
||||
|
||||
private final Rainbow color;
|
||||
@ -310,10 +328,12 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
class ConnectionLastElseOut extends AbstractConnection {
|
||||
|
||||
private final Rainbow arrowColor;
|
||||
private final TextBlock out2;
|
||||
|
||||
public ConnectionLastElseOut(Rainbow arrowColor) {
|
||||
public ConnectionLastElseOut(Rainbow arrowColor, TextBlock out2) {
|
||||
super(tile2, null);
|
||||
this.arrowColor = arrowColor;
|
||||
this.out2 = out2;
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
@ -328,6 +348,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
final Point2D p2 = new Point2D.Double(p1.getX(), totalHeight);
|
||||
|
||||
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
|
||||
snake.setLabel(out2);
|
||||
snake.addPoint(p1);
|
||||
snake.addPoint(p2);
|
||||
ug.draw(snake);
|
||||
@ -386,10 +407,12 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
class ConnectionVerticalOut extends AbstractConnection {
|
||||
|
||||
private final Rainbow color;
|
||||
private final TextBlock out2;
|
||||
|
||||
public ConnectionVerticalOut(Ftile tile, Rainbow color) {
|
||||
public ConnectionVerticalOut(Ftile tile, Rainbow color, TextBlock out2) {
|
||||
super(tile, null);
|
||||
this.color = color;
|
||||
this.out2 = out2;
|
||||
}
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
@ -402,6 +425,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
|
||||
final Point2D p2 = new Point2D.Double(p1.getX(), totalHeight);
|
||||
|
||||
final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown());
|
||||
snake.setLabel(out2);
|
||||
snake.addPoint(p1);
|
||||
snake.addPoint(p2);
|
||||
ug.draw(snake);
|
||||
|
@ -105,7 +105,7 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil {
|
||||
final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT),
|
||||
skinParam, CreoleMode.FULL).createSheet(note);
|
||||
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this, new UStroke(1));
|
||||
opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(), false);
|
||||
opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(null), false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -522,7 +522,12 @@ class FtileWhile extends AbstractFtile {
|
||||
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
|
||||
final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2;
|
||||
final double y1 = Math.max(3 * half, 4 * Diamond.diamondHalfSize);
|
||||
final double x1 = getTranslateForWhile(stringBounder).getDx() - xDeltaBecauseSpecial(stringBounder);
|
||||
final double xWhile = getTranslateForWhile(stringBounder).getDx() - Diamond.diamondHalfSize;
|
||||
final double xDiamond = getTranslateDiamond1(stringBounder).getDx();
|
||||
// final double x1 = xWhile - xDeltaBecauseSpecial(stringBounder);
|
||||
final double x1 = Math.min(xWhile, xDiamond) - xDeltaBecauseSpecial(stringBounder);
|
||||
// final double x1 = getTranslateForWhile(stringBounder).getDx() - dimDiamond1.getWidth()
|
||||
// - xDeltaBecauseSpecial(stringBounder);
|
||||
return new UTranslate(x1, y1);
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil {
|
||||
skinParam, CreoleMode.FULL).createSheet(note.getDisplay());
|
||||
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()),
|
||||
this, new UStroke(1));
|
||||
opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(), withLink);
|
||||
opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(null), withLink);
|
||||
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ public class FtileWithNotes extends AbstractFtile {
|
||||
}
|
||||
}, new UStroke());
|
||||
|
||||
final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet2, skinParam.shadowing(), false);
|
||||
final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet2, skinParam.shadowing(null), false);
|
||||
final TextBlock opaleMarged = TextBlockUtils.withMargin(opale, 10, 10);
|
||||
if (note.getNotePosition() == NotePosition.LEFT) {
|
||||
if (left == null) {
|
||||
|
@ -92,7 +92,7 @@ public class FtileBlackBlock extends AbstractFtile {
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
final URectangle rect = new URectangle(width, height, 5, 5);
|
||||
if (skinParam().shadowing()) {
|
||||
if (skinParam().shadowing(null)) {
|
||||
rect.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeColor(colorBar)).apply(new UChangeBackColor(colorBar)).draw(rect);
|
||||
|
@ -140,7 +140,7 @@ public class FtileBox extends AbstractFtile {
|
||||
final Dimension2D dimTotal = calculateDimension(ug.getStringBounder());
|
||||
final double widthTotal = dimTotal.getWidth();
|
||||
final double heightTotal = dimTotal.getHeight();
|
||||
final UDrawable rect = style.getUDrawable(widthTotal, heightTotal, skinParam().shadowing());
|
||||
final UDrawable rect = style.getUDrawable(widthTotal, heightTotal, skinParam().shadowing(null));
|
||||
|
||||
final HtmlColor borderColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBorder, null);
|
||||
final HtmlColor backColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBackground, null);
|
||||
|
@ -95,7 +95,7 @@ public class FtileCircleEnd extends AbstractFtile {
|
||||
yTheoricalPosition = Math.round(yTheoricalPosition);
|
||||
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
if (skinParam().shadowing()) {
|
||||
if (skinParam().shadowing(null)) {
|
||||
circle.setDeltaShadow(3);
|
||||
}
|
||||
ug = ug.apply(new UChangeColor(backColor));
|
||||
|
@ -100,7 +100,7 @@ public class FtileCircleSpot extends AbstractFtile {
|
||||
final HtmlColor backColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBackground, null);
|
||||
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
if (skinParam().shadowing()) {
|
||||
if (skinParam().shadowing(null)) {
|
||||
circle.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(getThickness())
|
||||
|
@ -86,7 +86,7 @@ public class FtileCircleStart extends AbstractFtile {
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
if (skinParam().shadowing()) {
|
||||
if (skinParam().shadowing(null)) {
|
||||
circle.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor)).draw(circle);
|
||||
|
@ -92,7 +92,7 @@ public class FtileCircleStop extends AbstractFtile {
|
||||
yTheoricalPosition = Math.round(yTheoricalPosition);
|
||||
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
if (skinParam().shadowing()) {
|
||||
if (skinParam().shadowing(null)) {
|
||||
circle.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeColor(backColor)).apply(new UChangeBackColor(null))
|
||||
@ -100,7 +100,7 @@ public class FtileCircleStop extends AbstractFtile {
|
||||
|
||||
final double delta = 4;
|
||||
final UEllipse circleSmall = new UEllipse(SIZE - delta * 2, SIZE - delta * 2);
|
||||
if (skinParam().shadowing()) {
|
||||
if (skinParam().shadowing(null)) {
|
||||
circleSmall.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor))
|
||||
|
@ -130,7 +130,7 @@ public class FtileDiamond extends AbstractFtile {
|
||||
final double suppY1 = north.calculateDimension(ug.getStringBounder()).getHeight();
|
||||
ug = ug.apply(new UTranslate(0, suppY1));
|
||||
ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor))
|
||||
.draw(Diamond.asPolygon(skinParam().shadowing()));
|
||||
.draw(Diamond.asPolygon(skinParam().shadowing(null)));
|
||||
// final Dimension2D dimNorth = north.calculateDimension(ug.getStringBounder());
|
||||
north.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 1.5, -suppY1)));
|
||||
|
||||
|
@ -114,7 +114,7 @@ public class FtileDiamondFoo1 extends AbstractFtile {
|
||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
|
||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
||||
ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
|
||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
|
||||
|
@ -131,7 +131,7 @@ public class FtileDiamondInside extends AbstractFtile {
|
||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
||||
ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
ug.draw(Diamond.asPolygon(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
|
||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
|
@ -120,7 +120,7 @@ public class FtileDiamondInside2 extends AbstractFtile {
|
||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
||||
ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
ug.draw(Diamond.asPolygon(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
|
||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
|
@ -122,7 +122,7 @@ public class FtileDiamondInside3 extends AbstractFtile implements FtileOverpassi
|
||||
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
|
||||
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
|
||||
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
|
||||
ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
ug.draw(Diamond.asPolygon(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
|
||||
|
||||
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
|
||||
|
@ -51,7 +51,7 @@ public class CommandAllowMixing extends SingleLineCommand2<ClassDiagram> {
|
||||
private static RegexConcat getRegexConcat() {
|
||||
|
||||
return new RegexConcat(new RegexLeaf("^"), //
|
||||
new RegexLeaf("allow_mixing"), //
|
||||
new RegexLeaf("allow_?mixing"), //
|
||||
new RegexLeaf("$"));
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ public class CommandCreateElementFull2 extends SingleLineCommand2<ClassDiagram>
|
||||
protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) {
|
||||
if (mode == Mode.NORMAL_KEYWORD && diagram.isAllowMixing() == false) {
|
||||
return CommandExecutionResult
|
||||
.error("Use 'allow_mixing' if you want to mix classes and other UML elements.");
|
||||
.error("Use 'allowmixing' if you want to mix classes and other UML elements.");
|
||||
}
|
||||
String codeRaw = arg.getLazzy("CODE", 0);
|
||||
final String displayRaw = arg.getLazzy("DISPLAY", 0);
|
||||
|
@ -50,7 +50,7 @@ public class CommandHideShow2 extends SingleLineCommand2<CucaDiagram> {
|
||||
|
||||
static RegexConcat getRegexConcat() {
|
||||
return new RegexConcat(new RegexLeaf("^"), //
|
||||
new RegexLeaf("COMMAND", "(hide|show)"), //
|
||||
new RegexLeaf("COMMAND", "(hide|hide-class|show|show-class)"), //
|
||||
new RegexLeaf("[%s]+"), //
|
||||
new RegexLeaf("WHAT", "(.+)"), //
|
||||
new RegexLeaf("$"));
|
||||
@ -59,7 +59,8 @@ public class CommandHideShow2 extends SingleLineCommand2<CucaDiagram> {
|
||||
@Override
|
||||
protected CommandExecutionResult executeArg(CucaDiagram diagram, RegexResult arg) {
|
||||
|
||||
final boolean show = arg.get("COMMAND", 0).equalsIgnoreCase("show");
|
||||
final char tmp = arg.get("COMMAND", 0).charAt(0);
|
||||
final boolean show = tmp == 's' || tmp == 'S';
|
||||
final String what = arg.get("WHAT", 0).trim();
|
||||
diagram.hideOrShow2(what, show);
|
||||
return CommandExecutionResult.ok();
|
||||
|
@ -68,9 +68,6 @@ final public class UmlSource {
|
||||
final private List<String> source;
|
||||
final private List<CharSequence2> source2;
|
||||
|
||||
// final private int startLine;
|
||||
// final private LineLocation startLocation;
|
||||
|
||||
/**
|
||||
* Build the source from a text.
|
||||
*
|
||||
@ -78,11 +75,8 @@ final public class UmlSource {
|
||||
* the source of the diagram
|
||||
* @param checkEndingBackslash
|
||||
* <code>true</code> if an ending backslash means that a line has to be collapsed with the following one.
|
||||
* @param startLine
|
||||
*/
|
||||
public UmlSource(List<CharSequence2> source, boolean checkEndingBackslash, int startLine) {
|
||||
// this.startLocation = source.get(0).getLocation();
|
||||
// this.startLine = startLine;
|
||||
public UmlSource(List<CharSequence2> source, boolean checkEndingBackslash) {
|
||||
final List<String> tmp = new ArrayList<String>();
|
||||
final List<CharSequence2> tmp2 = new ArrayList<CharSequence2>();
|
||||
|
||||
|
@ -127,7 +127,7 @@ class AtomEmbededSystem implements Atom {
|
||||
// }
|
||||
//
|
||||
private Diagram getSystem() throws IOException, InterruptedException {
|
||||
final BlockUml blockUml = new BlockUml(lines2, 0, Defines.createEmpty());
|
||||
final BlockUml blockUml = new BlockUml(lines2, Defines.createEmpty());
|
||||
return blockUml.getDiagram();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.creole;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
@ -74,7 +75,7 @@ public class AtomImg implements Atom {
|
||||
|
||||
public static Atom createQrcode(String flash, double scale) {
|
||||
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
|
||||
BufferedImage im = utils.exportFlashcode(flash);
|
||||
BufferedImage im = utils.exportFlashcode(flash, Color.BLACK, Color.WHITE);
|
||||
if (im == null) {
|
||||
im = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.math.ScientificEquationSafe;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapper;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UImage;
|
||||
import net.sourceforge.plantuml.ugraphic.UImageSvg;
|
||||
@ -55,9 +56,12 @@ public class AtomMath implements Atom {
|
||||
private final ScientificEquationSafe math;
|
||||
private final HtmlColor foreground;
|
||||
private final HtmlColor background;
|
||||
private final ColorMapper colorMapper;
|
||||
|
||||
public AtomMath(ScientificEquationSafe math, HtmlColor foreground, HtmlColor background, double scale) {
|
||||
public AtomMath(ScientificEquationSafe math, HtmlColor foreground, HtmlColor background, double scale,
|
||||
ColorMapper colorMapper) {
|
||||
this.math = math;
|
||||
this.colorMapper = colorMapper;
|
||||
this.foreground = foreground;
|
||||
this.background = background;
|
||||
this.scale = scale;
|
||||
@ -84,10 +88,10 @@ public class AtomMath implements Atom {
|
||||
public void drawU(UGraphic ug) {
|
||||
final boolean isSvg = ug.matchesProperty("SVG");
|
||||
final Color back;
|
||||
if (isSvg && background == null) {
|
||||
if (background == null) {
|
||||
back = null;
|
||||
} else {
|
||||
back = getColor(background == null ? ug.getParam().getBackcolor() : background, Color.WHITE);
|
||||
back = getColor(background, Color.WHITE);
|
||||
}
|
||||
final Color fore = getColor(foreground, Color.BLACK);
|
||||
final double dpiFactor = ug.dpiFactor();
|
||||
@ -95,13 +99,15 @@ public class AtomMath implements Atom {
|
||||
final SvgString svg = math.getSvg(scale, fore, back);
|
||||
ug.draw(new UImageSvg(svg));
|
||||
} else {
|
||||
ug.draw(new UImage(math.getImage(scale * dpiFactor, fore, back)));
|
||||
final UImage image = new UImage(math.getImage(scale * dpiFactor, fore, back), math.getFormula());
|
||||
ug.draw(image);
|
||||
}
|
||||
}
|
||||
|
||||
private Color getColor(HtmlColor color, Color defaultValue) {
|
||||
if (color instanceof HtmlColorSimple) {
|
||||
return ((HtmlColorSimple) color).getColor999();
|
||||
return colorMapper.getMappedColor(color);
|
||||
// return ((HtmlColorSimple) color).getColor999();
|
||||
}
|
||||
return defaultValue;
|
||||
|
||||
|
@ -196,7 +196,8 @@ public class StripeSimple implements Stripe {
|
||||
}
|
||||
|
||||
public void addMath(ScientificEquationSafe math, double scale) {
|
||||
atoms.add(new AtomMath(math, fontConfiguration.getColor(), fontConfiguration.getExtendedColor(), scale));
|
||||
atoms.add(new AtomMath(math, fontConfiguration.getColor(), fontConfiguration.getExtendedColor(), scale,
|
||||
skinParam.getColorMapper()));
|
||||
}
|
||||
|
||||
private void modifyStripe(String line) {
|
||||
|
@ -70,13 +70,12 @@ public class Dedication {
|
||||
return new ByteArrayInputStream(baos.toByteArray());
|
||||
}
|
||||
|
||||
public BufferedImage getBufferedImage(String keepLetter) {
|
||||
public static BufferedImage getBufferedImage(InputStream is) {
|
||||
try {
|
||||
final Class<?> clVP8Decoder = Class.forName("net.sourceforge.plantuml.webp.VP8Decoder");
|
||||
final Object vp8Decoder = clVP8Decoder.newInstance();
|
||||
// final VP8Decoder vp8Decoder = new VP8Decoder();
|
||||
final Method decodeFrame = clVP8Decoder.getMethod("decodeFrame", ImageInputStream.class);
|
||||
final InputStream is = getInputStream(keepLetter);
|
||||
final ImageInputStream iis = ImageIO.createImageInputStream(is);
|
||||
decodeFrame.invoke(vp8Decoder, iis);
|
||||
// vp8Decoder.decodeFrame(iis);
|
||||
@ -91,4 +90,14 @@ public class Dedication {
|
||||
}
|
||||
}
|
||||
|
||||
public BufferedImage getBufferedImage(String keepLetter) {
|
||||
try {
|
||||
final InputStream is = getInputStream(keepLetter);
|
||||
return getBufferedImage(is);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class EntityImageRequirement extends AbstractEntityImage {
|
||||
final public void drawU(UGraphic ug) {
|
||||
final StringBounder stringBounder = ug.getStringBounder();
|
||||
final TextBlockInEllipse ellipse = new TextBlockInEllipse(desc, stringBounder);
|
||||
if (getSkinParam().shadowing2(SkinParameter.USECASE)) {
|
||||
if (getSkinParam().shadowing2(getStereo(), SkinParameter.USECASE)) {
|
||||
ellipse.setDeltaShadow(3);
|
||||
}
|
||||
|
||||
|
@ -68,20 +68,21 @@ import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
|
||||
public class PSystemDonors extends AbstractPSystem {
|
||||
|
||||
public static final String DONORS = "6-e702mEU9F9PHN1hXQZLurLW-3nVtlrrwZeRZDYIgOGkdS8eIVXBunYGbPF5d9zqTbiGjQCIJSsPpZF"
|
||||
+ "A8e5KEDPF_rXcvjTUFPkr2_5d-Bb2uKfAihW7jk4J2TYN0HFczUtrCbQaWS9fxkw5F0d590ld4unVmxG"
|
||||
+ "btJi7RlLOhTFYHKwl0ze0boDFjOibEWOhUzKgS55ft-TKrAJLZ6kIQJOQiSMsEI4XsnDicFoHCRVT-e9"
|
||||
+ "rBIMfY4zLq2npoaINIxxMXq6K3v10eSNYrYmmSoXv8FRGAlNHWnhimWQqgkeZGtc37b2m-205lRbYpB9"
|
||||
+ "yHQoiihGviNY3XJO_4q0aEcdh2OnMnuCAD0YMbGrMABpuwQxC0_3KlwSQ3WB5XOMb0BLOEG_w0QVtfOy"
|
||||
+ "nRdcNb5Bo5iIhxGnrBUKLtWsBVhQSqcWN5P7oNJn_b5rBQJIyXpdlSO6kMl8oDakMevNzX3U_imbONvA"
|
||||
+ "0VmmT6nCL18_NxQ1XJG8TqizaKVcnCbTYu3Pa5Asy5DCMSs_eqjCLXFBsy3YFkg_pZTb1Lh8IkGsz8PM"
|
||||
+ "88zspaWf3VNtjxoQEh-BM1Cmc_SbwfFPD2J-vswfPbGSeBKXlA7BWg8mIwfACO48N6RwD-GcG7gWUfay"
|
||||
+ "YfVbjyIrFo1ugvA1o6r6f7ygNgYx74AOZgLEbcW1J7OfPUF5weKU8ZenkemepqYRkwwJISsoHSV4RL87"
|
||||
+ "srM3COYZEasvqNsQ2zpTCA3cpVv1snkiOjpB2UVwlLjfMWKmbtktd2ojPp1Ghp2dXQNFY78Oqaxfxkee"
|
||||
+ "aUMnnQ4kiOVRoC935_vnJsDHrutxRzu_7J8VVdwbAQcN63vfqEmjGTPd-qII9n3s56z3E3BkW-CZoO6Q"
|
||||
+ "7F5YjfpX6DW2m6uihjtra9XRGrNM8pkjQGbJaw_kGYNuOJw1kU8MaImsbZiXphWjYkmJyqwCUjNxMPAd"
|
||||
+ "1HIDMGLFQQ6CEIGfmfO5PCXSbPvEcy3sJHiMv2ggC_6eGU5Z5QrQRF1W2d7_mbreQa3MMQcGIvia1l3h"
|
||||
+ "pw_5SzTraF5RBQqY3f3E9I642dUwxPKWarBf7_yiyzSFivDP4jBlTNue0SpBQhfNr955-XS0";
|
||||
public static final String DONORS = "6nC809m7nctnXhJewjSHZX8nZQRAWw08ArguWCYs4bz-N7zS5gS5n0MmUhAGwulEPXEoPaowUSvodb4K"
|
||||
+ "owS1wwKEszpi1x5KjlyoSRkk0xPKSoN4WrWl_Vbxzy1H88lRb4SO1pRVmiRSDeVT4vKDkjbzWHPG_Mtq"
|
||||
+ "icMVChT_HZoYHrz2DcMtRQS98eNV77TGoLAC_OWKNTtO0dIyeuve7pJ7-8Bwrt_K8hLepQOXxdi0iOqK"
|
||||
+ "SitRFcQFW-oVm429GgDEq82P0wc7_2A3lpyX0nvgrM57E8ffhBFwpXC9I9YWGWh-aIVLSmi9Zp8uK6XS"
|
||||
+ "7GZe_1X60FQgg1BEjcu3ShHWYwm60TsuNd1Bp1VJKrmU6YuZ9pGiQ0LKeSX5q0M-IfkvHBcFNM737zoT"
|
||||
+ "yPRrGLvbu97qPA6ljUuCcE_b4vceRc_gMmlfN7ATurzd0pnhoCpPRaQBHpR7RFsOIw7vGW7oIw5JOy1Y"
|
||||
+ "FB-uRXOI81XBwe8ovi3nwnG1ayvIjV2BMF8QzuykirXLn6yjMAYN-El6feH32wn4N0tuXfR3atM-KBnh"
|
||||
+ "g7yVSZLrV0kkSOYvjq3FdZRdiz_BRcbcb1wWrI4qGbT6c2lcZYfJB8O835FwFU0cIUwa-jlaKNrRFiJU"
|
||||
+ "zYSXl7dX0IbjXj3VLLVOYXnMGHP4EjZ50Z1P9Tg5Gkj6tE5HLtGHKEwXC7VzTPFkOTF6n7NGEwvb2sDG"
|
||||
+ "NwOJv1Tk5tD9Asdea6KpTrXxWr6ACxXnNZ_sifnL0EkUtasBKBp8WB-7ESDLUWt9ZoDjYLjHXyaijmNF"
|
||||
+ "wcBFuNRovw4JVpZcPr776ySVFFuSCXRLz_QffMuHvgx1yBSrP5bx1egom6AuRXkenepxWFCPoP5AZb2e"
|
||||
+ "XJCT2ZP9GczCNZiA5kNMJgo-Rjc-D2r1zfwhkq1tyiFo84qh-SGy2Zlx7SCpb4UH_UAyCxDkwlkGOcS1"
|
||||
+ "UMEOu2uLp352YchOd466p3dqj5idd_dI5WlM4TKcFEnG-9Y9bemRA6tbXXgYUzoWCf6gNDM9InWJ8O3l"
|
||||
+ "EFq27ZNh86UBbbQC0xYb90IeWfBR_c5iL6YxQnhh4hrksxQFPUEl_ynL5Zd5_1Ah1aXr49N_OWXl9XO5"
|
||||
+ "U71t-5xOK1y0DZB3EWm0";
|
||||
|
||||
@Override
|
||||
final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed)
|
||||
|
@ -36,15 +36,11 @@
|
||||
package net.sourceforge.plantuml.eggs;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import net.sourceforge.plantuml.AbstractPSystem;
|
||||
import net.sourceforge.plantuml.FileFormatOption;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
@ -54,6 +50,7 @@ import net.sourceforge.plantuml.graphic.GraphicStrings;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
||||
import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
|
||||
public class PSystemAppleTwo extends AbstractPSystem {
|
||||
|
||||
@ -61,12 +58,10 @@ public class PSystemAppleTwo extends AbstractPSystem {
|
||||
private final BufferedImage image;
|
||||
|
||||
public PSystemAppleTwo() throws IOException {
|
||||
strings.add(" <b><size:18>Apple //e for ever ! ");
|
||||
strings.add(" <b><size:18>Apple //e for ever ! ");
|
||||
strings.add(" ");
|
||||
|
||||
final InputStream is = new ByteArrayInputStream(imm);
|
||||
image = ImageIO.read(is);
|
||||
is.close();
|
||||
image = PSystemVersion.getApple2Image();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -92,641 +87,4 @@ public class PSystemAppleTwo extends AbstractPSystem {
|
||||
return new DiagramDescription("(Apple //e)");
|
||||
}
|
||||
|
||||
private static final byte imm[] = new byte[] { (byte) 255, (byte) 216, (byte) 255, (byte) 224, (byte) 0, (byte) 16,
|
||||
(byte) 74, (byte) 70, (byte) 73, (byte) 70, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 96,
|
||||
(byte) 0, (byte) 96, (byte) 0, (byte) 0, (byte) 255, (byte) 219, (byte) 0, (byte) 67, (byte) 0, (byte) 10,
|
||||
(byte) 7, (byte) 7, (byte) 8, (byte) 7, (byte) 6, (byte) 10, (byte) 8, (byte) 8, (byte) 8, (byte) 11,
|
||||
(byte) 10, (byte) 10, (byte) 11, (byte) 14, (byte) 24, (byte) 16, (byte) 14, (byte) 13, (byte) 13,
|
||||
(byte) 14, (byte) 29, (byte) 21, (byte) 22, (byte) 17, (byte) 24, (byte) 35, (byte) 31, (byte) 37,
|
||||
(byte) 36, (byte) 34, (byte) 31, (byte) 34, (byte) 33, (byte) 38, (byte) 43, (byte) 55, (byte) 47,
|
||||
(byte) 38, (byte) 41, (byte) 52, (byte) 41, (byte) 33, (byte) 34, (byte) 48, (byte) 65, (byte) 49,
|
||||
(byte) 52, (byte) 57, (byte) 59, (byte) 62, (byte) 62, (byte) 62, (byte) 37, (byte) 46, (byte) 68,
|
||||
(byte) 73, (byte) 67, (byte) 60, (byte) 72, (byte) 55, (byte) 61, (byte) 62, (byte) 59, (byte) 255,
|
||||
(byte) 219, (byte) 0, (byte) 67, (byte) 1, (byte) 10, (byte) 11, (byte) 11, (byte) 14, (byte) 13,
|
||||
(byte) 14, (byte) 28, (byte) 16, (byte) 16, (byte) 28, (byte) 59, (byte) 40, (byte) 34, (byte) 40,
|
||||
(byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
|
||||
(byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
|
||||
(byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
|
||||
(byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
|
||||
(byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
|
||||
(byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 255, (byte) 192, (byte) 0, (byte) 17,
|
||||
(byte) 8, (byte) 0, (byte) 136, (byte) 0, (byte) 200, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2,
|
||||
(byte) 17, (byte) 1, (byte) 3, (byte) 17, (byte) 1, (byte) 255, (byte) 196, (byte) 0, (byte) 31, (byte) 0,
|
||||
(byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0,
|
||||
(byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3,
|
||||
(byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) 255, (byte) 196,
|
||||
(byte) 0, (byte) 181, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4,
|
||||
(byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1,
|
||||
(byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65,
|
||||
(byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50,
|
||||
(byte) 129, (byte) 145, (byte) 161, (byte) 8, (byte) 35, (byte) 66, (byte) 177, (byte) 193, (byte) 21,
|
||||
(byte) 82, (byte) 209, (byte) 240, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) 130, (byte) 9,
|
||||
(byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39,
|
||||
(byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57,
|
||||
(byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74,
|
||||
(byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99,
|
||||
(byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116,
|
||||
(byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 131, (byte) 132, (byte) 133,
|
||||
(byte) 134, (byte) 135, (byte) 136, (byte) 137, (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149,
|
||||
(byte) 150, (byte) 151, (byte) 152, (byte) 153, (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165,
|
||||
(byte) 166, (byte) 167, (byte) 168, (byte) 169, (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181,
|
||||
(byte) 182, (byte) 183, (byte) 184, (byte) 185, (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197,
|
||||
(byte) 198, (byte) 199, (byte) 200, (byte) 201, (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213,
|
||||
(byte) 214, (byte) 215, (byte) 216, (byte) 217, (byte) 218, (byte) 225, (byte) 226, (byte) 227, (byte) 228,
|
||||
(byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233, (byte) 234, (byte) 241, (byte) 242, (byte) 243,
|
||||
(byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249, (byte) 250, (byte) 255, (byte) 196,
|
||||
(byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1,
|
||||
(byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0,
|
||||
(byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10,
|
||||
(byte) 11, (byte) 255, (byte) 196, (byte) 0, (byte) 181, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2,
|
||||
(byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1,
|
||||
(byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33,
|
||||
(byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19,
|
||||
(byte) 34, (byte) 50, (byte) 129, (byte) 8, (byte) 20, (byte) 66, (byte) 145, (byte) 161, (byte) 177,
|
||||
(byte) 193, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) 240, (byte) 21, (byte) 98, (byte) 114,
|
||||
(byte) 209, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) 225, (byte) 37, (byte) 241, (byte) 23,
|
||||
(byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53,
|
||||
(byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70,
|
||||
(byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87,
|
||||
(byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104,
|
||||
(byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121,
|
||||
(byte) 122, (byte) 130, (byte) 131, (byte) 132, (byte) 133, (byte) 134, (byte) 135, (byte) 136, (byte) 137,
|
||||
(byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149, (byte) 150, (byte) 151, (byte) 152, (byte) 153,
|
||||
(byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166, (byte) 167, (byte) 168, (byte) 169,
|
||||
(byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181, (byte) 182, (byte) 183, (byte) 184, (byte) 185,
|
||||
(byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197, (byte) 198, (byte) 199, (byte) 200, (byte) 201,
|
||||
(byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213, (byte) 214, (byte) 215, (byte) 216, (byte) 217,
|
||||
(byte) 218, (byte) 226, (byte) 227, (byte) 228, (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233,
|
||||
(byte) 234, (byte) 242, (byte) 243, (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249,
|
||||
(byte) 250, (byte) 255, (byte) 218, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17,
|
||||
(byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) 246, (byte) 106, (byte) 40, (byte) 162,
|
||||
(byte) 128, (byte) 10, (byte) 40, (byte) 162, (byte) 128, (byte) 43, (byte) 221, (byte) 92, (byte) 253,
|
||||
(byte) 153, (byte) 3, (byte) 121, (byte) 79, (byte) 41, (byte) 39, (byte) 133, (byte) 66, (byte) 185,
|
||||
(byte) 253, (byte) 72, (byte) 21, (byte) 145, (byte) 115, (byte) 173, (byte) 106, (byte) 157, (byte) 45,
|
||||
(byte) 180, (byte) 146, (byte) 191, (byte) 237, (byte) 73, (byte) 42, (byte) 31, (byte) 208, (byte) 55,
|
||||
(byte) 245, (byte) 173, (byte) 59, (byte) 225, (byte) 157, (byte) 159, (byte) 83, (byte) 92, (byte) 61,
|
||||
(byte) 182, (byte) 181, (byte) 169, (byte) 181, (byte) 149, (byte) 188, (byte) 243, (byte) 223, (byte) 91,
|
||||
(byte) 71, (byte) 44, (byte) 209, (byte) 171, (byte) 149, (byte) 54, (byte) 228, (byte) 129, (byte) 144,
|
||||
(byte) 9, (byte) 254, (byte) 44, (byte) 247, (byte) 245, (byte) 172, (byte) 165, (byte) 39, (byte) 114,
|
||||
(byte) 210, (byte) 69, (byte) 251, (byte) 155, (byte) 239, (byte) 19, (byte) 78, (byte) 113, (byte) 135,
|
||||
(byte) 133, (byte) 79, (byte) 240, (byte) 196, (byte) 168, (byte) 63, (byte) 92, (byte) 147, (byte) 250,
|
||||
(byte) 213, (byte) 80, (byte) 254, (byte) 34, (byte) 67, (byte) 129, (byte) 53, (byte) 222, (byte) 115,
|
||||
(byte) 221, (byte) 203, (byte) 127, (byte) 141, (byte) 52, (byte) 107, (byte) 183, (byte) 185, (byte) 192,
|
||||
(byte) 213, (byte) 180, (byte) 188, (byte) 142, (byte) 205, (byte) 106, (byte) 223, (byte) 252, (byte) 120,
|
||||
(byte) 84, (byte) 131, (byte) 90, (byte) 212, (byte) 63, (byte) 232, (byte) 41, (byte) 164, (byte) 127,
|
||||
(byte) 224, (byte) 51, (byte) 127, (byte) 241, (byte) 250, (byte) 139, (byte) 190, (byte) 229, (byte) 104,
|
||||
(byte) 39, (byte) 159, (byte) 226, (byte) 64, (byte) 120, (byte) 158, (byte) 232, (byte) 255, (byte) 0,
|
||||
(byte) 192, (byte) 88, (byte) 255, (byte) 0, (byte) 74, (byte) 67, (byte) 121, (byte) 226, (byte) 96,
|
||||
(byte) 121, (byte) 158, (byte) 243, (byte) 131, (byte) 198, (byte) 32, (byte) 110, (byte) 127, (byte) 241,
|
||||
(byte) 202, (byte) 144, (byte) 107, (byte) 119, (byte) 223, (byte) 244, (byte) 16, (byte) 210, (byte) 88,
|
||||
(byte) 250, (byte) 8, (byte) 136, (byte) 255, (byte) 0, (byte) 218, (byte) 198, (byte) 158, (byte) 53,
|
||||
(byte) 203, (byte) 220, (byte) 224, (byte) 73, (byte) 167, (byte) 183, (byte) 209, (byte) 138, (byte) 255,
|
||||
(byte) 0, (byte) 83, (byte) 74, (byte) 236, (byte) 44, (byte) 66, (byte) 53, (byte) 63, (byte) 18,
|
||||
(byte) 131, (byte) 180, (byte) 205, (byte) 121, (byte) 248, (byte) 218, (byte) 31, (byte) 254, (byte) 34,
|
||||
(byte) 156, (byte) 53, (byte) 143, (byte) 16, (byte) 142, (byte) 179, (byte) 207, (byte) 199, (byte) 247,
|
||||
(byte) 173, (byte) 64, (byte) 254, (byte) 105, (byte) 86, (byte) 6, (byte) 181, (byte) 169, (byte) 127,
|
||||
(byte) 207, (byte) 173, (byte) 131, (byte) 255, (byte) 0, (byte) 219, (byte) 211, (byte) 47, (byte) 254,
|
||||
(byte) 211, (byte) 52, (byte) 241, (byte) 172, (byte) 234, (byte) 196, (byte) 241, (byte) 166, (byte) 88,
|
||||
(byte) 48, (byte) 246, (byte) 191, (byte) 147, (byte) 255, (byte) 0, (byte) 140, (byte) 83, (byte) 187,
|
||||
(byte) 2, (byte) 161, (byte) 215, (byte) 181, (byte) 213, (byte) 25, (byte) 55, (byte) 79, (byte) 248,
|
||||
(byte) 194, (byte) 131, (byte) 255, (byte) 0, (byte) 101, (byte) 163, (byte) 254, (byte) 18, (byte) 61,
|
||||
(byte) 100, (byte) 114, (byte) 110, (byte) 112, (byte) 61, (byte) 227, (byte) 65, (byte) 253, (byte) 42,
|
||||
(byte) 231, (byte) 246, (byte) 206, (byte) 168, (byte) 57, (byte) 109, (byte) 46, (byte) 215, (byte) 254,
|
||||
(byte) 3, (byte) 122, (byte) 231, (byte) 255, (byte) 0, (byte) 104, (byte) 138, (byte) 81, (byte) 175,
|
||||
(byte) 95, (byte) 15, (byte) 189, (byte) 166, (byte) 1, (byte) 254, (byte) 237, (byte) 206, (byte) 127,
|
||||
(byte) 154, (byte) 138, (byte) 46, (byte) 251, (byte) 133, (byte) 151, (byte) 98, (byte) 160, (byte) 241,
|
||||
(byte) 54, (byte) 172, (byte) 188, (byte) 153, (byte) 227, (byte) 56, (byte) 245, (byte) 9, (byte) 82,
|
||||
(byte) 47, (byte) 136, (byte) 181, (byte) 210, (byte) 55, (byte) 36, (byte) 45, (byte) 34, (byte) 255,
|
||||
(byte) 0, (byte) 121, (byte) 45, (byte) 139, (byte) 143, (byte) 204, (byte) 86, (byte) 134, (byte) 153,
|
||||
(byte) 172, (byte) 46, (byte) 177, (byte) 101, (byte) 117, (byte) 34, (byte) 197, (byte) 36, (byte) 45,
|
||||
(byte) 4, (byte) 175, (byte) 4, (byte) 138, (byte) 236, (byte) 15, (byte) 204, (byte) 160, (byte) 19,
|
||||
(byte) 211, (byte) 168, (byte) 230, (byte) 132, (byte) 211, (byte) 165, (byte) 142, (byte) 118, (byte) 104,
|
||||
(byte) 239, (byte) 25, (byte) 119, (byte) 73, (byte) 189, (byte) 129, (byte) 81, (byte) 202, (byte) 231,
|
||||
(byte) 59, (byte) 126, (byte) 152, (byte) 226, (byte) 142, (byte) 103, (byte) 220, (byte) 44, (byte) 140,
|
||||
(byte) 209, (byte) 226, (byte) 173, (byte) 88, (byte) 16, (byte) 79, (byte) 144, (byte) 65, (byte) 231,
|
||||
(byte) 5, (byte) 63, (byte) 250, (byte) 249, (byte) 167, (byte) 127, (byte) 194, (byte) 95, (byte) 169,
|
||||
(byte) 47, (byte) 38, (byte) 43, (byte) 102, (byte) 3, (byte) 146, (byte) 54, (byte) 48, (byte) 255,
|
||||
(byte) 0, (byte) 217, (byte) 171, (byte) 50, (byte) 225, (byte) 118, (byte) 201, (byte) 34, (byte) 246,
|
||||
(byte) 87, (byte) 35, (byte) 167, (byte) 185, (byte) 170, (byte) 237, (byte) 83, (byte) 205, (byte) 46,
|
||||
(byte) 227, (byte) 178, (byte) 61, (byte) 58, (byte) 55, (byte) 89, (byte) 35, (byte) 87, (byte) 83,
|
||||
(byte) 149, (byte) 97, (byte) 144, (byte) 125, (byte) 69, (byte) 62, (byte) 178, (byte) 252, (byte) 61,
|
||||
(byte) 113, (byte) 246, (byte) 141, (byte) 14, (byte) 217, (byte) 179, (byte) 146, (byte) 139, (byte) 229,
|
||||
(byte) 159, (byte) 248, (byte) 9, (byte) 199, (byte) 242, (byte) 197, (byte) 106, (byte) 87, (byte) 74,
|
||||
(byte) 119, (byte) 70, (byte) 33, (byte) 69, (byte) 20, (byte) 83, (byte) 0, (byte) 162, (byte) 138,
|
||||
(byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40,
|
||||
(byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 2, (byte) 181, (byte) 224, (byte) 253, (byte) 218,
|
||||
(byte) 253, (byte) 107, (byte) 202, (byte) 245, (byte) 112, (byte) 97, (byte) 142, (byte) 201, (byte) 84,
|
||||
(byte) 227, (byte) 98, (byte) 178, (byte) 140, (byte) 123, (byte) 96, (byte) 127, (byte) 74, (byte) 245,
|
||||
(byte) 91, (byte) 177, (byte) 152, (byte) 135, (byte) 177, (byte) 175, (byte) 46, (byte) 241, (byte) 26,
|
||||
(byte) 20, (byte) 158, (byte) 37, (byte) 56, (byte) 225, (byte) 229, (byte) 0, (byte) 99, (byte) 253,
|
||||
(byte) 161, (byte) 88, (byte) 207, (byte) 114, (byte) 227, (byte) 177, (byte) 199, (byte) 94, (byte) 11,
|
||||
(byte) 155, (byte) 251, (byte) 249, (byte) 101, (byte) 121, (byte) 164, (byte) 42, (byte) 174, (byte) 81,
|
||||
(byte) 20, (byte) 49, (byte) 194, (byte) 237, (byte) 249, (byte) 78, (byte) 7, (byte) 185, (byte) 6,
|
||||
(byte) 180, (byte) 52, (byte) 125, (byte) 58, (byte) 53, (byte) 156, (byte) 25, (byte) 162, (byte) 71,
|
||||
(byte) 207, (byte) 247, (byte) 192, (byte) 111, (byte) 231, (byte) 78, (byte) 181, (byte) 69, (byte) 49,
|
||||
(byte) 22, (byte) 199, (byte) 223, (byte) 146, (byte) 70, (byte) 252, (byte) 221, (byte) 143, (byte) 245,
|
||||
(byte) 171, (byte) 208, (byte) 29, (byte) 146, (byte) 2, (byte) 43, (byte) 101, (byte) 162, (byte) 49,
|
||||
(byte) 111, (byte) 83, (byte) 164, (byte) 131, (byte) 72, (byte) 181, (byte) 104, (byte) 195, (byte) 44,
|
||||
(byte) 17, (byte) 129, (byte) 140, (byte) 240, (byte) 130, (byte) 164, (byte) 146, (byte) 194, (byte) 203,
|
||||
(byte) 162, (byte) 194, (byte) 83, (byte) 28, (byte) 96, (byte) 128, (byte) 217, (byte) 231, (byte) 175,
|
||||
(byte) 229, (byte) 69, (byte) 133, (byte) 223, (byte) 238, (byte) 128, (byte) 207, (byte) 106, (byte) 145,
|
||||
(byte) 229, (byte) 6, (byte) 168, (byte) 30, (byte) 166, (byte) 117, (byte) 214, (byte) 159, (byte) 0,
|
||||
(byte) 145, (byte) 188, (byte) 164, (byte) 194, (byte) 103, (byte) 140, (byte) 129, (byte) 156, (byte) 126,
|
||||
(byte) 21, (byte) 151, (byte) 113, (byte) 96, (byte) 64, (byte) 37, (byte) 93, (byte) 212, (byte) 255,
|
||||
(byte) 0, (byte) 178, (byte) 228, (byte) 127, (byte) 90, (byte) 218, (byte) 185, (byte) 151, (byte) 142,
|
||||
(byte) 43, (byte) 53, (byte) 230, (byte) 39, (byte) 140, (byte) 210, (byte) 29, (byte) 236, (byte) 97,
|
||||
(byte) 77, (byte) 29, (byte) 228, (byte) 71, (byte) 228, (byte) 185, (byte) 153, (byte) 123, (byte) 242,
|
||||
(byte) 217, (byte) 254, (byte) 117, (byte) 99, (byte) 64, (byte) 188, (byte) 212, (byte) 134, (byte) 187,
|
||||
(byte) 107, (byte) 12, (byte) 215, (byte) 38, (byte) 104, (byte) 100, (byte) 44, (byte) 25, (byte) 89,
|
||||
(byte) 20, (byte) 17, (byte) 242, (byte) 147, (byte) 144, (byte) 64, (byte) 29, (byte) 197, (byte) 93,
|
||||
(byte) 145, (byte) 65, (byte) 228, (byte) 210, (byte) 105, (byte) 113, (byte) 168, (byte) 214, (byte) 109,
|
||||
(byte) 155, (byte) 28, (byte) 135, (byte) 63, (byte) 250, (byte) 9, (byte) 169, (byte) 146, (byte) 86,
|
||||
(byte) 8, (byte) 201, (byte) 220, (byte) 234, (byte) 124, (byte) 34, (byte) 127, (byte) 119, (byte) 173,
|
||||
(byte) 199, (byte) 233, (byte) 168, (byte) 74, (byte) 223, (byte) 154, (byte) 175, (byte) 248, (byte) 87,
|
||||
(byte) 79, (byte) 92, (byte) 199, (byte) 132, (byte) 191, (byte) 227, (byte) 243, (byte) 93, (byte) 143,
|
||||
(byte) 176, (byte) 187, (byte) 45, (byte) 215, (byte) 212, (byte) 176, (byte) 254, (byte) 149, (byte) 211,
|
||||
(byte) 175, (byte) 32, (byte) 31, (byte) 106, (byte) 230, (byte) 55, (byte) 56, (byte) 219, (byte) 209,
|
||||
(byte) 139, (byte) 139, (byte) 128, (byte) 58, (byte) 9, (byte) 152, (byte) 126, (byte) 166, (byte) 170,
|
||||
(byte) 53, (byte) 93, (byte) 212, (byte) 70, (byte) 46, (byte) 238, (byte) 127, (byte) 235, (byte) 187,
|
||||
(byte) 255, (byte) 0, (byte) 232, (byte) 77, (byte) 84, (byte) 24, (byte) 212, (byte) 148, (byte) 117,
|
||||
(byte) 126, (byte) 12, (byte) 184, (byte) 6, (byte) 11, (byte) 155, (byte) 98, (byte) 126, (byte) 235,
|
||||
(byte) 135, (byte) 25, (byte) 247, (byte) 24, (byte) 254, (byte) 131, (byte) 243, (byte) 174, (byte) 162,
|
||||
(byte) 184, (byte) 63, (byte) 10, (byte) 220, (byte) 121, (byte) 26, (byte) 226, (byte) 33, (byte) 56,
|
||||
(byte) 19, (byte) 163, (byte) 39, (byte) 63, (byte) 159, (byte) 244, (byte) 174, (byte) 238, (byte) 186,
|
||||
(byte) 105, (byte) 187, (byte) 196, (byte) 202, (byte) 75, (byte) 81, (byte) 104, (byte) 162, (byte) 138,
|
||||
(byte) 178, (byte) 66, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160,
|
||||
(byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 10,
|
||||
(byte) 247, (byte) 127, (byte) 234, (byte) 9, (byte) 244, (byte) 34, (byte) 188, (byte) 215, (byte) 197,
|
||||
(byte) 75, (byte) 139, (byte) 248, (byte) 135, (byte) 253, (byte) 52, (byte) 148, (byte) 127, (byte) 227,
|
||||
(byte) 194, (byte) 189, (byte) 50, (byte) 228, (byte) 102, (byte) 221, (byte) 171, (byte) 205, (byte) 124,
|
||||
(byte) 87, (byte) 197, (byte) 236, (byte) 39, (byte) 254, (byte) 154, (byte) 74, (byte) 127, (byte) 85,
|
||||
(byte) 172, (byte) 103, (byte) 185, (byte) 113, (byte) 216, (byte) 229, (byte) 108, (byte) 159, (byte) 253,
|
||||
(byte) 10, (byte) 220, (byte) 250, (byte) 198, (byte) 191, (byte) 202, (byte) 174, (byte) 198, (byte) 220,
|
||||
(byte) 138, (byte) 205, (byte) 180, (byte) 56, (byte) 180, (byte) 128, (byte) 122, (byte) 32, (byte) 31,
|
||||
(byte) 149, (byte) 91, (byte) 141, (byte) 186, (byte) 86, (byte) 199, (byte) 59, (byte) 220, (byte) 232,
|
||||
(byte) 109, (byte) 37, (byte) 2, (byte) 33, (byte) 207, (byte) 52, (byte) 247, (byte) 185, (byte) 219,
|
||||
(byte) 222, (byte) 179, (byte) 160, (byte) 124, (byte) 39, (byte) 90, (byte) 116, (byte) 143, (byte) 129,
|
||||
(byte) 78, (byte) 227, (byte) 38, (byte) 146, (byte) 125, (byte) 245, (byte) 3, (byte) 250, (byte) 211,
|
||||
(byte) 21, (byte) 179, (byte) 77, (byte) 145, (byte) 248, (byte) 160, (byte) 67, (byte) 36, (byte) 147,
|
||||
(byte) 60, (byte) 84, (byte) 186, (byte) 79, (byte) 58, (byte) 189, (byte) 184, (byte) 245, (byte) 111,
|
||||
(byte) 232, (byte) 106, (byte) 163, (byte) 18, (byte) 77, (byte) 90, (byte) 210, (byte) 71, (byte) 252,
|
||||
(byte) 77, (byte) 109, (byte) 191, (byte) 223, (byte) 254, (byte) 148, (byte) 158, (byte) 195, (byte) 91,
|
||||
(byte) 157, (byte) 79, (byte) 132, (byte) 255, (byte) 0, (byte) 228, (byte) 51, (byte) 174, (byte) 175,
|
||||
(byte) 253, (byte) 54, (byte) 67, (byte) 249, (byte) 188, (byte) 191, (byte) 225, (byte) 93, (byte) 60,
|
||||
(byte) 99, (byte) 247, (byte) 106, (byte) 79, (byte) 112, (byte) 43, (byte) 150, (byte) 240, (byte) 153,
|
||||
(byte) 198, (byte) 187, (byte) 173, (byte) 251, (byte) 200, (byte) 191, (byte) 250, (byte) 28, (byte) 191,
|
||||
(byte) 227, (byte) 93, (byte) 76, (byte) 103, (byte) 247, (byte) 72, (byte) 48, (byte) 79, (byte) 202,
|
||||
(byte) 58, (byte) 125, (byte) 43, (byte) 152, (byte) 232, (byte) 103, (byte) 35, (byte) 170, (byte) 140,
|
||||
(byte) 94, (byte) 220, (byte) 15, (byte) 250, (byte) 106, (byte) 199, (byte) 245, (byte) 53, (byte) 154,
|
||||
(byte) 213, (byte) 161, (byte) 172, (byte) 200, (byte) 201, (byte) 172, (byte) 79, (byte) 27, (byte) 40,
|
||||
(byte) 40, (byte) 228, (byte) 237, (byte) 97, (byte) 215, (byte) 119, (byte) 4, (byte) 254, (byte) 24,
|
||||
(byte) 34, (byte) 179, (byte) 92, (byte) 212, (byte) 50, (byte) 209, (byte) 53, (byte) 140, (byte) 205,
|
||||
(byte) 14, (byte) 161, (byte) 109, (byte) 34, (byte) 156, (byte) 21, (byte) 153, (byte) 79, (byte) 235,
|
||||
(byte) 94, (byte) 159, (byte) 94, (byte) 79, (byte) 19, (byte) 133, (byte) 184, (byte) 141, (byte) 137,
|
||||
(byte) 198, (byte) 28, (byte) 28, (byte) 231, (byte) 222, (byte) 189, (byte) 96, (byte) 86, (byte) 244,
|
||||
(byte) 182, (byte) 51, (byte) 152, (byte) 180, (byte) 81, (byte) 69, (byte) 106, (byte) 64, (byte) 81,
|
||||
(byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20,
|
||||
(byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 1, (byte) 28, (byte) 195, (byte) 48, (byte) 191,
|
||||
(byte) 210, (byte) 188, (byte) 215, (byte) 198, (byte) 3, (byte) 253, (byte) 34, (byte) 31, (byte) 247,
|
||||
(byte) 165, (byte) 255, (byte) 0, (byte) 217, (byte) 107, (byte) 210, (byte) 228, (byte) 25, (byte) 141,
|
||||
(byte) 135, (byte) 168, (byte) 175, (byte) 55, (byte) 241, (byte) 136, (byte) 255, (byte) 0, (byte) 72,
|
||||
(byte) 132, (byte) 255, (byte) 0, (byte) 181, (byte) 39, (byte) 254, (byte) 201, (byte) 89, (byte) 79,
|
||||
(byte) 114, (byte) 226, (byte) 112, (byte) 240, (byte) 182, (byte) 17, (byte) 151, (byte) 251, (byte) 146,
|
||||
(byte) 200, (byte) 191, (byte) 147, (byte) 176, (byte) 171, (byte) 49, (byte) 190, (byte) 42, (byte) 175,
|
||||
(byte) 221, (byte) 185, (byte) 158, (byte) 62, (byte) 226, (byte) 82, (byte) 199, (byte) 254, (byte) 5,
|
||||
(byte) 134, (byte) 255, (byte) 0, (byte) 217, (byte) 170, (byte) 236, (byte) 54, (byte) 238, (byte) 216,
|
||||
(byte) 35, (byte) 161, (byte) 173, (byte) 86, (byte) 198, (byte) 13, (byte) 106, (byte) 93, (byte) 134,
|
||||
(byte) 76, (byte) 12, (byte) 158, (byte) 148, (byte) 231, (byte) 155, (byte) 119, (byte) 21, (byte) 25,
|
||||
(byte) 2, (byte) 40, (byte) 241, (byte) 222, (byte) 171, (byte) 249, (byte) 148, (byte) 192, (byte) 176,
|
||||
(byte) 37, (byte) 197, (byte) 33, (byte) 147, (byte) 53, (byte) 84, (byte) 189, (byte) 39, (byte) 155,
|
||||
(byte) 72, (byte) 46, (byte) 88, (byte) 105, (byte) 0, (byte) 171, (byte) 122, (byte) 83, (byte) 143,
|
||||
(byte) 237, (byte) 75, (byte) 111, (byte) 250, (byte) 232, (byte) 5, (byte) 101, (byte) 51, (byte) 213,
|
||||
(byte) 253, (byte) 24, (byte) 238, (byte) 213, (byte) 109, (byte) 6, (byte) 122, (byte) 201, (byte) 252,
|
||||
(byte) 129, (byte) 63, (byte) 210, (byte) 147, (byte) 216, (byte) 22, (byte) 231, (byte) 85, (byte) 225,
|
||||
(byte) 118, (byte) 199, (byte) 136, (byte) 245, (byte) 81, (byte) 234, (byte) 73, (byte) 252, (byte) 164,
|
||||
(byte) 111, (byte) 241, (byte) 174, (byte) 186, (byte) 48, (byte) 60, (byte) 181, (byte) 200, (byte) 228,
|
||||
(byte) 10, (byte) 227, (byte) 60, (byte) 52, (byte) 216, (byte) 241, (byte) 93, (byte) 242, (byte) 250,
|
||||
(byte) 199, (byte) 43, (byte) 126, (byte) 82, (byte) 175, (byte) 248, (byte) 215, (byte) 103, (byte) 23,
|
||||
(byte) 220, (byte) 252, (byte) 127, (byte) 173, (byte) 115, (byte) 35, (byte) 162, (byte) 71, (byte) 39,
|
||||
(byte) 173, (byte) 32, (byte) 26, (byte) 165, (byte) 219, (byte) 115, (byte) 146, (byte) 16, (byte) 117,
|
||||
(byte) 246, (byte) 83, (byte) 254, (byte) 126, (byte) 130, (byte) 177, (byte) 166, (byte) 32, (byte) 119,
|
||||
(byte) 226, (byte) 182, (byte) 124, (byte) 69, (byte) 32, (byte) 139, (byte) 81, (byte) 186, (byte) 245,
|
||||
(byte) 33, (byte) 14, (byte) 63, (byte) 5, (byte) 172, (byte) 24, (byte) 109, (byte) 47, (byte) 53,
|
||||
(byte) 55, (byte) 253, (byte) 218, (byte) 236, (byte) 132, (byte) 28, (byte) 25, (byte) 24, (byte) 113,
|
||||
(byte) 248, (byte) 122, (byte) 159, (byte) 242, (byte) 113, (byte) 72, (byte) 181, (byte) 177, (byte) 93,
|
||||
(byte) 167, (byte) 253, (byte) 224, (byte) 84, (byte) 203, (byte) 49, (byte) 56, (byte) 0, (byte) 117,
|
||||
(byte) 39, (byte) 210, (byte) 189, (byte) 58, (byte) 231, (byte) 196, (byte) 54, (byte) 176, (byte) 79,
|
||||
(byte) 229, (byte) 162, (byte) 60, (byte) 216, (byte) 234, (byte) 202, (byte) 64, (byte) 31, (byte) 175,
|
||||
(byte) 90, (byte) 229, (byte) 116, (byte) 253, (byte) 34, (byte) 11, (byte) 33, (byte) 242, (byte) 21,
|
||||
(byte) 18, (byte) 145, (byte) 204, (byte) 178, (byte) 2, (byte) 73, (byte) 250, (byte) 96, (byte) 112,
|
||||
(byte) 61, (byte) 191, (byte) 60, (byte) 213, (byte) 209, (byte) 106, (byte) 63, (byte) 231, (byte) 162,
|
||||
(byte) 49, (byte) 250, (byte) 31, (byte) 234, (byte) 42, (byte) 226, (byte) 218, (byte) 37, (byte) 171,
|
||||
(byte) 238, (byte) 110, (byte) 175, (byte) 136, (byte) 45, (byte) 207, (byte) 222, (byte) 133, (byte) 199,
|
||||
(byte) 210, (byte) 88, (byte) 207, (byte) 254, (byte) 205, (byte) 82, (byte) 13, (byte) 114, (byte) 212,
|
||||
(byte) 255, (byte) 0, (byte) 4, (byte) 191, (byte) 130, (byte) 134, (byte) 254, (byte) 68, (byte) 215,
|
||||
(byte) 62, (byte) 45, (byte) 155, (byte) 213, (byte) 63, (byte) 25, (byte) 20, (byte) 127, (byte) 51,
|
||||
(byte) 71, (byte) 217, (byte) 155, (byte) 217, (byte) 190, (byte) 142, (byte) 15, (byte) 245, (byte) 167,
|
||||
(byte) 207, (byte) 33, (byte) 114, (byte) 163, (byte) 164, (byte) 26, (byte) 189, (byte) 169, (byte) 237,
|
||||
(byte) 48, (byte) 250, (byte) 192, (byte) 255, (byte) 0, (byte) 225, (byte) 75, (byte) 253, (byte) 175,
|
||||
(byte) 99, (byte) 156, (byte) 25, (byte) 246, (byte) 159, (byte) 246, (byte) 145, (byte) 135, (byte) 243,
|
||||
(byte) 21, (byte) 203, (byte) 152, (byte) 121, (byte) 195, (byte) 46, (byte) 8, (byte) 235, (byte) 145,
|
||||
(byte) 72, (byte) 242, (byte) 164, (byte) 67, (byte) 229, (byte) 33, (byte) 219, (byte) 182, (byte) 41,
|
||||
(byte) 169, (byte) 177, (byte) 114, (byte) 163, (byte) 174, (byte) 183, (byte) 189, (byte) 182, (byte) 186,
|
||||
(byte) 37, (byte) 96, (byte) 157, (byte) 36, (byte) 101, (byte) 25, (byte) 32, (byte) 30, (byte) 69,
|
||||
(byte) 21, (byte) 129, (byte) 225, (byte) 167, (byte) 102, (byte) 212, (byte) 102, (byte) 220, (byte) 73,
|
||||
(byte) 38, (byte) 46, (byte) 191, (byte) 66, (byte) 63, (byte) 198, (byte) 138, (byte) 210, (byte) 46,
|
||||
(byte) 234, (byte) 228, (byte) 181, (byte) 99, (byte) 168, (byte) 162, (byte) 138, (byte) 42, (byte) 132,
|
||||
(byte) 20, (byte) 81, (byte) 69, (byte) 0, (byte) 53, (byte) 134, (byte) 65, (byte) 30, (byte) 162,
|
||||
(byte) 184, (byte) 63, (byte) 17, (byte) 216, (byte) 75, (byte) 125, (byte) 118, (byte) 60, (byte) 160,
|
||||
(byte) 27, (byte) 203, (byte) 39, (byte) 43, (byte) 144, (byte) 51, (byte) 144, (byte) 190, (byte) 191,
|
||||
(byte) 74, (byte) 239, (byte) 24, (byte) 133, (byte) 4, (byte) 146, (byte) 0, (byte) 3, (byte) 36,
|
||||
(byte) 154, (byte) 228, (byte) 117, (byte) 41, (byte) 188, (byte) 61, (byte) 125, (byte) 40, (byte) 55,
|
||||
(byte) 83, (byte) 72, (byte) 207, (byte) 16, (byte) 40, (byte) 36, (byte) 141, (byte) 102, (byte) 78,
|
||||
(byte) 255, (byte) 0, (byte) 222, (byte) 80, (byte) 1, (byte) 233, (byte) 235, (byte) 89, (byte) 84,
|
||||
(byte) 42, (byte) 39, (byte) 23, (byte) 123, (byte) 225, (byte) 171, (byte) 201, (byte) 231, (byte) 19,
|
||||
(byte) 165, (byte) 179, (byte) 68, (byte) 224, (byte) 96, (byte) 149, (byte) 145, (byte) 8, (byte) 108,
|
||||
(byte) 116, (byte) 200, (byte) 207, (byte) 63, (byte) 134, (byte) 63, (byte) 149, (byte) 39, (byte) 246,
|
||||
(byte) 118, (byte) 167, (byte) 18, (byte) 5, (byte) 22, (byte) 146, (byte) 57, (byte) 232, (byte) 74,
|
||||
(byte) 198, (byte) 216, (byte) 253, (byte) 51, (byte) 93, (byte) 71, (byte) 217, (byte) 124, (byte) 49,
|
||||
(byte) 252, (byte) 26, (byte) 244, (byte) 144, (byte) 158, (byte) 152, (byte) 125, (byte) 102, (byte) 81,
|
||||
(byte) 250, (byte) 59, (byte) 212, (byte) 145, (byte) 233, (byte) 118, (byte) 115, (byte) 241, (byte) 103,
|
||||
(byte) 226, (byte) 121, (byte) 219, (byte) 61, (byte) 60, (byte) 185, (byte) 160, (byte) 155, (byte) 255,
|
||||
(byte) 0, (byte) 66, (byte) 86, (byte) 169, (byte) 83, (byte) 104, (byte) 171, (byte) 38, (byte) 113,
|
||||
(byte) 83, (byte) 218, (byte) 223, (byte) 15, (byte) 191, (byte) 105, (byte) 34, (byte) 253, (byte) 84,
|
||||
(byte) 143, (byte) 253, (byte) 8, (byte) 10, (byte) 164, (byte) 203, (byte) 42, (byte) 253, (byte) 232,
|
||||
(byte) 219, (byte) 240, (byte) 32, (byte) 255, (byte) 0, (byte) 42, (byte) 244, (byte) 143, (byte) 248,
|
||||
(byte) 71, (byte) 245, (byte) 56, (byte) 190, (byte) 104, (byte) 245, (byte) 105, (byte) 95, (byte) 143,
|
||||
(byte) 249, (byte) 109, (byte) 111, (byte) 30, (byte) 63, (byte) 241, (byte) 213, (byte) 90, (byte) 67,
|
||||
(byte) 166, (byte) 107, (byte) 153, (byte) 255, (byte) 0, (byte) 143, (byte) 251, (byte) 22, (byte) 29,
|
||||
(byte) 54, (byte) 155, (byte) 103, (byte) 255, (byte) 0, (byte) 227, (byte) 148, (byte) 253, (byte) 161,
|
||||
(byte) 62, (byte) 205, (byte) 30, (byte) 108, (byte) 86, (byte) 99, (byte) 210, (byte) 9, (byte) 143,
|
||||
(byte) 210, (byte) 38, (byte) 255, (byte) 0, (byte) 10, (byte) 102, (byte) 38, (byte) 255, (byte) 0,
|
||||
(byte) 158, (byte) 19, (byte) 127, (byte) 223, (byte) 166, (byte) 255, (byte) 0, (byte) 10, (byte) 244,
|
||||
(byte) 71, (byte) 211, (byte) 117, (byte) 126, (byte) 127, (byte) 208, (byte) 52, (byte) 185, (byte) 207,
|
||||
(byte) 171, (byte) 59, (byte) 39, (byte) 254, (byte) 200, (byte) 213, (byte) 3, (byte) 216, (byte) 234,
|
||||
(byte) 73, (byte) 247, (byte) 252, (byte) 57, (byte) 167, (byte) 185, (byte) 207, (byte) 252, (byte) 177,
|
||||
(byte) 185, (byte) 25, (byte) 253, (byte) 98, (byte) 20, (byte) 253, (byte) 160, (byte) 189, (byte) 154,
|
||||
(byte) 56, (byte) 34, (byte) 179, (byte) 127, (byte) 207, (byte) 9, (byte) 191, (byte) 239, (byte) 211,
|
||||
(byte) 127, (byte) 133, (byte) 106, (byte) 248, (byte) 126, (byte) 25, (byte) 155, (byte) 92, (byte) 180,
|
||||
(byte) 38, (byte) 25, (byte) 2, (byte) 161, (byte) 102, (byte) 102, (byte) 101, (byte) 35, (byte) 31,
|
||||
(byte) 35, (byte) 122, (byte) 245, (byte) 231, (byte) 21, (byte) 209, (byte) 73, (byte) 107, (byte) 56,
|
||||
(byte) 255, (byte) 0, (byte) 91, (byte) 225, (byte) 75, (byte) 156, (byte) 122, (byte) 197, (byte) 60,
|
||||
(byte) 68, (byte) 127, (byte) 232, (byte) 98, (byte) 155, (byte) 11, (byte) 219, (byte) 90, (byte) 74,
|
||||
(byte) 37, (byte) 254, (byte) 195, (byte) 213, (byte) 33, (byte) 96, (byte) 15, (byte) 34, (byte) 35,
|
||||
(byte) 39, (byte) 111, (byte) 246, (byte) 93, (byte) 168, (byte) 117, (byte) 52, (byte) 26, (byte) 133,
|
||||
(byte) 152, (byte) 190, (byte) 26, (byte) 111, (byte) 248, (byte) 172, (byte) 46, (byte) 125, (byte) 224,
|
||||
(byte) 159, (byte) 255, (byte) 0, (byte) 70, (byte) 199, (byte) 93, (byte) 188, (byte) 127, (byte) 112,
|
||||
(byte) 253, (byte) 79, (byte) 243, (byte) 174, (byte) 19, (byte) 195, (byte) 2, (byte) 87, (byte) 241,
|
||||
(byte) 91, (byte) 74, (byte) 109, (byte) 174, (byte) 163, (byte) 83, (byte) 4, (byte) 191, (byte) 52,
|
||||
(byte) 182, (byte) 242, (byte) 70, (byte) 57, (byte) 116, (byte) 56, (byte) 249, (byte) 128, (byte) 231,
|
||||
(byte) 143, (byte) 210, (byte) 187, (byte) 57, (byte) 110, (byte) 227, (byte) 180, (byte) 143, (byte) 116,
|
||||
(byte) 188, (byte) 41, (byte) 220, (byte) 217, (byte) 200, (byte) 236, (byte) 195, (byte) 143, (byte) 215,
|
||||
(byte) 244, (byte) 172, (byte) 139, (byte) 145, (byte) 201, (byte) 248, (byte) 171, (byte) 82, (byte) 139,
|
||||
(byte) 79, (byte) 213, (byte) 247, (byte) 203, (byte) 100, (byte) 46, (byte) 132, (byte) 135, (byte) 104,
|
||||
(byte) 87, (byte) 144, (byte) 168, (byte) 27, (byte) 85, (byte) 14, (byte) 72, (byte) 193, (byte) 207,
|
||||
(byte) 222, (byte) 233, (byte) 237, (byte) 223, (byte) 60, (byte) 81, (byte) 79, (byte) 25, (byte) 67,
|
||||
(byte) 128, (byte) 26, (byte) 192, (byte) 160, (byte) 3, (byte) 133, (byte) 73, (byte) 65, (byte) 254,
|
||||
(byte) 130, (byte) 163, (byte) 248, (byte) 147, (byte) 58, (byte) 90, (byte) 223, (byte) 219, (byte) 187,
|
||||
(byte) 134, (byte) 101, (byte) 33, (byte) 219, (byte) 228, (byte) 93, (byte) 199, (byte) 145, (byte) 24,
|
||||
(byte) 254, (byte) 149, (byte) 196, (byte) 255, (byte) 0, (byte) 107, (byte) 91, (byte) 19, (byte) 203,
|
||||
(byte) 72, (byte) 163, (byte) 253, (byte) 168, (byte) 95, (byte) 252, (byte) 43, (byte) 120, (byte) 194,
|
||||
(byte) 45, (byte) 106, (byte) 67, (byte) 108, (byte) 239, (byte) 215, (byte) 198, (byte) 186, (byte) 104,
|
||||
(byte) 225, (byte) 237, (byte) 238, (byte) 198, (byte) 61, (byte) 21, (byte) 63, (byte) 248, (byte) 161,
|
||||
(byte) 82, (byte) 199, (byte) 227, (byte) 13, (byte) 33, (byte) 241, (byte) 151, (byte) 120, (byte) 243,
|
||||
(byte) 211, (byte) 112, (byte) 207, (byte) 254, (byte) 131, (byte) 154, (byte) 224, (byte) 132, (byte) 158,
|
||||
(byte) 110, (byte) 217, (byte) 85, (byte) 91, (byte) 100, (byte) 136, (byte) 25, (byte) 24, (byte) 169,
|
||||
(byte) 27, (byte) 128, (byte) 102, (byte) 25, (byte) 25, (byte) 247, (byte) 4, (byte) 126, (byte) 6,
|
||||
(byte) 131, (byte) 46, (byte) 196, (byte) 203, (byte) 182, (byte) 213, (byte) 4, (byte) 100, (byte) 147,
|
||||
(byte) 199, (byte) 90, (byte) 175, (byte) 103, (byte) 17, (byte) 115, (byte) 51, (byte) 209, (byte) 87,
|
||||
(byte) 196, (byte) 250, (byte) 43, (byte) 112, (byte) 47, (byte) 9, (byte) 63, (byte) 245, (byte) 198,
|
||||
(byte) 79, (byte) 234, (byte) 181, (byte) 98, (byte) 29, (byte) 91, (byte) 79, (byte) 185, (byte) 144,
|
||||
(byte) 71, (byte) 21, (byte) 204, (byte) 108, (byte) 228, (byte) 18, (byte) 23, (byte) 112, (byte) 207,
|
||||
(byte) 3, (byte) 39, (byte) 3, (byte) 169, (byte) 224, (byte) 19, (byte) 248, (byte) 87, (byte) 155,
|
||||
(byte) 69, (byte) 34, (byte) 56, (byte) 249, (byte) 27, (byte) 119, (byte) 161, (byte) 21, (byte) 167,
|
||||
(byte) 161, (byte) 182, (byte) 221, (byte) 102, (byte) 220, (byte) 247, (byte) 219, (byte) 40, (byte) 252,
|
||||
(byte) 227, (byte) 97, (byte) 253, (byte) 105, (byte) 58, (byte) 106, (byte) 195, (byte) 82, (byte) 103,
|
||||
(byte) 111, (byte) 52, (byte) 172, (byte) 252, (byte) 46, (byte) 85, (byte) 125, (byte) 61, (byte) 106,
|
||||
(byte) 12, (byte) 96, (byte) 99, (byte) 240, (byte) 169, (byte) 202, (byte) 212, (byte) 101, (byte) 107,
|
||||
(byte) 3, (byte) 67, (byte) 83, (byte) 195, (byte) 7, (byte) 254, (byte) 38, (byte) 50, (byte) 231,
|
||||
(byte) 254, (byte) 120, (byte) 159, (byte) 253, (byte) 8, (byte) 81, (byte) 75, (byte) 225, (byte) 180,
|
||||
(byte) 35, (byte) 82, (byte) 118, (byte) 231, (byte) 2, (byte) 18, (byte) 9, (byte) 199, (byte) 251,
|
||||
(byte) 75, (byte) 69, (byte) 111, (byte) 13, (byte) 140, (byte) 158, (byte) 231, (byte) 83, (byte) 69,
|
||||
(byte) 20, (byte) 85, (byte) 8, (byte) 41, (byte) 172, (byte) 202, (byte) 168, (byte) 89, (byte) 136,
|
||||
(byte) 10, (byte) 7, (byte) 36, (byte) 210, (byte) 59, (byte) 172, (byte) 104, (byte) 89, (byte) 206,
|
||||
(byte) 0, (byte) 234, (byte) 107, (byte) 50, (byte) 123, (byte) 212, (byte) 153, (byte) 202, (byte) 188,
|
||||
(byte) 37, (byte) 226, (byte) 237, (byte) 243, (byte) 17, (byte) 248, (byte) 241, (byte) 82, (byte) 221,
|
||||
(byte) 134, (byte) 149, (byte) 200, (byte) 239, (byte) 47, (byte) 26, (byte) 228, (byte) 152, (byte) 227,
|
||||
(byte) 202, (byte) 197, (byte) 233, (byte) 221, (byte) 170, (byte) 151, (byte) 151, (byte) 20, (byte) 201,
|
||||
(byte) 204, (byte) 104, (byte) 87, (byte) 28, (byte) 54, (byte) 7, (byte) 205, (byte) 255, (byte) 0,
|
||||
(byte) 214, (byte) 255, (byte) 0, (byte) 61, (byte) 58, (byte) 217, (byte) 117, (byte) 180, (byte) 158,
|
||||
(byte) 65, (byte) 31, (byte) 149, (byte) 60, (byte) 104, (byte) 6, (byte) 231, (byte) 97, (byte) 200,
|
||||
(byte) 62, (byte) 220, (byte) 245, (byte) 255, (byte) 0, (byte) 235, (byte) 115, (byte) 193, (byte) 230,
|
||||
(byte) 95, (byte) 46, (byte) 208, (byte) 253, (byte) 219, (byte) 163, (byte) 207, (byte) 170, (byte) 19,
|
||||
(byte) 89, (byte) 61, (byte) 77, (byte) 17, (byte) 158, (byte) 108, (byte) 237, (byte) 143, (byte) 88,
|
||||
(byte) 23, (byte) 240, (byte) 36, (byte) 127, (byte) 42, (byte) 175, (byte) 54, (byte) 143, (byte) 167,
|
||||
(byte) 78, (byte) 49, (byte) 37, (byte) 170, (byte) 48, (byte) 247, (byte) 231, (byte) 249, (byte) 230,
|
||||
(byte) 181, (byte) 205, (byte) 164, (byte) 103, (byte) 238, (byte) 221, (byte) 196, (byte) 126, (byte) 191,
|
||||
(byte) 45, (byte) 31, (byte) 96, (byte) 145, (byte) 190, (byte) 228, (byte) 145, (byte) 55, (byte) 209,
|
||||
(byte) 243, (byte) 253, (byte) 41, (byte) 89, (byte) 133, (byte) 209, (byte) 203, (byte) 220, (byte) 105,
|
||||
(byte) 30, (byte) 28, (byte) 177, (byte) 144, (byte) 44, (byte) 162, (byte) 218, (byte) 217, (byte) 200,
|
||||
(byte) 200, (byte) 201, (byte) 69, (byte) 63, (byte) 94, (byte) 153, (byte) 20, (byte) 244, (byte) 181,
|
||||
(byte) 211, (byte) 179, (byte) 182, (byte) 13, (byte) 126, (byte) 72, (byte) 200, (byte) 63, (byte) 118,
|
||||
(byte) 27, (byte) 246, (byte) 31, (byte) 160, (byte) 113, (byte) 90, (byte) 18, (byte) 120, (byte) 78,
|
||||
(byte) 79, (byte) 53, (byte) 230, (byte) 89, (byte) 239, (byte) 11, (byte) 200, (byte) 114, (byte) 205,
|
||||
(byte) 231, (byte) 1, (byte) 159, (byte) 110, (byte) 48, (byte) 106, (byte) 164, (byte) 158, (byte) 18,
|
||||
(byte) 186, (byte) 199, (byte) 55, (byte) 37, (byte) 143, (byte) 253, (byte) 52, (byte) 181, (byte) 14,
|
||||
(byte) 127, (byte) 70, (byte) 231, (byte) 252, (byte) 105, (byte) 217, (byte) 245, (byte) 27, (byte) 113,
|
||||
(byte) 182, (byte) 132, (byte) 137, (byte) 166, (byte) 94, (byte) 227, (byte) 117, (byte) 174, (byte) 175,
|
||||
(byte) 118, (byte) 71, (byte) 247, (byte) 153, (byte) 203, (byte) 255, (byte) 0, (byte) 232, (byte) 91,
|
||||
(byte) 169, (byte) 77, (byte) 182, (byte) 186, (byte) 135, (byte) 141, (byte) 105, (byte) 155, (byte) 31,
|
||||
(byte) 194, (byte) 97, (byte) 139, (byte) 255, (byte) 0, (byte) 141, (byte) 131, (byte) 250, (byte) 214,
|
||||
(byte) 115, (byte) 248, (byte) 70, (byte) 97, (byte) 255, (byte) 0, (byte) 44, (byte) 108, (byte) 206,
|
||||
(byte) 14, (byte) 114, (byte) 208, (byte) 24, (byte) 255, (byte) 0, (byte) 161, (byte) 173, (byte) 29,
|
||||
(byte) 39, (byte) 74, (byte) 26, (byte) 126, (byte) 247, (byte) 149, (byte) 209, (byte) 166, (byte) 147,
|
||||
(byte) 130, (byte) 35, (byte) 56, (byte) 69, (byte) 95, (byte) 65, (byte) 211, (byte) 63, (byte) 92,
|
||||
(byte) 127, (byte) 92, (byte) 161, (byte) 33, (byte) 124, (byte) 207, (byte) 17, (byte) 39, (byte) 11,
|
||||
(byte) 45, (byte) 148, (byte) 131, (byte) 214, (byte) 72, (byte) 73, (byte) 63, (byte) 163, (byte) 143,
|
||||
(byte) 229, (byte) 74, (byte) 47, (byte) 245, (byte) 216, (byte) 190, (byte) 245, (byte) 157, (byte) 180,
|
||||
(byte) 196, (byte) 127, (byte) 207, (byte) 48, (byte) 201, (byte) 253, (byte) 90, (byte) 180, (byte) 48,
|
||||
(byte) 126, (byte) 180, (byte) 224, (byte) 15, (byte) 231, (byte) 72, (byte) 101, (byte) 1, (byte) 173,
|
||||
(byte) 106, (byte) 163, (byte) 253, (byte) 102, (byte) 134, (byte) 20, (byte) 122, (byte) 173, (byte) 211,
|
||||
(byte) 31, (byte) 231, (byte) 24, (byte) 254, (byte) 116, (byte) 198, (byte) 215, (byte) 81, (byte) 198,
|
||||
(byte) 219, (byte) 173, (byte) 26, (byte) 241, (byte) 186, (byte) 224, (byte) 175, (byte) 150, (byte) 71,
|
||||
(byte) 39, (byte) 61, (byte) 75, (byte) 131, (byte) 255, (byte) 0, (byte) 234, (byte) 173, (byte) 46,
|
||||
(byte) 248, (byte) 252, (byte) 205, (byte) 57, (byte) 229, (byte) 16, (byte) 199, (byte) 187, (byte) 156,
|
||||
(byte) 14, (byte) 128, (byte) 127, (byte) 42, (byte) 5, (byte) 99, (byte) 138, (byte) 241, (byte) 77,
|
||||
(byte) 192, (byte) 212, (byte) 110, (byte) 32, (byte) 157, (byte) 109, (byte) 228, (byte) 137, (byte) 22,
|
||||
(byte) 63, (byte) 44, (byte) 9, (byte) 217, (byte) 50, (byte) 79, (byte) 83, (byte) 209, (byte) 142,
|
||||
(byte) 56, (byte) 199, (byte) 83, (byte) 216, (byte) 215, (byte) 57, (byte) 60, (byte) 16, (byte) 164,
|
||||
(byte) 139, (byte) 27, (byte) 199, (byte) 9, (byte) 103, (byte) 206, (byte) 54, (byte) 149, (byte) 113,
|
||||
(byte) 198, (byte) 123, (byte) 174, (byte) 64, (byte) 233, (byte) 252, (byte) 143, (byte) 66, (byte) 43,
|
||||
(byte) 168, (byte) 215, (byte) 230, (byte) 55, (byte) 183, (byte) 10, (byte) 3, (byte) 65, (byte) 186,
|
||||
(byte) 55, (byte) 70, (byte) 223, (byte) 59, (byte) 98, (byte) 54, (byte) 251, (byte) 223, (byte) 41,
|
||||
(byte) 245, (byte) 206, (byte) 56, (byte) 3, (byte) 168, (byte) 13, (byte) 233, (byte) 85, (byte) 103,
|
||||
(byte) 179, (byte) 188, (byte) 189, (byte) 71, (byte) 242, (byte) 116, (byte) 171, (byte) 50, (byte) 204,
|
||||
(byte) 191, (byte) 122, (byte) 198, (byte) 9, (byte) 64, (byte) 31, (byte) 48, (byte) 111, (byte) 226,
|
||||
(byte) 24, (byte) 29, (byte) 8, (byte) 227, (byte) 28, (byte) 55, (byte) 126, (byte) 49, (byte) 211,
|
||||
(byte) 77, (byte) 251, (byte) 166, (byte) 82, (byte) 90, (byte) 156, (byte) 133, (byte) 236, (byte) 12,
|
||||
(byte) 183, (byte) 150, (byte) 235, (byte) 109, (byte) 251, (byte) 165, (byte) 116, (byte) 145, (byte) 164,
|
||||
(byte) 218, (byte) 163, (byte) 230, (byte) 198, (byte) 192, (byte) 58, (byte) 143, (byte) 246, (byte) 169,
|
||||
(byte) 5, (byte) 169, (byte) 152, (byte) 136, (byte) 166, (byte) 145, (byte) 165, (byte) 141, (byte) 136,
|
||||
(byte) 12, (byte) 164, (byte) 46, (byte) 15, (byte) 62, (byte) 192, (byte) 86, (byte) 244, (byte) 186,
|
||||
(byte) 93, (byte) 228, (byte) 92, (byte) 203, (byte) 28, (byte) 113, (byte) 251, (byte) 60, (byte) 241,
|
||||
(byte) 131, (byte) 249, (byte) 110, (byte) 205, (byte) 71, (byte) 30, (byte) 159, (byte) 117, (byte) 47,
|
||||
(byte) 250, (byte) 171, (byte) 57, (byte) 165, (byte) 199, (byte) 59, (byte) 162, (byte) 132, (byte) 183,
|
||||
(byte) 234, (byte) 5, (byte) 105, (byte) 161, (byte) 55, (byte) 118, (byte) 51, (byte) 101, (byte) 209,
|
||||
(byte) 45, (byte) 47, (byte) 103, (byte) 6, (byte) 68, (byte) 105, (byte) 102, (byte) 147, (byte) 10,
|
||||
(byte) 25, (byte) 216, (byte) 51, (byte) 30, (byte) 138, (byte) 6, (byte) 79, (byte) 62, (byte) 128,
|
||||
(byte) 126, (byte) 21, (byte) 111, (byte) 64, (byte) 210, (byte) 109, (byte) 173, (byte) 53, (byte) 120,
|
||||
(byte) 37, (byte) 129, (byte) 202, (byte) 228, (byte) 227, (byte) 29, (byte) 71, (byte) 63, (byte) 141,
|
||||
(byte) 109, (byte) 233, (byte) 26, (byte) 129, (byte) 209, (byte) 94, (byte) 113, (byte) 117, (byte) 246,
|
||||
(byte) 155, (byte) 101, (byte) 152, (byte) 47, (byte) 42, (byte) 160, (byte) 19, (byte) 130, (byte) 120,
|
||||
(byte) 33, (byte) 177, (byte) 235, (byte) 80, (byte) 45, (byte) 228, (byte) 55, (byte) 94, (byte) 35,
|
||||
(byte) 89, (byte) 161, (byte) 152, (byte) 202, (byte) 178, (byte) 93, (byte) 33, (byte) 220, (byte) 196,
|
||||
(byte) 100, (byte) 229, (byte) 134, (byte) 123, (byte) 250, (byte) 231, (byte) 30, (byte) 216, (byte) 168,
|
||||
(byte) 247, (byte) 155, (byte) 105, (byte) 173, (byte) 7, (byte) 100, (byte) 146, (byte) 119, (byte) 215,
|
||||
(byte) 177, (byte) 214, (byte) 176, (byte) 228, (byte) 213, (byte) 121, (byte) 164, (byte) 218, (byte) 226,
|
||||
(byte) 56, (byte) 212, (byte) 201, (byte) 41, (byte) 25, (byte) 10, (byte) 14, (byte) 49, (byte) 238,
|
||||
(byte) 79, (byte) 97, (byte) 254, (byte) 7, (byte) 0, (byte) 224, (byte) 225, (byte) 210, (byte) 76,
|
||||
(byte) 242, (byte) 187, (byte) 69, (byte) 109, (byte) 141, (byte) 192, (byte) 225, (byte) 229, (byte) 35,
|
||||
(byte) 33, (byte) 61, (byte) 135, (byte) 171, (byte) 126, (byte) 131, (byte) 190, (byte) 113, (byte) 180,
|
||||
(byte) 190, (byte) 24, (byte) 86, (byte) 8, (byte) 202, (byte) 140, (byte) 156, (byte) 156, (byte) 150,
|
||||
(byte) 39, (byte) 37, (byte) 142, (byte) 7, (byte) 39, (byte) 215, (byte) 255, (byte) 0, (byte) 172,
|
||||
(byte) 43, (byte) 152, (byte) 216, (byte) 185, (byte) 225, (byte) 200, (byte) 60, (byte) 173, (byte) 87,
|
||||
(byte) 204, (byte) 119, (byte) 50, (byte) 74, (byte) 209, (byte) 48, (byte) 45, (byte) 140, (byte) 0,
|
||||
(byte) 50, (byte) 188, (byte) 1, (byte) 216, (byte) 127, (byte) 128, (byte) 201, (byte) 39, (byte) 154,
|
||||
(byte) 42, (byte) 93, (byte) 12, (byte) 255, (byte) 0, (byte) 196, (byte) 208, (byte) 127, (byte) 184,
|
||||
(byte) 194, (byte) 138, (byte) 214, (byte) 27, (byte) 25, (byte) 189, (byte) 206, (byte) 158, (byte) 152,
|
||||
(byte) 238, (byte) 168, (byte) 165, (byte) 152, (byte) 224, (byte) 10, (byte) 29, (byte) 213, (byte) 20,
|
||||
(byte) 179, (byte) 28, (byte) 1, (byte) 89, (byte) 151, (byte) 51, (byte) 180, (byte) 242, (byte) 99,
|
||||
(byte) 149, (byte) 3, (byte) 166, (byte) 123, (byte) 127, (byte) 245, (byte) 255, (byte) 0, (byte) 207,
|
||||
(byte) 213, (byte) 202, (byte) 86, (byte) 4, (byte) 174, (byte) 54, (byte) 230, (byte) 225, (byte) 238,
|
||||
(byte) 31, (byte) 28, (byte) 170, (byte) 131, (byte) 211, (byte) 211, (byte) 255, (byte) 0, (byte) 175,
|
||||
(byte) 254, (byte) 126, (byte) 180, (byte) 53, (byte) 43, (byte) 248, (byte) 244, (byte) 219, (byte) 38,
|
||||
(byte) 153, (byte) 204, (byte) 69, (byte) 254, (byte) 236, (byte) 105, (byte) 38, (byte) 62, (byte) 118,
|
||||
(byte) 244, (byte) 232, (byte) 79, (byte) 191, (byte) 3, (byte) 160, (byte) 53, (byte) 120, (byte) 0,
|
||||
(byte) 56, (byte) 3, (byte) 35, (byte) 182, (byte) 43, (byte) 151, (byte) 214, (byte) 32, (byte) 186,
|
||||
(byte) 184, (byte) 251, (byte) 68, (byte) 177, (byte) 45, (byte) 203, (byte) 179, (byte) 137, (byte) 4,
|
||||
(byte) 34, (byte) 9, (byte) 140, (byte) 160, (byte) 28, (byte) 124, (byte) 167, (byte) 98, (byte) 18,
|
||||
(byte) 6, (byte) 62, (byte) 92, (byte) 241, (byte) 233, (byte) 156, (byte) 214, (byte) 90, (byte) 189,
|
||||
(byte) 77, (byte) 52, (byte) 71, (byte) 63, (byte) 172, (byte) 107, (byte) 115, (byte) 107, (byte) 22,
|
||||
(byte) 242, (byte) 51, (byte) 181, (byte) 178, (byte) 136, (byte) 207, (byte) 151, (byte) 19, (byte) 67,
|
||||
(byte) 41, (byte) 92, (byte) 177, (byte) 56, (byte) 222, (byte) 20, (byte) 156, (byte) 119, (byte) 199,
|
||||
(byte) 174, (byte) 51, (byte) 239, (byte) 78, (byte) 142, (byte) 246, (byte) 255, (byte) 0, (byte) 251,
|
||||
(byte) 68, (byte) 132, (byte) 184, (byte) 188, (byte) 40, (byte) 97, (byte) 12, (byte) 203, (byte) 21,
|
||||
(byte) 217, (byte) 113, (byte) 184, (byte) 177, (byte) 231, (byte) 61, (byte) 73, (byte) 249, (byte) 72,
|
||||
(byte) 252, (byte) 61, (byte) 14, (byte) 40, (byte) 184, (byte) 211, (byte) 210, (byte) 214, (byte) 91,
|
||||
(byte) 85, (byte) 197, (byte) 223, (byte) 151, (byte) 2, (byte) 54, (byte) 67, (byte) 68, (byte) 9,
|
||||
(byte) 83, (byte) 133, (byte) 11, (byte) 213, (byte) 112, (byte) 6, (byte) 55, (byte) 113, (byte) 236,
|
||||
(byte) 181, (byte) 71, (byte) 201, (byte) 141, (byte) 173, (byte) 164, (byte) 6, (byte) 72, (byte) 196,
|
||||
(byte) 211, (byte) 92, (byte) 130, (byte) 223, (byte) 185, (byte) 31, (byte) 42, (byte) 121, (byte) 157,
|
||||
(byte) 114, (byte) 15, (byte) 63, (byte) 39, (byte) 59, (byte) 70, (byte) 59, (byte) 129, (byte) 72,
|
||||
(byte) 11, (byte) 208, (byte) 107, (byte) 186, (byte) 180, (byte) 80, (byte) 89, (byte) 187, (byte) 92,
|
||||
(byte) 207, (byte) 153, (byte) 78, (byte) 11, (byte) 60, (byte) 10, (byte) 251, (byte) 151, (byte) 4,
|
||||
(byte) 228, (byte) 119, (byte) 35, (byte) 145, (byte) 201, (byte) 237, (byte) 223, (byte) 140, (byte) 84,
|
||||
(byte) 237, (byte) 226, (byte) 205, (byte) 66, (byte) 56, (byte) 238, (byte) 143, (byte) 155, (byte) 4,
|
||||
(byte) 173, (byte) 9, (byte) 253, (byte) 216, (byte) 146, (byte) 50, (byte) 9, (byte) 24, (byte) 29,
|
||||
(byte) 74, (byte) 225, (byte) 122, (byte) 231, (byte) 211, (byte) 159, (byte) 65, (byte) 129, (byte) 84,
|
||||
(byte) 163, (byte) 130, (byte) 36, (byte) 189, (byte) 105, (byte) 35, (byte) 104, (byte) 22, (byte) 59,
|
||||
(byte) 120, (byte) 151, (byte) 203, (byte) 0, (byte) 186, (byte) 6, (byte) 56, (byte) 108, (byte) 237,
|
||||
(byte) 4, (byte) 17, (byte) 156, (byte) 96, (byte) 115, (byte) 237, (byte) 239, (byte) 76, (byte) 91,
|
||||
(byte) 105, (byte) 222, (byte) 210, (byte) 218, (byte) 220, (byte) 202, (byte) 210, (byte) 53, (byte) 227,
|
||||
(byte) 111, (byte) 153, (byte) 86, (byte) 225, (byte) 91, (byte) 113, (byte) 10, (byte) 9, (byte) 220,
|
||||
(byte) 27, (byte) 1, (byte) 79, (byte) 11, (byte) 199, (byte) 177, (byte) 29, (byte) 133, (byte) 49,
|
||||
(byte) 155, (byte) 145, (byte) 120, (byte) 190, (byte) 228, (byte) 92, (byte) 172, (byte) 97, (byte) 108,
|
||||
(byte) 217, (byte) 36, (byte) 66, (byte) 200, (byte) 233, (byte) 33, (byte) 64, (byte) 57, (byte) 28,
|
||||
(byte) 100, (byte) 245, (byte) 56, (byte) 201, (byte) 237, (byte) 248, (byte) 98, (byte) 172, (byte) 65,
|
||||
(byte) 227, (byte) 137, (byte) 140, (byte) 16, (byte) 74, (byte) 246, (byte) 115, (byte) 42, (byte) 203,
|
||||
(byte) 32, (byte) 143, (byte) 11, (byte) 114, (byte) 25, (byte) 129, (byte) 44, (byte) 71, (byte) 76,
|
||||
(byte) 122, (byte) 14, (byte) 228, (byte) 117, (byte) 252, (byte) 107, (byte) 157, (byte) 144, (byte) 92,
|
||||
(byte) 43, (byte) 222, (byte) 223, (byte) 58, (byte) 22, (byte) 22, (byte) 160, (byte) 196, (byte) 26,
|
||||
(byte) 72, (byte) 17, (byte) 151, (byte) 43, (byte) 134, (byte) 195, (byte) 31, (byte) 169, (byte) 198,
|
||||
(byte) 125, (byte) 198, (byte) 15, (byte) 81, (byte) 81, (byte) 53, (byte) 160, (byte) 133, (byte) 45,
|
||||
(byte) 237, (byte) 36, (byte) 72, (byte) 198, (byte) 73, (byte) 146, (byte) 67, (byte) 36, (byte) 82,
|
||||
(byte) 70, (byte) 207, (byte) 131, (byte) 247, (byte) 88, (byte) 117, (byte) 193, (byte) 207, (byte) 233,
|
||||
(byte) 138, (byte) 44, (byte) 35, (byte) 179, (byte) 143, (byte) 199, (byte) 10, (byte) 30, (byte) 84,
|
||||
(byte) 146, (byte) 43, (byte) 196, (byte) 120, (byte) 66, (byte) 153, (byte) 23, (byte) 201, (byte) 86,
|
||||
(byte) 218, (byte) 8, (byte) 39, (byte) 57, (byte) 207, (byte) 160, (byte) 255, (byte) 0, (byte) 12,
|
||||
(byte) 243, (byte) 86, (byte) 35, (byte) 241, (byte) 197, (byte) 131, (byte) 136, (byte) 183, (byte) 220,
|
||||
(byte) 5, (byte) 89, (byte) 64, (byte) 43, (byte) 230, (byte) 196, (byte) 70, (byte) 114, (byte) 51,
|
||||
(byte) 142, (byte) 7, (byte) 167, (byte) 225, (byte) 232, (byte) 77, (byte) 112, (byte) 161, (byte) 227,
|
||||
(byte) 243, (byte) 47, (byte) 38, (byte) 85, (byte) 82, (byte) 71, (byte) 238, (byte) 149, (byte) 97,
|
||||
(byte) 148, (byte) 118, (byte) 249, (byte) 115, (byte) 176, (byte) 142, (byte) 65, (byte) 36, (byte) 30,
|
||||
(byte) 123, (byte) 103, (byte) 165, (byte) 77, (byte) 30, (byte) 200, (byte) 18, (byte) 218, (byte) 216,
|
||||
(byte) 153, (byte) 62, (byte) 210, (byte) 177, (byte) 147, (byte) 27, (byte) 9, (byte) 183, (byte) 34,
|
||||
(byte) 54, (byte) 210, (byte) 48, (byte) 48, (byte) 64, (byte) 3, (byte) 57, (byte) 29, (byte) 248,
|
||||
(byte) 35, (byte) 182, (byte) 40, (byte) 11, (byte) 30, (byte) 133, (byte) 105, (byte) 173, (byte) 217,
|
||||
(byte) 95, (byte) 150, (byte) 16, (byte) 165, (byte) 188, (byte) 204, (byte) 167, (byte) 5, (byte) 76,
|
||||
(byte) 101, (byte) 24, (byte) 113, (byte) 232, (byte) 220, (byte) 254, (byte) 149, (byte) 108, (byte) 205,
|
||||
(byte) 22, (byte) 15, (byte) 250, (byte) 24, (byte) 83, (byte) 219, (byte) 14, (byte) 71, (byte) 242,
|
||||
(byte) 172, (byte) 15, (byte) 11, (byte) 104, (byte) 247, (byte) 54, (byte) 22, (byte) 242, (byte) 94,
|
||||
(byte) 94, (byte) 51, (byte) 139, (byte) 155, (byte) 189, (byte) 164, (byte) 198, (byte) 78, (byte) 54,
|
||||
(byte) 168, (byte) 233, (byte) 145, (byte) 221, (byte) 185, (byte) 231, (byte) 250, (byte) 115, (byte) 157,
|
||||
(byte) 226, (byte) 63, (byte) 217, (byte) 95, (byte) 251, (byte) 228, (byte) 127, (byte) 133, (byte) 23,
|
||||
(byte) 21, (byte) 134, (byte) 198, (byte) 246, (byte) 113, (byte) 68, (byte) 136, (byte) 240, (byte) 200,
|
||||
(byte) 48, (byte) 48, (byte) 88, (byte) 177, (byte) 228, (byte) 250, (byte) 253, (byte) 127, (byte) 198,
|
||||
(byte) 178, (byte) 53, (byte) 235, (byte) 216, (byte) 6, (byte) 32, (byte) 183, (byte) 82, (byte) 175,
|
||||
(byte) 143, (byte) 152, (byte) 150, (byte) 206, (byte) 1, (byte) 254, (byte) 167, (byte) 249, (byte) 84,
|
||||
(byte) 154, (byte) 165, (byte) 202, (byte) 136, (byte) 252, (byte) 161, (byte) 134, (byte) 207, (byte) 64,
|
||||
(byte) 123, (byte) 251, (byte) 214, (byte) 20, (byte) 185, (byte) 98, (byte) 89, (byte) 137, (byte) 44,
|
||||
(byte) 78, (byte) 73, (byte) 39, (byte) 169, (byte) 160, (byte) 102, (byte) 7, (byte) 138, (byte) 142,
|
||||
(byte) 52, (byte) 66, (byte) 115, (byte) 130, (byte) 110, (byte) 98, (byte) 239, (byte) 232, (byte) 178,
|
||||
(byte) 255, (byte) 0, (byte) 241, (byte) 85, (byte) 201, (byte) 196, (byte) 98, (byte) 126, (byte) 89,
|
||||
(byte) 85, (byte) 143, (byte) 184, (byte) 174, (byte) 195, (byte) 196, (byte) 177, (byte) 121, (byte) 186,
|
||||
(byte) 28, (byte) 153, (byte) 255, (byte) 0, (byte) 150, (byte) 114, (byte) 43, (byte) 244, (byte) 247,
|
||||
(byte) 11, (byte) 255, (byte) 0, (byte) 179, (byte) 87, (byte) 22, (byte) 150, (byte) 11, (byte) 213,
|
||||
(byte) 102, (byte) 157, (byte) 125, (byte) 196, (byte) 135, (byte) 250, (byte) 154, (byte) 222, (byte) 27,
|
||||
(byte) 25, (byte) 200, (byte) 212, (byte) 183, (byte) 185, (byte) 184, (byte) 135, (byte) 30, (byte) 69,
|
||||
(byte) 204, (byte) 208, (byte) 143, (byte) 250, (byte) 98, (byte) 251, (byte) 127, (byte) 149, (byte) 91,
|
||||
(byte) 254, (byte) 209, (byte) 191, (byte) 63, (byte) 52, (byte) 151, (byte) 215, (byte) 19, (byte) 96,
|
||||
(byte) 103, (byte) 247, (byte) 242, (byte) 180, (byte) 159, (byte) 204, (byte) 226, (byte) 178, (byte) 213,
|
||||
(byte) 150, (byte) 217, (byte) 34, (byte) 71, (byte) 18, (byte) 76, (byte) 207, (byte) 38, (byte) 208,
|
||||
(byte) 217, (byte) 203, (byte) 156, (byte) 140, (byte) 128, (byte) 121, (byte) 0, (byte) 1, (byte) 180,
|
||||
(byte) 246, (byte) 207, (byte) 60, (byte) 231, (byte) 140, (byte) 77, (byte) 43, (byte) 19, (byte) 19,
|
||||
(byte) 132, (byte) 141, (byte) 214, (byte) 77, (byte) 135, (byte) 104, (byte) 32, (byte) 156, (byte) 156,
|
||||
(byte) 113, (byte) 156, (byte) 86, (byte) 150, (byte) 68, (byte) 154, (byte) 209, (byte) 107, (byte) 26,
|
||||
(byte) 132, (byte) 35, (byte) 17, (byte) 204, (byte) 136, (byte) 63, (byte) 217, (byte) 130, (byte) 32,
|
||||
(byte) 127, (byte) 61, (byte) 185, (byte) 253, (byte) 106, (byte) 253, (byte) 134, (byte) 181, (byte) 117,
|
||||
(byte) 115, (byte) 168, (byte) 90, (byte) 219, (byte) 204, (byte) 161, (byte) 214, (byte) 73, (byte) 146,
|
||||
(byte) 51, (byte) 151, (byte) 144, (byte) 99, (byte) 115, (byte) 1, (byte) 192, (byte) 12, (byte) 6,
|
||||
(byte) 121, (byte) 244, (byte) 197, (byte) 114, (byte) 210, (byte) 182, (byte) 162, (byte) 187, (byte) 124,
|
||||
(byte) 152, (byte) 226, (byte) 101, (byte) 11, (byte) 243, (byte) 229, (byte) 246, (byte) 252, (byte) 222,
|
||||
(byte) 221, (byte) 120, (byte) 171, (byte) 218, (byte) 20, (byte) 215, (byte) 103, (byte) 95, (byte) 211,
|
||||
(byte) 146, (byte) 107, (byte) 95, (byte) 45, (byte) 126, (byte) 215, (byte) 15, (byte) 204, (byte) 31,
|
||||
(byte) 112, (byte) 255, (byte) 0, (byte) 88, (byte) 190, (byte) 194, (byte) 165, (byte) 164, (byte) 23,
|
||||
(byte) 61, (byte) 49, (byte) 34, (byte) 72, (byte) 163, (byte) 84, (byte) 69, (byte) 10, (byte) 160,
|
||||
(byte) 96, (byte) 40, (byte) 24, (byte) 0, (byte) 82, (byte) 17, (byte) 252, (byte) 234, (byte) 96,
|
||||
(byte) 50, (byte) 128, (byte) 251, (byte) 85, (byte) 123, (byte) 169, (byte) 225, (byte) 182, (byte) 129,
|
||||
(byte) 230, (byte) 158, (byte) 69, (byte) 138, (byte) 40, (byte) 198, (byte) 89, (byte) 152, (byte) 224,
|
||||
(byte) 10, (byte) 230, (byte) 53, (byte) 47, (byte) 104, (byte) 132, (byte) 13, (byte) 81, (byte) 51,
|
||||
(byte) 221, (byte) 88, (byte) 15, (byte) 202, (byte) 138, (byte) 161, (byte) 225, (byte) 221, (byte) 62,
|
||||
(byte) 255, (byte) 0, (byte) 87, (byte) 212, (byte) 33, (byte) 213, (byte) 231, (byte) 243, (byte) 44,
|
||||
(byte) 244, (byte) 248, (byte) 78, (byte) 235, (byte) 104, (byte) 72, (byte) 195, (byte) 206, (byte) 113,
|
||||
(byte) 141, (byte) 205, (byte) 232, (byte) 190, (byte) 131, (byte) 243, (byte) 246, (byte) 43, (byte) 88,
|
||||
(byte) 232, (byte) 181, (byte) 33, (byte) 157, (byte) 85, (byte) 237, (byte) 220, (byte) 22, (byte) 216,
|
||||
(byte) 251, (byte) 66, (byte) 72, (byte) 83, (byte) 25, (byte) 222, (byte) 177, (byte) 150, (byte) 11,
|
||||
(byte) 245, (byte) 199, (byte) 74, (byte) 170, (byte) 154, (byte) 158, (byte) 143, (byte) 41, (byte) 194,
|
||||
(byte) 222, (byte) 70, (byte) 173, (byte) 220, (byte) 59, (byte) 21, (byte) 35, (byte) 240, (byte) 61,
|
||||
(byte) 43, (byte) 86, (byte) 177, (byte) 117, (byte) 63, (byte) 13, (byte) 165, (byte) 235, (byte) 249,
|
||||
(byte) 182, (byte) 183, (byte) 114, (byte) 88, (byte) 200, (byte) 78, (byte) 91, (byte) 98, (byte) 171,
|
||||
(byte) 163, (byte) 127, (byte) 192, (byte) 72, (byte) 224, (byte) 253, (byte) 49, (byte) 78, (byte) 200,
|
||||
(byte) 69, (byte) 216, (byte) 141, (byte) 165, (byte) 193, (byte) 255, (byte) 0, (byte) 71, (byte) 186,
|
||||
(byte) 142, (byte) 67, (byte) 219, (byte) 99, (byte) 131, (byte) 252, (byte) 169, (byte) 205, (byte) 103,
|
||||
(byte) 201, (byte) 109, (byte) 192, (byte) 177, (byte) 234, (byte) 72, (byte) 228, (byte) 215, (byte) 51,
|
||||
(byte) 55, (byte) 133, (byte) 181, (byte) 193, (byte) 247, (byte) 47, (byte) 244, (byte) 251, (byte) 128,
|
||||
(byte) 58, (byte) 9, (byte) 173, (byte) 221, (byte) 79, (byte) 232, (byte) 216, (byte) 253, (byte) 42,
|
||||
(byte) 31, (byte) 236, (byte) 175, (byte) 18, (byte) 218, (byte) 255, (byte) 0, (byte) 171, (byte) 211,
|
||||
(byte) 173, (byte) 155, (byte) 31, (byte) 197, (byte) 109, (byte) 122, (byte) 99, (byte) 63, (byte) 150,
|
||||
(byte) 223, (byte) 235, (byte) 71, (byte) 42, (byte) 29, (byte) 217, (byte) 208, (byte) 79, (byte) 161,
|
||||
(byte) 199, (byte) 60, (byte) 134, (byte) 82, (byte) 89, (byte) 93, (byte) 186, (byte) 178, (byte) 185,
|
||||
(byte) 244, (byte) 199, (byte) 126, (byte) 59, (byte) 85, (byte) 89, (byte) 60, (byte) 58, (byte) 88,
|
||||
(byte) 96, (byte) 79, (byte) 43, (byte) 15, (byte) 250, (byte) 106, (byte) 21, (byte) 135, (byte) 233,
|
||||
(byte) 138, (byte) 199, (byte) 55, (byte) 190, (byte) 35, (byte) 182, (byte) 63, (byte) 61, (byte) 142,
|
||||
(byte) 176, (byte) 152, (byte) 234, (byte) 35, (byte) 242, (byte) 231, (byte) 95, (byte) 204, (byte) 146,
|
||||
(byte) 105, (byte) 195, (byte) 197, (byte) 247, (byte) 86, (byte) 223, (byte) 241, (byte) 242, (byte) 215,
|
||||
(byte) 49, (byte) 30, (byte) 255, (byte) 0, (byte) 104, (byte) 177, (byte) 112, (byte) 63, (byte) 48,
|
||||
(byte) 160, (byte) 126, (byte) 180, (byte) 185, (byte) 16, (byte) 249, (byte) 153, (byte) 106, (byte) 79,
|
||||
(byte) 11, (byte) 47, (byte) 95, (byte) 46, (byte) 217, (byte) 207, (byte) 253, (byte) 123, (byte) 108,
|
||||
(byte) 253, (byte) 121, (byte) 170, (byte) 146, (byte) 120, (byte) 85, (byte) 59, (byte) 219, (byte) 64,
|
||||
(byte) 73, (byte) 254, (byte) 228, (byte) 207, (byte) 159, (byte) 200, (byte) 224, (byte) 85, (byte) 136,
|
||||
(byte) 188, (byte) 117, (byte) 1, (byte) 225, (byte) 174, (byte) 244, (byte) 246, (byte) 99, (byte) 252,
|
||||
(byte) 38, (byte) 79, (byte) 44, (byte) 254, (byte) 68, (byte) 154, (byte) 209, (byte) 139, (byte) 196,
|
||||
(byte) 194, (byte) 84, (byte) 207, (byte) 216, (byte) 252, (byte) 193, (byte) 216, (byte) 67, (byte) 40,
|
||||
(byte) 124, (byte) 254, (byte) 96, (byte) 15, (byte) 214, (byte) 151, (byte) 32, (byte) 115, (byte) 28,
|
||||
(byte) 228, (byte) 190, (byte) 18, (byte) 5, (byte) 24, (byte) 27, (byte) 107, (byte) 133, (byte) 82,
|
||||
(byte) 48, (byte) 64, (byte) 146, (byte) 50, (byte) 63, (byte) 46, (byte) 77, (byte) 55, (byte) 73,
|
||||
(byte) 240, (byte) 230, (byte) 172, (byte) 111, (byte) 110, (byte) 110, (byte) 103, (byte) 185, (byte) 48,
|
||||
(byte) 172, (byte) 108, (byte) 241, (byte) 192, (byte) 38, (byte) 82, (byte) 204, (byte) 232, (byte) 72,
|
||||
(byte) 231, (byte) 253, (byte) 145, (byte) 242, (byte) 143, (byte) 199, (byte) 61, (byte) 59, (byte) 245,
|
||||
(byte) 81, (byte) 248, (byte) 130, (byte) 193, (byte) 254, (byte) 253, (byte) 172, (byte) 209, (byte) 99,
|
||||
(byte) 174, (byte) 228, (byte) 94, (byte) 63, (byte) 34, (byte) 106, (byte) 117, (byte) 213, (byte) 180,
|
||||
(byte) 167, (byte) 255, (byte) 0, (byte) 150, (byte) 165, (byte) 127, (byte) 222, (byte) 71, (byte) 31,
|
||||
(byte) 210, (byte) 151, (byte) 35, (byte) 31, (byte) 49, (byte) 206, (byte) 71, (byte) 225, (byte) 235,
|
||||
(byte) 232, (byte) 99, (byte) 49, (byte) 175, (byte) 216, (byte) 221, (byte) 76, (byte) 143, (byte) 38,
|
||||
(byte) 30, (byte) 70, (byte) 234, (byte) 204, (byte) 91, (byte) 166, (byte) 223, (byte) 124, (byte) 126,
|
||||
(byte) 21, (byte) 47, (byte) 135, (byte) 188, (byte) 48, (byte) 154, (byte) 76, (byte) 179, (byte) 93,
|
||||
(byte) 207, (byte) 181, (byte) 238, (byte) 100, (byte) 118, (byte) 217, (byte) 180, (byte) 252, (byte) 177,
|
||||
(byte) 169, (byte) 61, (byte) 184, (byte) 228, (byte) 145, (byte) 140, (byte) 159, (byte) 192, (byte) 119,
|
||||
(byte) 39, (byte) 163, (byte) 91, (byte) 189, (byte) 57, (byte) 248, (byte) 75, (byte) 216, (byte) 24,
|
||||
(byte) 158, (byte) 194, (byte) 85, (byte) 205, (byte) 76, (byte) 45, (byte) 209, (byte) 134, (byte) 84,
|
||||
(byte) 130, (byte) 15, (byte) 124, (byte) 102, (byte) 151, (byte) 43, (byte) 14, (byte) 100, (byte) 84,
|
||||
(byte) 219, (byte) 207, (byte) 184, (byte) 170, (byte) 151, (byte) 247, (byte) 43, (byte) 12, (byte) 100,
|
||||
(byte) 117, (byte) 61, (byte) 14, (byte) 63, (byte) 149, (byte) 106, (byte) 61, (byte) 190, (byte) 216,
|
||||
(byte) 216, (byte) 134, (byte) 3, (byte) 3, (byte) 60, (byte) 10, (byte) 229, (byte) 238, (byte) 93,
|
||||
(byte) 166, (byte) 148, (byte) 147, (byte) 156, (byte) 3, (byte) 128, (byte) 42, (byte) 90, (byte) 177,
|
||||
(byte) 73, (byte) 220, (byte) 169, (byte) 41, (byte) 105, (byte) 92, (byte) 187, (byte) 117, (byte) 53,
|
||||
(byte) 3, (byte) 165, (byte) 91, (byte) 43, (byte) 219, (byte) 244, (byte) 172, (byte) 248, (byte) 228,
|
||||
(byte) 187, (byte) 214, (byte) 47, (byte) 26, (byte) 195, (byte) 68, (byte) 69, (byte) 145, (byte) 208,
|
||||
(byte) 226, (byte) 107, (byte) 182, (byte) 25, (byte) 138, (byte) 15, (byte) 254, (byte) 41, (byte) 189,
|
||||
(byte) 191, (byte) 62, (byte) 132, (byte) 80, (byte) 149, (byte) 193, (byte) 153, (byte) 186, (byte) 246,
|
||||
(byte) 211, (byte) 164, (byte) 94, (byte) 219, (byte) 161, (byte) 221, (byte) 57, (byte) 133, (byte) 29,
|
||||
(byte) 34, (byte) 31, (byte) 120, (byte) 129, (byte) 52, (byte) 121, (byte) 56, (byte) 244, (byte) 255,
|
||||
(byte) 0, (byte) 3, (byte) 88, (byte) 87, (byte) 54, (byte) 90, (byte) 91, (byte) 70, (byte) 162,
|
||||
(byte) 29, (byte) 118, (byte) 25, (byte) 153, (byte) 3, (byte) 62, (byte) 193, (byte) 98, (byte) 97,
|
||||
(byte) 125, (byte) 193, (byte) 51, (byte) 140, (byte) 224, (byte) 100, (byte) 18, (byte) 161, (byte) 112,
|
||||
(byte) 79, (byte) 4, (byte) 231, (byte) 28, (byte) 147, (byte) 94, (byte) 181, (byte) 166, (byte) 120,
|
||||
(byte) 67, (byte) 75, (byte) 177, (byte) 179, (byte) 120, (byte) 102, (byte) 139, (byte) 237, (byte) 147,
|
||||
(byte) 79, (byte) 131, (byte) 61, (byte) 196, (byte) 220, (byte) 188, (byte) 135, (byte) 235, (byte) 216,
|
||||
(byte) 123, (byte) 10, (byte) 124, (byte) 222, (byte) 19, (byte) 211, (byte) 93, (byte) 54, (byte) 196,
|
||||
(byte) 247, (byte) 80, (byte) 127, (byte) 185, (byte) 59, (byte) 17, (byte) 244, (byte) 195, (byte) 100,
|
||||
(byte) 126, (byte) 149, (byte) 180, (byte) 116, (byte) 86, (byte) 51, (byte) 111, (byte) 83, (byte) 197,
|
||||
(byte) 26, (byte) 12, (byte) 188, (byte) 108, (byte) 73, (byte) 83, (byte) 27, (byte) 110, (byte) 7,
|
||||
(byte) 29, (byte) 240, (byte) 71, (byte) 245, (byte) 171, (byte) 34, (byte) 95, (byte) 246, (byte) 114,
|
||||
(byte) 58, (byte) 115, (byte) 197, (byte) 122, (byte) 140, (byte) 190, (byte) 2, (byte) 183, (byte) 111,
|
||||
(byte) 185, (byte) 120, (byte) 157, (byte) 115, (byte) 137, (byte) 44, (byte) 45, (byte) 219, (byte) 245,
|
||||
(byte) 8, (byte) 15, (byte) 235, (byte) 84, (byte) 102, (byte) 248, (byte) 124, (byte) 255, (byte) 0,
|
||||
(byte) 193, (byte) 253, (byte) 157, (byte) 39, (byte) 185, (byte) 142, (byte) 116, (byte) 63, (byte) 248,
|
||||
(byte) 236, (byte) 184, (byte) 253, (byte) 42, (byte) 249, (byte) 137, (byte) 177, (byte) 196, (byte) 232,
|
||||
(byte) 250, (byte) 116, (byte) 26, (byte) 133, (byte) 196, (byte) 177, (byte) 207, (byte) 36, (byte) 232,
|
||||
(byte) 171, (byte) 30, (byte) 71, (byte) 145, (byte) 24, (byte) 115, (byte) 156, (byte) 129, (byte) 158,
|
||||
(byte) 189, (byte) 6, (byte) 106, (byte) 118, (byte) 183, (byte) 142, (byte) 203, (byte) 197, (byte) 22,
|
||||
(byte) 241, (byte) 195, (byte) 191, (byte) 202, (byte) 23, (byte) 49, (byte) 58, (byte) 110, (byte) 77,
|
||||
(byte) 188, (byte) 22, (byte) 7, (byte) 212, (byte) 156, (byte) 3, (byte) 145, (byte) 215, (byte) 181,
|
||||
(byte) 116, (byte) 167, (byte) 193, (byte) 23, (byte) 246, (byte) 239, (byte) 190, (byte) 11, (byte) 82,
|
||||
(byte) 174, (byte) 58, (byte) 61, (byte) 174, (byte) 163, (byte) 229, (byte) 159, (byte) 195, (byte) 116,
|
||||
(byte) 68, (byte) 255, (byte) 0, (byte) 227, (byte) 213, (byte) 93, (byte) 188, (byte) 35, (byte) 173,
|
||||
(byte) 155, (byte) 184, (byte) 238, (byte) 166, (byte) 183, (byte) 184, (byte) 118, (byte) 71, (byte) 83,
|
||||
(byte) 243, (byte) 92, (byte) 164, (byte) 206, (byte) 66, (byte) 158, (byte) 57, (byte) 37, (byte) 106,
|
||||
(byte) 44, (byte) 249, (byte) 249, (byte) 175, (byte) 167, (byte) 99, (byte) 75, (byte) 195, (byte) 146,
|
||||
(byte) 214, (byte) 215, (byte) 189, (byte) 255, (byte) 0, (byte) 67, (byte) 110, (byte) 238, (byte) 242,
|
||||
(byte) 223, (byte) 79, (byte) 178, (byte) 251, (byte) 69, (byte) 204, (byte) 155, (byte) 16, (byte) 0,
|
||||
(byte) 56, (byte) 25, (byte) 44, (byte) 79, (byte) 64, (byte) 7, (byte) 114, (byte) 125, (byte) 41,
|
||||
(byte) 52, (byte) 127, (byte) 14, (byte) 220, (byte) 106, (byte) 247, (byte) 17, (byte) 234, (byte) 154,
|
||||
(byte) 236, (byte) 94, (byte) 92, (byte) 40, (byte) 119, (byte) 91, (byte) 88, (byte) 30, (byte) 139,
|
||||
(byte) 232, (byte) 242, (byte) 122, (byte) 183, (byte) 183, (byte) 111, (byte) 207, (byte) 55, (byte) 52,
|
||||
(byte) 95, (byte) 13, (byte) 204, (byte) 247, (byte) 73, (byte) 171, (byte) 107, (byte) 155, (byte) 94,
|
||||
(byte) 237, (byte) 127, (byte) 212, (byte) 91, (byte) 41, (byte) 204, (byte) 118, (byte) 163, (byte) 219,
|
||||
(byte) 213, (byte) 189, (byte) 91, (byte) 250, (byte) 99, (byte) 29, (byte) 53, (byte) 76, (byte) 99,
|
||||
(byte) 97, (byte) 54, (byte) 0, (byte) 1, (byte) 192, (byte) 224, (byte) 81, (byte) 75, (byte) 69,
|
||||
(byte) 89, (byte) 33, (byte) 69, (byte) 20, (byte) 80, (byte) 1, (byte) 73, (byte) 69, (byte) 20, (byte) 0,
|
||||
(byte) 180, (byte) 152, (byte) 207, (byte) 90, (byte) 40, (byte) 160, (byte) 10, (byte) 243, (byte) 88,
|
||||
(byte) 89, (byte) 220, (byte) 12, (byte) 77, (byte) 105, (byte) 4, (byte) 128, (byte) 255, (byte) 0,
|
||||
(byte) 122, (byte) 48, (byte) 107, (byte) 54, (byte) 111, (byte) 7, (byte) 120, (byte) 114, (byte) 115,
|
||||
(byte) 185, (byte) 244, (byte) 123, (byte) 96, (byte) 222, (byte) 168, (byte) 155, (byte) 79, (byte) 233,
|
||||
(byte) 69, (byte) 20, (byte) 1, (byte) 89, (byte) 188, (byte) 17, (byte) 165, (byte) 143, (byte) 248,
|
||||
(byte) 247, (byte) 184, (byte) 212, (byte) 45, (byte) 135, (byte) 101, (byte) 138, (byte) 241, (byte) 246,
|
||||
(byte) 143, (byte) 192, (byte) 146, (byte) 42, (byte) 7, (byte) 240, (byte) 93, (byte) 194, (byte) 255,
|
||||
(byte) 0, (byte) 199, (byte) 182, (byte) 191, (byte) 118, (byte) 163, (byte) 178, (byte) 205, (byte) 20,
|
||||
(byte) 114, (byte) 126, (byte) 187, (byte) 115, (byte) 69, (byte) 20, (byte) 92, (byte) 8, (byte) 31,
|
||||
(byte) 194, (byte) 254, (byte) 32, (byte) 143, (byte) 136, (byte) 181, (byte) 27, (byte) 9, (byte) 215,
|
||||
(byte) 210, (byte) 88, (byte) 29, (byte) 79, (byte) 232, (byte) 216, (byte) 253, (byte) 42, (byte) 164,
|
||||
(byte) 154, (byte) 39, (byte) 136, (byte) 225, (byte) 231, (byte) 251, (byte) 54, (byte) 218, (byte) 95,
|
||||
(byte) 246, (byte) 173, (byte) 175, (byte) 154, (byte) 35, (byte) 255, (byte) 0, (byte) 160, (byte) 231,
|
||||
(byte) 245, (byte) 162, (byte) 138, (byte) 119, (byte) 1, (byte) 26, (byte) 125, (byte) 122, (byte) 216,
|
||||
(byte) 98, (byte) 77, (byte) 47, (byte) 88, (byte) 140, (byte) 142, (byte) 134, (byte) 23, (byte) 89,
|
||||
(byte) 64, (byte) 252, (byte) 11, (byte) 16, (byte) 127, (byte) 21, (byte) 52, (byte) 209, (byte) 173,
|
||||
(byte) 100, (byte) 236, (byte) 187, (byte) 211, (byte) 111, (byte) 195, (byte) 147, (byte) 247, (byte) 163,
|
||||
(byte) 178, (byte) 144, (byte) 17, (byte) 245, (byte) 24, (byte) 193, (byte) 247, (byte) 32, (byte) 253,
|
||||
(byte) 5, (byte) 20, (byte) 82, (byte) 105, (byte) 49, (byte) 167, (byte) 97, (byte) 214, (byte) 218,
|
||||
(byte) 62, (byte) 163, (byte) 226, (byte) 89, (byte) 74, (byte) 186, (byte) 207, (byte) 167, (byte) 105,
|
||||
(byte) 32, (byte) 225, (byte) 153, (byte) 148, (byte) 164, (byte) 247, (byte) 62, (byte) 192, (byte) 117,
|
||||
(byte) 69, (byte) 253, (byte) 79, (byte) 183, (byte) 34, (byte) 187, (byte) 75, (byte) 13, (byte) 62,
|
||||
(byte) 211, (byte) 75, (byte) 179, (byte) 142, (byte) 210, (byte) 202, (byte) 4, (byte) 130, (byte) 24,
|
||||
(byte) 198, (byte) 21, (byte) 84, (byte) 81, (byte) 69, (byte) 36, (byte) 172, (byte) 13, (byte) 220,
|
||||
(byte) 181, (byte) 69, (byte) 20, (byte) 83, (byte) 16, (byte) 81, (byte) 69, (byte) 20, (byte) 0,
|
||||
(byte) 148, (byte) 81, (byte) 69, (byte) 0, (byte) 45, (byte) 20, (byte) 81, (byte) 64, (byte) 5,
|
||||
(byte) 20, (byte) 81, (byte) 64, (byte) 31, (byte) 255, (byte) 217
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -35,10 +35,11 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.flashcode;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
public interface FlashCodeUtils {
|
||||
|
||||
public BufferedImage exportFlashcode(String s);
|
||||
public BufferedImage exportFlashcode(String s, Color fore, Color back);
|
||||
|
||||
}
|
||||
|
@ -35,11 +35,12 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.flashcode;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
public class FlashCodeUtilsNone implements FlashCodeUtils {
|
||||
|
||||
public BufferedImage exportFlashcode(String s) {
|
||||
public BufferedImage exportFlashcode(String s, Color fore, Color back) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -35,11 +35,11 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.flashcode;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
|
||||
import ext.plantuml.com.google.zxing.BarcodeFormat;
|
||||
import ext.plantuml.com.google.zxing.EncodeHintType;
|
||||
import ext.plantuml.com.google.zxing.WriterException;
|
||||
@ -52,7 +52,7 @@ public class FlashCodeUtilsZxing implements FlashCodeUtils {
|
||||
|
||||
private static final boolean USE_FLASH = true;
|
||||
|
||||
public BufferedImage exportFlashcode(String s) {
|
||||
public BufferedImage exportFlashcode(String s, Color fore, Color back) {
|
||||
if (USE_FLASH == false) {
|
||||
return null;
|
||||
}
|
||||
@ -63,7 +63,7 @@ public class FlashCodeUtilsZxing implements FlashCodeUtils {
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "UTF8");
|
||||
final int multiple = 1;
|
||||
final BitMatrix bit = writer.encode(s, BarcodeFormat.QR_CODE, multiple, hints);
|
||||
return MatrixToImageWriter.toBufferedImage(bit);
|
||||
return MatrixToImageWriter.toBufferedImage(bit, fore.getRGB() | 0xFF000000, back.getRGB() | 0xFF000000);
|
||||
} catch (WriterException e) {
|
||||
Log.debug("Cannot create flashcode " + e);
|
||||
// e.printStackTrace();
|
||||
|
@ -105,7 +105,7 @@ class EmbededSystemLine extends AbstractTextBlock implements Line {
|
||||
}
|
||||
|
||||
private Diagram getSystem() throws IOException, InterruptedException {
|
||||
final BlockUml blockUml = new BlockUml(lines2, 0, Defines.createEmpty());
|
||||
final BlockUml blockUml = new BlockUml(lines2, Defines.createEmpty());
|
||||
return blockUml.getDiagram();
|
||||
|
||||
}
|
||||
|
@ -254,12 +254,13 @@ public class QuoteUtils {
|
||||
"Lbh xabj jung fhecevfrq zr gur zbfg? Vg jnfa'g zrrgvat gurz. Vg jnf zrrgvat lbh.",
|
||||
"Va jne gurer ner ab jvaaref, bayl jvqbjf",
|
||||
"Vs lbh guvax guvf Havirefr vf onq, lbh fubhyq frr fbzr bs gur bguref", "Cnp-Zna'f n onq thl?",
|
||||
"Zl ernyvgl vf whfg qvssrerag guna lbhef",
|
||||
"Uvfgbel vf n avtugzner sebz juvpu V nz gelvat gb njnxr",
|
||||
"L'ra n dh'bag rffnlr, vyf bag rh qrf ceboyrzrf",
|
||||
"Zl ernyvgl vf whfg qvssrerag guna lbhef", "L'ra n dh'bag rffnlr, vyf bag rh qrf ceboyrzrf",
|
||||
"Gb ree vf uhzna, ohg gb ernyyl sbhy guvatf hc erdhverf n pbzchgre.",
|
||||
"Vs lbh oryvrir rirelguvat lbh ernq, lbh orggre abg ernq",
|
||||
"Gurer vf ab ceboyrz fb onq lbh pna'g znxr vg jbefr");
|
||||
"Gurer vf ab ceboyrz fb onq lbh pna'g znxr vg jbefr", "Pn p'rfg qh ybheq... Ha gehp qr znynqr.",
|
||||
"V qb abg guvax, gung V guvax.. V guvax.", "Gurer ner cynprf ybjre guna gur onfrzrag",
|
||||
"Gurer ner 10 glcrf bs crbcyr: gubfr jub haqrefgnaq ovanel, naq gubfr jub qba'g.",
|
||||
"Cyrnfr zvaq gur tnc orgjrra gur genva naq gur cyngsbez");
|
||||
|
||||
private QuoteUtils() {
|
||||
}
|
||||
|
@ -54,10 +54,12 @@ import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.posimo.Positionable;
|
||||
import net.sourceforge.plantuml.posimo.PositionableImpl;
|
||||
import net.sourceforge.plantuml.skin.rose.Rose;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.LimitFinder;
|
||||
import net.sourceforge.plantuml.ugraphic.MinMax;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.UImage;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
|
||||
public class TextBlockUtils {
|
||||
@ -165,7 +167,7 @@ public class TextBlockUtils {
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
return bloc.calculateDimension(stringBounder);
|
||||
}
|
||||
|
||||
|
||||
public MinMax getMinMax(StringBounder stringBounder) {
|
||||
return bloc.getMinMax(stringBounder);
|
||||
}
|
||||
@ -181,4 +183,50 @@ public class TextBlockUtils {
|
||||
};
|
||||
}
|
||||
|
||||
public static TextBlockBackcolored addBackcolor(final TextBlock text, final HtmlColor backColor) {
|
||||
return new TextBlockBackcolored() {
|
||||
public void drawU(UGraphic ug) {
|
||||
text.drawU(ug);
|
||||
}
|
||||
|
||||
public MinMax getMinMax(StringBounder stringBounder) {
|
||||
return text.getMinMax(stringBounder);
|
||||
}
|
||||
|
||||
public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
|
||||
return text.getInnerPosition(member, stringBounder, strategy);
|
||||
}
|
||||
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
return text.calculateDimension(stringBounder);
|
||||
}
|
||||
|
||||
public HtmlColor getBackcolor() {
|
||||
return backColor;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static TextBlock fromUImage(final UImage image) {
|
||||
return new TextBlock() {
|
||||
|
||||
public void drawU(UGraphic ug) {
|
||||
ug.draw(image);
|
||||
}
|
||||
|
||||
public Dimension2D calculateDimension(StringBounder stringBounder) {
|
||||
return new Dimension2DDouble(image.getWidth(), image.getHeight());
|
||||
}
|
||||
|
||||
public MinMax getMinMax(StringBounder stringBounder) {
|
||||
return MinMax.fromMax(image.getWidth(), image.getHeight());
|
||||
}
|
||||
|
||||
public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -45,6 +45,12 @@ public abstract class UGraphicDelegator implements UGraphic {
|
||||
|
||||
final private UGraphic ug;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " " + getUg().toString();
|
||||
}
|
||||
|
||||
|
||||
public final boolean matchesProperty(String propertyName) {
|
||||
return ug.matchesProperty(propertyName);
|
||||
}
|
||||
|
@ -153,4 +153,8 @@ public class ScientificEquationSafe {
|
||||
return null;
|
||||
}
|
||||
|
||||
public final String getFormula() {
|
||||
return formula;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -177,9 +177,9 @@ public class Defines implements Truth {
|
||||
}
|
||||
|
||||
public void saveState() {
|
||||
if (savedState.size() > 0) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
// if (savedState.size() > 0) {
|
||||
// throw new IllegalStateException();
|
||||
// }
|
||||
this.savedState.putAll(values);
|
||||
|
||||
}
|
||||
|
@ -37,8 +37,6 @@
|
||||
package net.sourceforge.plantuml.preproc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
@ -48,25 +46,28 @@ import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import net.sourceforge.plantuml.FileSystem;
|
||||
import net.sourceforge.plantuml.AFile;
|
||||
import net.sourceforge.plantuml.AFileRegular;
|
||||
import net.sourceforge.plantuml.AParentFolder;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
|
||||
public class FileWithSuffix {
|
||||
|
||||
private final File file;
|
||||
private final AFile file;
|
||||
private final String suffix;
|
||||
private final String entry;
|
||||
private final String description;
|
||||
|
||||
public Reader getReader(String charset) throws IOException {
|
||||
if (entry == null) {
|
||||
if (charset == null) {
|
||||
Log.info("Using default charset");
|
||||
return new FileReader(file);
|
||||
return new InputStreamReader(file.open());
|
||||
}
|
||||
Log.info("Using charset " + charset);
|
||||
return new InputStreamReader(new FileInputStream(file), charset);
|
||||
return new InputStreamReader(file.open(), charset);
|
||||
}
|
||||
final InputStream is = getDataFromZip(file, entry);
|
||||
final InputStream is = getDataFromZip(file.open(), entry);
|
||||
if (is == null) {
|
||||
return null;
|
||||
}
|
||||
@ -78,8 +79,8 @@ public class FileWithSuffix {
|
||||
return new InputStreamReader(is, charset);
|
||||
}
|
||||
|
||||
private InputStream getDataFromZip(File f, String name) throws IOException {
|
||||
final ZipInputStream zis = new ZipInputStream(new FileInputStream(f));
|
||||
private InputStream getDataFromZip(InputStream is, String name) throws IOException {
|
||||
final ZipInputStream zis = new ZipInputStream(is);
|
||||
ZipEntry ze = zis.getNextEntry();
|
||||
|
||||
while (ze != null) {
|
||||
@ -96,28 +97,37 @@ public class FileWithSuffix {
|
||||
}
|
||||
|
||||
public boolean fileOk() {
|
||||
if (file.exists() == false || file.isDirectory()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return file != null && file.isOk();
|
||||
}
|
||||
|
||||
public FileWithSuffix(File file, String suffix) {
|
||||
this.file = file;
|
||||
this.file = new AFileRegular(file);
|
||||
this.suffix = suffix;
|
||||
this.entry = null;
|
||||
this.description = file.getAbsolutePath();
|
||||
}
|
||||
|
||||
public FileWithSuffix(String fileName, String suffix) throws IOException {
|
||||
public FileWithSuffix(ImportedFiles importedFiles, String fileName, String suffix) throws IOException {
|
||||
final int idx = fileName.indexOf('~');
|
||||
this.suffix = suffix;
|
||||
if (idx == -1) {
|
||||
this.file = FileSystem.getInstance().getFile(fileName);
|
||||
this.file = importedFiles.getAFile(fileName);
|
||||
this.entry = null;
|
||||
} else {
|
||||
this.file = FileSystem.getInstance().getFile(fileName.substring(0, idx));
|
||||
this.file = importedFiles.getAFile(fileName.substring(0, idx));
|
||||
this.entry = fileName.substring(idx + 1);
|
||||
}
|
||||
|
||||
if (file == null) {
|
||||
this.description = fileName;
|
||||
} else if (entry == null) {
|
||||
// this.description = file.getAbsolutePath();
|
||||
this.description = fileName;
|
||||
} else {
|
||||
// this.description = file.getAbsolutePath() + "~" + entry;
|
||||
this.description = fileName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -155,24 +165,17 @@ public class FileWithSuffix {
|
||||
public static Set<File> convert(Set<FileWithSuffix> all) {
|
||||
final Set<File> result = new HashSet<File>();
|
||||
for (FileWithSuffix f : all) {
|
||||
result.add(f.file);
|
||||
result.add(f.file.getUnderlyingFile());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public final File getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public File getParentFile() {
|
||||
public AParentFolder getParentFile() {
|
||||
return file.getParentFile();
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
if (entry == null) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
return file.getAbsolutePath() + "~" + entry;
|
||||
return description;
|
||||
}
|
||||
|
||||
public final String getSuffix() {
|
||||
|
@ -43,7 +43,7 @@ import net.sourceforge.plantuml.command.regex.MyPattern;
|
||||
import net.sourceforge.plantuml.command.regex.Pattern2;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
class IfManager extends ReadLineInstrumented implements ReadLine {
|
||||
public class IfManager extends ReadLineInstrumented implements ReadLine {
|
||||
|
||||
protected static final Pattern2 ifdefPattern = MyPattern.cmpile("^[%s]*!if(n)?def[%s]+(.+)$");
|
||||
protected static final Pattern2 ifcomparePattern = MyPattern
|
||||
|
66
src/net/sourceforge/plantuml/preproc/IfManagerFilter.java
Normal file
66
src/net/sourceforge/plantuml/preproc/IfManagerFilter.java
Normal file
@ -0,0 +1,66 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.preproc2.ReadFilter;
|
||||
|
||||
public class IfManagerFilter implements ReadFilter {
|
||||
|
||||
private final Defines defines;
|
||||
|
||||
public IfManagerFilter(Defines defines) {
|
||||
this.defines = defines;
|
||||
}
|
||||
|
||||
public ReadLine applyFilter(final ReadLine source) {
|
||||
return new ReadLine() {
|
||||
|
||||
final IfManager ifManager = new IfManager(source, defines);
|
||||
|
||||
public void close() throws IOException {
|
||||
source.close();
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
return ifManager.readLine();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
105
src/net/sourceforge/plantuml/preproc/ImportedFiles.java
Normal file
105
src/net/sourceforge/plantuml/preproc/ImportedFiles.java
Normal file
@ -0,0 +1,105 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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
|
||||
* Modified by: Nicolas Jouanin
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.preproc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.AFile;
|
||||
import net.sourceforge.plantuml.AFileRegular;
|
||||
import net.sourceforge.plantuml.AFileZipEntry;
|
||||
import net.sourceforge.plantuml.AParentFolder;
|
||||
import net.sourceforge.plantuml.FileSystem;
|
||||
|
||||
public class ImportedFiles {
|
||||
|
||||
private final List<File> imported = new ArrayList<File>();
|
||||
private AParentFolder currentDir;
|
||||
|
||||
public AFile getAFile(String nameOrPath) throws IOException {
|
||||
final AParentFolder dir = currentDir;
|
||||
if (dir == null || isAbsolute(nameOrPath)) {
|
||||
return new AFileRegular(new File(nameOrPath).getCanonicalFile());
|
||||
}
|
||||
// final File filecurrent = new File(dir.getAbsoluteFile(), nameOrPath);
|
||||
final AFile filecurrent = dir.getAFile(nameOrPath);
|
||||
if (filecurrent != null && filecurrent.isOk()) {
|
||||
return filecurrent;
|
||||
}
|
||||
for (File d : getPath()) {
|
||||
if (d.isDirectory()) {
|
||||
final File file = new File(d, nameOrPath);
|
||||
if (file.exists()) {
|
||||
return new AFileRegular(file.getCanonicalFile());
|
||||
}
|
||||
} else if (d.isFile()) {
|
||||
final AFileZipEntry zipEntry = new AFileZipEntry(d, nameOrPath);
|
||||
if (zipEntry.isOk()) {
|
||||
return zipEntry;
|
||||
}
|
||||
}
|
||||
}
|
||||
return filecurrent;
|
||||
}
|
||||
|
||||
public List<File> getPath() {
|
||||
final List<File> result = new ArrayList<File>(imported);
|
||||
result.addAll(FileSystem.getPath("plantuml.include.path", true));
|
||||
result.addAll(FileSystem.getPath("java.class.path", true));
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean isAbsolute(String nameOrPath) {
|
||||
final File f = new File(nameOrPath);
|
||||
return f.isAbsolute();
|
||||
}
|
||||
|
||||
public void add(File file) {
|
||||
this.imported.add(file);
|
||||
}
|
||||
|
||||
public void setCurrentDir(AParentFolder newCurrentDir) {
|
||||
this.currentDir = newCurrentDir;
|
||||
}
|
||||
|
||||
public AParentFolder getCurrentDir() {
|
||||
return currentDir;
|
||||
}
|
||||
|
||||
}
|
@ -45,7 +45,7 @@ import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.DefinitionsContainer;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
|
||||
public class Preprocessor extends ReadLineInstrumented implements ReadLine {
|
||||
public class Preprocessor extends ReadLineInstrumented implements ReadLineNumbered {
|
||||
|
||||
private final PreprocessorInclude include;
|
||||
private final SubPreprocessor subPreprocessor;
|
||||
@ -80,10 +80,6 @@ public class Preprocessor extends ReadLineInstrumented implements ReadLine {
|
||||
return subPreprocessor.readLine();
|
||||
}
|
||||
|
||||
public int getLineNumber() {
|
||||
return include.getLineNumber();
|
||||
}
|
||||
|
||||
@Override
|
||||
void closeInst() throws IOException {
|
||||
// Log.info("Closing preprocessor of " + description);
|
||||
|
@ -51,6 +51,8 @@ import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.sourceforge.plantuml.AParentFolder;
|
||||
import net.sourceforge.plantuml.AParentFolderRegular;
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.DefinitionsContainer;
|
||||
import net.sourceforge.plantuml.FileSystem;
|
||||
@ -66,6 +68,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
|
||||
private static final Pattern2 includeDefPattern = MyPattern.cmpile("^[%s]*!includedef[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 includePattern = MyPattern.cmpile("^[%s]*!include[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 importPattern = MyPattern.cmpile("^[%s]*!import[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 includePatternStdlib = MyPattern.cmpile("^[%s]*!include[%s]+(\\<[^%g]+\\>)$");
|
||||
private static final Pattern2 includeManyPattern = MyPattern.cmpile("^[%s]*!include_many[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 includeURLPattern = MyPattern.cmpile("^[%s]*!includeurl[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
@ -75,19 +78,20 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
private final Defines defines;
|
||||
private final List<String> config;
|
||||
private final DefinitionsContainer definitionsContainer;
|
||||
private final ImportedFiles importedFiles;
|
||||
|
||||
private int numLine = 0;
|
||||
|
||||
private PreprocessorInclude included = null;
|
||||
|
||||
private final File oldCurrentDir;
|
||||
private final AParentFolder oldCurrentDir;
|
||||
private final Set<FileWithSuffix> filesUsedCurrent;
|
||||
private final Set<FileWithSuffix> filesUsedGlobal;
|
||||
|
||||
public PreprocessorInclude(List<String> config, ReadLine reader, Defines defines, String charset,
|
||||
File newCurrentDir, DefinitionsContainer definitionsContainer) {
|
||||
this(config, reader, defines, charset, newCurrentDir, new HashSet<FileWithSuffix>(),
|
||||
new HashSet<FileWithSuffix>(), definitionsContainer);
|
||||
this(config, reader, defines, charset, new AParentFolderRegular(newCurrentDir), new HashSet<FileWithSuffix>(),
|
||||
new HashSet<FileWithSuffix>(), definitionsContainer, new ImportedFiles());
|
||||
}
|
||||
|
||||
public Set<FileWithSuffix> getFilesUsedGlobal() {
|
||||
@ -95,8 +99,9 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
}
|
||||
|
||||
private PreprocessorInclude(List<String> config, ReadLine reader, Defines defines, String charset,
|
||||
File newCurrentDir, Set<FileWithSuffix> filesUsedCurrent, Set<FileWithSuffix> filesUsedGlobal,
|
||||
DefinitionsContainer definitionsContainer) {
|
||||
AParentFolder newCurrentDir, Set<FileWithSuffix> filesUsedCurrent, Set<FileWithSuffix> filesUsedGlobal,
|
||||
DefinitionsContainer definitionsContainer, ImportedFiles importedFiles) {
|
||||
this.importedFiles = importedFiles;
|
||||
this.config = config;
|
||||
this.defines = defines;
|
||||
this.charset = charset;
|
||||
@ -107,14 +112,14 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
if (newCurrentDir == null) {
|
||||
oldCurrentDir = null;
|
||||
} else {
|
||||
oldCurrentDir = FileSystem.getInstance().getCurrentDir();
|
||||
FileSystem.getInstance().setCurrentDir(newCurrentDir);
|
||||
oldCurrentDir = importedFiles.getCurrentDir();
|
||||
importedFiles.setCurrentDir(newCurrentDir);
|
||||
}
|
||||
}
|
||||
|
||||
private void restoreCurrentDir() {
|
||||
if (oldCurrentDir != null) {
|
||||
FileSystem.getInstance().setCurrentDir(oldCurrentDir);
|
||||
importedFiles.setCurrentDir(oldCurrentDir);
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +129,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
if (result != null && StartUtils.isArobaseStartDiagram(result) && config.size() > 0) {
|
||||
final List<String> empty = new ArrayList<String>();
|
||||
included = new PreprocessorInclude(empty, new ReadLineList(config, result.getLocation()), defines, charset,
|
||||
null, filesUsedCurrent, filesUsedGlobal, definitionsContainer);
|
||||
null, filesUsedCurrent, filesUsedGlobal, definitionsContainer, importedFiles);
|
||||
}
|
||||
if (result != null && (StartUtils.isArobaseEndDiagram(result) || StartUtils.isArobaseStartDiagram(result))) {
|
||||
// http://plantuml.sourceforge.net/qa/?qa=3389/error-generating-when-same-file-included-different-diagram
|
||||
@ -150,6 +155,10 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
}
|
||||
if (s.getPreprocessorError() == null && OptionFlags.ALLOW_INCLUDE) {
|
||||
assert included == null;
|
||||
final Matcher2 m0 = importPattern.matcher(s);
|
||||
if (m0.find()) {
|
||||
return manageFileImport(s, m0);
|
||||
}
|
||||
final Matcher2 m1 = includePattern.matcher(s);
|
||||
if (m1.find()) {
|
||||
return manageFileInclude(s, m1, false);
|
||||
@ -175,6 +184,17 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
return s;
|
||||
}
|
||||
|
||||
private CharSequence2 manageFileImport(CharSequence2 s, Matcher2 m) throws IOException {
|
||||
final String fileName = m.group(1);
|
||||
final File file = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName));
|
||||
if (file.exists() && file.isDirectory() == false) {
|
||||
importedFiles.add(file);
|
||||
return this.readLine();
|
||||
}
|
||||
return s.withErrorPreprocessor("Cannot import " + file.getAbsolutePath());
|
||||
|
||||
}
|
||||
|
||||
private CharSequence2 manageUrlInclude(CharSequence2 s, Matcher2 m) throws IOException {
|
||||
String urlString = m.group(1);
|
||||
urlString = defines.applyDefines(urlString).get(0);
|
||||
@ -186,9 +206,13 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
urlString = urlString.substring(0, idx);
|
||||
}
|
||||
try {
|
||||
if (urlString.toLowerCase().startsWith("https://") == false
|
||||
&& urlString.toLowerCase().startsWith("http://") == false) {
|
||||
return s.withErrorPreprocessor("Cannot include url " + urlString);
|
||||
}
|
||||
final URL url = new URL(urlString);
|
||||
included = new PreprocessorInclude(config, getReaderInclude(url, s, suf), defines, charset, null,
|
||||
filesUsedCurrent, filesUsedGlobal, definitionsContainer);
|
||||
filesUsedCurrent, filesUsedGlobal, definitionsContainer, importedFiles);
|
||||
} catch (MalformedURLException e) {
|
||||
return s.withErrorPreprocessor("Cannot include url " + urlString);
|
||||
}
|
||||
@ -199,7 +223,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
final String definitionName = matcher.group(1);
|
||||
final List<? extends CharSequence> definition = definitionsContainer.getDefinition(definitionName);
|
||||
included = new PreprocessorInclude(config, new ReadLineList(definition, s.getLocation()), defines, charset,
|
||||
null, filesUsedCurrent, filesUsedGlobal, definitionsContainer);
|
||||
null, filesUsedCurrent, filesUsedGlobal, definitionsContainer, importedFiles);
|
||||
return this.readLine();
|
||||
}
|
||||
|
||||
@ -212,7 +236,7 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
return s.withErrorPreprocessor("Cannot include " + fileName);
|
||||
}
|
||||
included = new PreprocessorInclude(config, strlibReader, defines, charset, null, filesUsedCurrent,
|
||||
filesUsedGlobal, definitionsContainer);
|
||||
filesUsedGlobal, definitionsContainer, importedFiles);
|
||||
return this.readLine();
|
||||
}
|
||||
final int idx = fileName.lastIndexOf('!');
|
||||
@ -222,9 +246,9 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
fileName = fileName.substring(0, idx);
|
||||
}
|
||||
// final File f = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName));
|
||||
final FileWithSuffix f2 = new FileWithSuffix(withEnvironmentVariable(fileName), suf);
|
||||
final FileWithSuffix f2 = new FileWithSuffix(importedFiles, withEnvironmentVariable(fileName), suf);
|
||||
if (f2.fileOk() == false) {
|
||||
return s.withErrorPreprocessor("Cannot include " + f2.getFile().getAbsolutePath());
|
||||
return s.withErrorPreprocessor("Cannot include " + f2.getDescription());
|
||||
} else if (allowMany == false && filesUsedCurrent.contains(f2)) {
|
||||
// return CharSequence2Impl.errorPreprocessor("File already included " + f.getAbsolutePath(), lineLocation);
|
||||
return this.readLine();
|
||||
@ -232,11 +256,11 @@ public class PreprocessorInclude extends ReadLineInstrumented implements ReadLin
|
||||
filesUsedCurrent.add(f2);
|
||||
filesUsedGlobal.add(f2);
|
||||
included = new PreprocessorInclude(config, getReaderInclude(f2, s), defines, charset, f2.getParentFile(),
|
||||
filesUsedCurrent, filesUsedGlobal, definitionsContainer);
|
||||
filesUsedCurrent, filesUsedGlobal, definitionsContainer, importedFiles);
|
||||
return this.readLine();
|
||||
}
|
||||
|
||||
static String withEnvironmentVariable(String s) {
|
||||
public static String withEnvironmentVariable(String s) {
|
||||
final Pattern p = Pattern.compile("%(\\w+)%");
|
||||
|
||||
final Matcher m = p.matcher(s);
|
||||
|
43
src/net/sourceforge/plantuml/preproc/ReadLineNumbered.java
Normal file
43
src/net/sourceforge/plantuml/preproc/ReadLineNumbered.java
Normal file
@ -0,0 +1,43 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface ReadLineNumbered extends ReadLine {
|
||||
|
||||
public Set<FileWithSuffix> getFilesUsed();
|
||||
}
|
60
src/net/sourceforge/plantuml/preproc/ReadLineSingle.java
Normal file
60
src/net/sourceforge/plantuml/preproc/ReadLineSingle.java
Normal file
@ -0,0 +1,60 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
|
||||
public class ReadLineSingle implements ReadLine {
|
||||
|
||||
private final CharSequence2 data;
|
||||
private int current = 0;
|
||||
|
||||
public ReadLineSingle(CharSequence2 s2) {
|
||||
this.data = s2;
|
||||
}
|
||||
|
||||
public void close() {
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() {
|
||||
if (current > 0) {
|
||||
return null;
|
||||
}
|
||||
current++;
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
111
src/net/sourceforge/plantuml/preproc2/Preprocessor2.java
Normal file
111
src/net/sourceforge/plantuml/preproc2/Preprocessor2.java
Normal file
@ -0,0 +1,111 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.AParentFolder;
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.DefinitionsContainer;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.IfManagerFilter;
|
||||
import net.sourceforge.plantuml.preproc.ImportedFiles;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineNumbered;
|
||||
|
||||
public class Preprocessor2 implements ReadLineNumbered {
|
||||
|
||||
private final ReadLine source;
|
||||
private final PreprocessorInclude3 include;
|
||||
|
||||
// public Preprocessor2(ReadLine reader, String charset, Defines defines, AParentFolder newCurrentDir,
|
||||
// DefinitionsContainer definitionsContainer) throws IOException {
|
||||
// this(Collections.<String> emptyList(), reader, charset, defines, newCurrentDir, definitionsContainer);
|
||||
// }
|
||||
//
|
||||
// public Preprocessor2(List<String> config, ReadLine reader, String charset, Defines defines, File newCurrentDir,
|
||||
// DefinitionsContainer definitionsContainer) throws IOException {
|
||||
// this(config, reader, charset, defines, new AParentFolderRegular(newCurrentDir), definitionsContainer);
|
||||
// }
|
||||
|
||||
public Preprocessor2(List<String> config, ReadLine reader, String charset, Defines defines,
|
||||
AParentFolder newCurrentDir, DefinitionsContainer definitionsContainer) throws IOException {
|
||||
this(config, reader, charset, defines, newCurrentDir, definitionsContainer, new HashSet<FileWithSuffix>());
|
||||
}
|
||||
|
||||
public Preprocessor2(List<String> config, ReadLine reader, String charset, Defines defines,
|
||||
AParentFolder newCurrentDir, DefinitionsContainer definitionsContainer, Set<FileWithSuffix> filesUsedGlobal)
|
||||
throws IOException {
|
||||
|
||||
final ImportedFiles importedFiles = new ImportedFiles();
|
||||
if (newCurrentDir != null) {
|
||||
importedFiles.setCurrentDir(newCurrentDir);
|
||||
}
|
||||
|
||||
final ReadFilterAnd2 filters = new ReadFilterAnd2();
|
||||
|
||||
filters.add(new ReadLineQuoteComment2());
|
||||
include = new PreprocessorInclude3(config, charset, defines, definitionsContainer, importedFiles,
|
||||
filesUsedGlobal);
|
||||
filters.add(new ReadLineAddConfig2(config));
|
||||
filters.add(new IfManagerFilter(defines));
|
||||
filters.add(new PreprocessorDefine4Apply(defines));
|
||||
filters.add(new SubPreprocessor2(charset, defines, definitionsContainer));
|
||||
filters.add(new PreprocessorDefine3Learner(defines));
|
||||
filters.add(include);
|
||||
|
||||
this.source = filters.applyFilter(reader);
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
return source.readLine();
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
this.source.close();
|
||||
}
|
||||
|
||||
public Set<FileWithSuffix> getFilesUsed() {
|
||||
// System.err.println("************************** WARNING **************************");
|
||||
// return Collections.emptySet();
|
||||
return Collections.unmodifiableSet(include.getFilesUsedGlobal());
|
||||
}
|
||||
}
|
@ -0,0 +1,241 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
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.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
public class PreprocessorDefine3Learner implements ReadFilter {
|
||||
|
||||
private static final String END_DEFINE_LONG = "!enddefinelong";
|
||||
private static final String ID = "[A-Za-z_][A-Za-z_0-9]*";
|
||||
private static final String ID_ARG = "\\s*[A-Za-z_][A-Za-z_0-9]*\\s*(?:=\\s*(?:\"[^\"]*\"|'[^']*')\\s*)?";
|
||||
private static final String ARG = "(?:\\(" + ID_ARG + "(?:," + ID_ARG + ")*?\\))?";
|
||||
private static final Pattern2 definePattern = MyPattern.cmpile("^[%s]*!define[%s]+(" + ID + ARG + ")"
|
||||
+ "(?:[%s]+(.*))?$");
|
||||
private static final Pattern2 filenamePattern = MyPattern.cmpile("^[%s]*!filename[%s]+(.+)$");
|
||||
private static final Pattern2 undefPattern = MyPattern.cmpile("^[%s]*!undef[%s]+(" + ID + ")$");
|
||||
private static final Pattern2 definelongPattern = MyPattern.cmpile("^[%s]*!definelong[%s]+(" + ID + ARG + ")");
|
||||
private static final Pattern2 enddefinelongPattern = MyPattern.cmpile("^[%s]*" + END_DEFINE_LONG + "[%s]*$");
|
||||
|
||||
private final Defines defines;
|
||||
|
||||
public PreprocessorDefine3Learner(Defines defines) {
|
||||
this.defines = defines;
|
||||
this.defines.saveState();
|
||||
}
|
||||
|
||||
public static boolean isLearningLine(CharSequence2 s) {
|
||||
Matcher2 m = definePattern.matcher(s);
|
||||
if (m.find()) {
|
||||
return true;
|
||||
}
|
||||
m = definelongPattern.matcher(s);
|
||||
if (m.find()) {
|
||||
return true;
|
||||
}
|
||||
m = undefPattern.matcher(s);
|
||||
if (m.find()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public ReadLine applyFilter(final ReadLine source) {
|
||||
return new ReadLine() {
|
||||
|
||||
public void close() throws IOException {
|
||||
source.close();
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
while (true) {
|
||||
final CharSequence2 s = source.readLine();
|
||||
if (s == null || s.getPreprocessorError() != null) {
|
||||
return s;
|
||||
}
|
||||
if (StartUtils.isArobaseStartDiagram(s)) {
|
||||
defines.restoreState();
|
||||
return s;
|
||||
}
|
||||
|
||||
Matcher2 m = filenamePattern.matcher(s);
|
||||
if (m.find()) {
|
||||
manageFilename(m);
|
||||
continue;
|
||||
}
|
||||
m = definePattern.matcher(s);
|
||||
if (m.find()) {
|
||||
manageDefine(source, m, s.toString().trim().endsWith("()"));
|
||||
continue;
|
||||
}
|
||||
m = definelongPattern.matcher(s);
|
||||
if (m.find()) {
|
||||
manageDefineLong(source, m, s.toString().trim().endsWith("()"));
|
||||
continue;
|
||||
}
|
||||
|
||||
m = undefPattern.matcher(s);
|
||||
if (m.find()) {
|
||||
manageUndef(m);
|
||||
continue;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// private final ReadLineInsertable source;
|
||||
//
|
||||
// public PreprocessorDefine2(Defines defines, ReadLineInsertable source) {
|
||||
// this.defines = defines;
|
||||
// this.defines.saveState();
|
||||
// this.source = source;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// CharSequence2 readLineInst() throws IOException {
|
||||
//
|
||||
// if (ignoreDefineDuringSeveralLines > 0) {
|
||||
// ignoreDefineDuringSeveralLines--;
|
||||
// return s;
|
||||
// }
|
||||
//
|
||||
// List<String> result = defines.applyDefines(s.toString2());
|
||||
// if (result.size() > 1) {
|
||||
// result = cleanEndDefineLong(result);
|
||||
// final List<String> inserted = cleanEndDefineLong(result.subList(1, result.size()));
|
||||
// ignoreDefineDuringSeveralLines = inserted.size();
|
||||
// source.insert(inserted, s.getLocation());
|
||||
// }
|
||||
// return new CharSequence2Impl(result.get(0), s.getLocation(), s.getPreprocessorError());
|
||||
// }
|
||||
|
||||
private List<String> cleanEndDefineLong(List<String> data) {
|
||||
final List<String> result = new ArrayList<String>();
|
||||
for (String s : data) {
|
||||
final String clean = cleanEndDefineLong(s);
|
||||
if (clean != null) {
|
||||
result.add(clean);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private String cleanEndDefineLong(String s) {
|
||||
if (s.trim().startsWith(END_DEFINE_LONG)) {
|
||||
s = s.trim().substring(END_DEFINE_LONG.length());
|
||||
if (s.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
// private int ignoreDefineDuringSeveralLines = 0;
|
||||
|
||||
private void manageUndef(Matcher2 m) throws IOException {
|
||||
defines.undefine(m.group(1));
|
||||
}
|
||||
|
||||
private void manageDefineLong(ReadLine source, Matcher2 m, boolean emptyParentheses) throws IOException {
|
||||
final String group1 = m.group(1);
|
||||
final List<String> def = new ArrayList<String>();
|
||||
while (true) {
|
||||
final CharSequence2 read = source.readLine();
|
||||
if (read == null) {
|
||||
return;
|
||||
}
|
||||
if (enddefinelongPattern.matcher(read).find()) {
|
||||
defines.define(group1, def, emptyParentheses);
|
||||
return;
|
||||
}
|
||||
def.add(read.toString2());
|
||||
}
|
||||
}
|
||||
|
||||
private void manageFilename(Matcher2 m) {
|
||||
final String group1 = m.group(1);
|
||||
this.defines.overrideFilename(group1);
|
||||
}
|
||||
|
||||
private void manageDefine(ReadLine source, Matcher2 m, boolean emptyParentheses) throws IOException {
|
||||
final String group1 = m.group(1);
|
||||
final String group2 = m.group(2);
|
||||
if (group2 == null) {
|
||||
defines.define(group1, null, emptyParentheses);
|
||||
} else {
|
||||
final List<String> strings = defines.applyDefines(group2);
|
||||
if (strings.size() > 1) {
|
||||
defines.define(group1, strings, emptyParentheses);
|
||||
} else {
|
||||
final StringBuilder value = new StringBuilder(strings.get(0));
|
||||
while (StringUtils.endsWithBackslash(value.toString())) {
|
||||
value.setLength(value.length() - 1);
|
||||
final CharSequence2 read = source.readLine();
|
||||
value.append(read.toString2());
|
||||
}
|
||||
final List<String> li = new ArrayList<String>();
|
||||
li.add(value.toString());
|
||||
defines.define(group1, li, emptyParentheses);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// // public int getLineNumber() {
|
||||
// // return source.getLineNumber();
|
||||
// // }
|
||||
//
|
||||
// @Override
|
||||
// void closeInst() throws IOException {
|
||||
// source.close();
|
||||
// }
|
||||
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.CharSequence2Impl;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineList;
|
||||
|
||||
public class PreprocessorDefine4Apply implements ReadFilter {
|
||||
|
||||
private final Defines defines;
|
||||
|
||||
public PreprocessorDefine4Apply(Defines defines) throws IOException {
|
||||
this.defines = defines;
|
||||
}
|
||||
|
||||
public ReadLine applyFilter(final ReadLine source) {
|
||||
return new Inner(source);
|
||||
}
|
||||
|
||||
class Inner extends ReadLineInsertable {
|
||||
|
||||
final ReadLine source;
|
||||
|
||||
Inner(ReadLine source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
void closeInternal() throws IOException {
|
||||
source.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
CharSequence2 readLineInternal() throws IOException {
|
||||
final CharSequence2 s = this.source.readLine();
|
||||
if (s == null || s.getPreprocessorError() != null) {
|
||||
return s;
|
||||
}
|
||||
if (PreprocessorDefine3Learner.isLearningLine(s)) {
|
||||
return s;
|
||||
}
|
||||
final List<String> result = defines.applyDefines(s.toString2());
|
||||
if (result.size() > 1) {
|
||||
insert(new ReadLineList(result, s.getLocation()));
|
||||
return readLine();
|
||||
}
|
||||
String tmp = result.get(0);
|
||||
return new CharSequence2Impl(tmp, s.getLocation(), s.getPreprocessorError());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// private final ReadLine2 source;
|
||||
// // private final List<CharSequence2> result = new ArrayList<CharSequence2>();
|
||||
// // private final PreprocessorDefine2 preprocDefines;
|
||||
// private final Defines defines;
|
||||
//
|
||||
// private final PreprocessorInclude2 include;
|
||||
//
|
||||
// // private final SubPreprocessor2 subPreprocessor2;
|
||||
//
|
||||
// public PreprocessorDefine4Apply(List<String> config, ReadLine reader, String charset, Defines defines, File
|
||||
// newCurrentDir,
|
||||
// DefinitionsContainer definitionsContainer) throws IOException {
|
||||
// // final IfManager tmp1 = new IfManager(new ReadLineQuoteComment(reader), defines);
|
||||
// final ReadFilter addConfig = new ReadLineAddConfig2(config);
|
||||
// final ReadFilter filterComment = new ReadLineQuoteComment2();
|
||||
// final ReadFilter filterIf = new IfManagerFilter(defines);
|
||||
// final ReadFilter filterSub = new SubPreprocessor2(charset, defines, definitionsContainer);
|
||||
// final ReadFilter filterLearnDefine = new PreprocessorDefine3Learner(defines);
|
||||
// this.source = new ReadLine2Adapter(new ReadFilterAnd(addConfig, filterIf).applyFilter(reader),
|
||||
// new ReadFilterAnd(filterSub, filterComment, filterLearnDefine));
|
||||
// this.defines = defines;
|
||||
// // this.preprocDefines = new PreprocessorDefine2(defines);
|
||||
// this.include = new PreprocessorInclude2(charset);
|
||||
// // this.subPreprocessor2 = new SubPreprocessor2(charset, defines, definitionsContainer);
|
||||
// }
|
||||
//
|
||||
// public CharSequence2 readLine() throws IOException {
|
||||
// while (true) {
|
||||
// // this.preprocDefines.learnDefinition(this.source);
|
||||
// if (this.include.learnInclude(this.source)) {
|
||||
// continue;
|
||||
// }
|
||||
// // if (this.subPreprocessor2.learn(this.source)) {
|
||||
// // continue;
|
||||
// // }
|
||||
//
|
||||
// final CharSequence2 s = this.source.readLine();
|
||||
// if (s == null) {
|
||||
// return null;
|
||||
// }
|
||||
// String tmp = manageDefines(s, source);
|
||||
// if (tmp != null) {
|
||||
// return new CharSequence2Impl(tmp, s.getLocation(), s.getPreprocessorError());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// public void close() throws IOException {
|
||||
// this.source.close();
|
||||
// }
|
||||
//
|
||||
// public Set<FileWithSuffix> getFilesUsed() {
|
||||
// System.err.println("************************** WARNING **************************");
|
||||
// return Collections.emptySet();
|
||||
// }
|
||||
}
|
414
src/net/sourceforge/plantuml/preproc2/PreprocessorInclude3.java
Normal file
414
src/net/sourceforge/plantuml/preproc2/PreprocessorInclude3.java
Normal file
@ -0,0 +1,414 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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
|
||||
* Modified by: Nicolas Jouanin
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.preproc2;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.DefinitionsContainer;
|
||||
import net.sourceforge.plantuml.FileSystem;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.OptionFlags;
|
||||
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.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.ImportedFiles;
|
||||
import net.sourceforge.plantuml.preproc.PreprocessorInclude;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineList;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineReader;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineSimple;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineSingle;
|
||||
import net.sourceforge.plantuml.preproc.StartDiagramExtractReader;
|
||||
import net.sourceforge.plantuml.preproc.Stdlib;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
public class PreprocessorInclude3 implements ReadFilter {
|
||||
|
||||
private static final Pattern2 includeDefPattern = MyPattern.cmpile("^[%s]*!includedef[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 includePattern = MyPattern.cmpile("^[%s]*!include[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 importPattern = MyPattern.cmpile("^[%s]*!import[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 includePatternStdlib = MyPattern.cmpile("^[%s]*!include[%s]+(\\<[^%g]+\\>)$");
|
||||
private static final Pattern2 includeManyPattern = MyPattern.cmpile("^[%s]*!include_many[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
private static final Pattern2 includeURLPattern = MyPattern.cmpile("^[%s]*!includeurl[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
|
||||
// private final ReadLine reader2;
|
||||
private final String charset;
|
||||
private final Defines defines;
|
||||
private final List<String> config;
|
||||
private final DefinitionsContainer definitionsContainer;
|
||||
private final ImportedFiles importedFiles;// = new ImportedFiles();
|
||||
|
||||
//
|
||||
// private int numLine = 0;
|
||||
//
|
||||
// private PreprocessorInclude included = null;
|
||||
//
|
||||
// private final AParentFolder oldCurrentDir;
|
||||
private final Set<FileWithSuffix> filesUsedCurrent = new HashSet<FileWithSuffix>();
|
||||
private final Set<FileWithSuffix> filesUsedGlobal;// = new HashSet<FileWithSuffix>();
|
||||
|
||||
public PreprocessorInclude3(List<String> config, String charset, Defines defines,
|
||||
DefinitionsContainer definitionsContainer, ImportedFiles importedFiles, Set<FileWithSuffix> filesUsedGlobal) {
|
||||
this.charset = charset;
|
||||
this.config = config;
|
||||
this.defines = defines;
|
||||
this.definitionsContainer = definitionsContainer;
|
||||
this.importedFiles = importedFiles;
|
||||
this.filesUsedGlobal = filesUsedGlobal;
|
||||
}
|
||||
|
||||
//
|
||||
// public PreprocessorInclude(List<String> config, ReadLine reader, Defines defines, String charset,
|
||||
// File newCurrentDir, DefinitionsContainer definitionsContainer) {
|
||||
// this(config, reader, defines, charset, new AParentFolderRegular(newCurrentDir), new HashSet<FileWithSuffix>(),
|
||||
// new HashSet<FileWithSuffix>(), definitionsContainer, new ImportedFiles());
|
||||
// }
|
||||
//
|
||||
// public Set<FileWithSuffix> getFilesUsedGlobal() {
|
||||
// return Collections.unmodifiableSet(filesUsedGlobal);
|
||||
// }
|
||||
//
|
||||
// private PreprocessorInclude(List<String> config, ReadLine reader, Defines defines, String charset,
|
||||
// AParentFolder newCurrentDir, Set<FileWithSuffix> filesUsedCurrent, Set<FileWithSuffix> filesUsedGlobal,
|
||||
// DefinitionsContainer definitionsContainer, ImportedFiles importedFiles) {
|
||||
// this.importedFiles = importedFiles;
|
||||
// this.config = config;
|
||||
// this.defines = defines;
|
||||
// this.charset = charset;
|
||||
// this.reader2 = new ReadLineQuoteComment(reader);
|
||||
// this.definitionsContainer = definitionsContainer;
|
||||
// this.filesUsedCurrent = filesUsedCurrent;
|
||||
// this.filesUsedGlobal = filesUsedGlobal;
|
||||
// if (newCurrentDir == null) {
|
||||
// oldCurrentDir = null;
|
||||
// } else {
|
||||
// oldCurrentDir = importedFiles.getCurrentDir();
|
||||
// importedFiles.setCurrentDir(newCurrentDir);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void restoreCurrentDir() {
|
||||
// if (oldCurrentDir != null) {
|
||||
// importedFiles.setCurrentDir(oldCurrentDir);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// CharSequence2 readLineInst() throws IOException {
|
||||
// final CharSequence2 result = readLineInternal();
|
||||
// if (result != null && StartUtils.isArobaseStartDiagram(result) && config.size() > 0) {
|
||||
// final List<String> empty = new ArrayList<String>();
|
||||
// included = new PreprocessorInclude(empty, new ReadLineList(config, result.getLocation()), defines, charset,
|
||||
// null, filesUsedCurrent, filesUsedGlobal, definitionsContainer, importedFiles);
|
||||
// }
|
||||
// if (result != null && (StartUtils.isArobaseEndDiagram(result) || StartUtils.isArobaseStartDiagram(result))) {
|
||||
// // http://plantuml.sourceforge.net/qa/?qa=3389/error-generating-when-same-file-included-different-diagram
|
||||
// filesUsedCurrent.clear();
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
|
||||
public ReadLine applyFilter(ReadLine source) {
|
||||
return new Inner(source);
|
||||
}
|
||||
|
||||
// private ReadLine foo(ReadLine source) throws IOException {
|
||||
// return new Preprocessor2(source, charset, defines, definitionsContainer);
|
||||
// }
|
||||
|
||||
class Inner extends ReadLineInsertable {
|
||||
|
||||
final ReadLine source;
|
||||
|
||||
Inner(ReadLine source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
@Override
|
||||
void closeInternal() throws IOException {
|
||||
source.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
CharSequence2 readLineInternal() throws IOException {
|
||||
final CharSequence2 s = source.readLine();
|
||||
if (s == null || s.getPreprocessorError() != null) {
|
||||
return s;
|
||||
}
|
||||
if (s != null && (StartUtils.isArobaseEndDiagram(s) || StartUtils.isArobaseStartDiagram(s))) {
|
||||
// http://plantuml.sourceforge.net/qa/?qa=3389/error-generating-when-same-file-included-different-diagram
|
||||
filesUsedCurrent.clear();
|
||||
return s;
|
||||
}
|
||||
if (s.getPreprocessorError() == null && OptionFlags.ALLOW_INCLUDE) {
|
||||
final Matcher2 m0 = importPattern.matcher(s);
|
||||
if (m0.find()) {
|
||||
final CharSequence2 err = manageFileImport(s, m0);
|
||||
if (err != null) {
|
||||
insert(new ReadLineSingle(err));
|
||||
}
|
||||
return readLine();
|
||||
}
|
||||
final Matcher2 m1 = includePattern.matcher(s);
|
||||
if (m1.find()) {
|
||||
insert(manageFileInclude(s, m1, false));
|
||||
return readLine();
|
||||
}
|
||||
final Matcher2 m2 = includeManyPattern.matcher(s);
|
||||
if (m2.find()) {
|
||||
insert(manageFileInclude(s, m2, true));
|
||||
return readLine();
|
||||
}
|
||||
final Matcher2 m3 = includeDefPattern.matcher(s);
|
||||
if (m3.find()) {
|
||||
insert(manageDefinitionInclude(s, m3));
|
||||
return readLine();
|
||||
}
|
||||
} else {
|
||||
final Matcher2 m1 = includePatternStdlib.matcher(s);
|
||||
if (m1.find()) {
|
||||
insert(manageFileInclude(s, m1, false));
|
||||
return readLine();
|
||||
}
|
||||
}
|
||||
final Matcher2 mUrl = includeURLPattern.matcher(s);
|
||||
if (s.getPreprocessorError() == null && mUrl.find()) {
|
||||
insert(manageUrlInclude(s, mUrl));
|
||||
return readLine();
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private CharSequence2 manageFileImport(CharSequence2 s, Matcher2 m) throws IOException {
|
||||
final String fileName = m.group(1);
|
||||
final File file = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName));
|
||||
if (file.exists() && file.isDirectory() == false) {
|
||||
importedFiles.add(file);
|
||||
return null;
|
||||
}
|
||||
return s.withErrorPreprocessor("Cannot import " + file.getAbsolutePath());
|
||||
|
||||
}
|
||||
|
||||
private ReadLine manageUrlInclude(CharSequence2 s, Matcher2 m) throws IOException {
|
||||
String urlString = m.group(1);
|
||||
urlString = defines.applyDefines(urlString).get(0);
|
||||
|
||||
final int idx = urlString.lastIndexOf('!');
|
||||
String suf = null;
|
||||
if (idx != -1) {
|
||||
suf = urlString.substring(idx + 1);
|
||||
urlString = urlString.substring(0, idx);
|
||||
}
|
||||
try {
|
||||
if (urlString.toLowerCase().startsWith("https://") == false
|
||||
&& urlString.toLowerCase().startsWith("http://") == false) {
|
||||
return new ReadLineSingle(s.withErrorPreprocessor("Cannot include url " + urlString));
|
||||
}
|
||||
final URL url = new URL(urlString);
|
||||
return new Preprocessor2(config, getReaderInclude(url, s, suf), charset, defines, null,
|
||||
definitionsContainer, filesUsedGlobal);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
return new ReadLineSingle(s.withErrorPreprocessor("Cannot include url " + urlString));
|
||||
}
|
||||
}
|
||||
|
||||
private ReadLine manageDefinitionInclude(CharSequence2 s, Matcher2 matcher) throws IOException {
|
||||
final String definitionName = matcher.group(1);
|
||||
final List<? extends CharSequence> definition = definitionsContainer.getDefinition(definitionName);
|
||||
return new Preprocessor2(config, new ReadLineList(definition, s.getLocation()), charset, defines, null,
|
||||
definitionsContainer, filesUsedGlobal);
|
||||
}
|
||||
|
||||
private ReadLine manageFileInclude(CharSequence2 s, Matcher2 matcher, boolean allowMany) throws IOException {
|
||||
String fileName = matcher.group(1);
|
||||
fileName = defines.applyDefines(fileName).get(0);
|
||||
if (fileName.startsWith("<") && fileName.endsWith(">")) {
|
||||
final ReadLine strlibReader = getReaderStdlibInclude(s, fileName.substring(1, fileName.length() - 1));
|
||||
if (strlibReader == null) {
|
||||
return new ReadLineSingle(s.withErrorPreprocessor("Cannot include " + fileName));
|
||||
}
|
||||
return new Preprocessor2(config, strlibReader, charset, defines, null, definitionsContainer,
|
||||
filesUsedGlobal);
|
||||
}
|
||||
final int idx = fileName.lastIndexOf('!');
|
||||
String suf = null;
|
||||
if (idx != -1) {
|
||||
suf = fileName.substring(idx + 1);
|
||||
fileName = fileName.substring(0, idx);
|
||||
}
|
||||
final FileWithSuffix f2 = new FileWithSuffix(importedFiles, withEnvironmentVariable(fileName), suf);
|
||||
if (f2.fileOk() == false) {
|
||||
return new ReadLineSingle(s.withErrorPreprocessor("Cannot include " + f2.getDescription()));
|
||||
} else if (allowMany == false && filesUsedCurrent.contains(f2)) {
|
||||
return new ReadLineSimple(s, "File already included " + f2.getDescription());
|
||||
}
|
||||
filesUsedCurrent.add(f2);
|
||||
filesUsedGlobal.add(f2);
|
||||
|
||||
return new Preprocessor2(config, getReaderInclude(f2, s), charset, defines, f2.getParentFile(),
|
||||
definitionsContainer, filesUsedGlobal);
|
||||
}
|
||||
|
||||
static String withEnvironmentVariable(String s) {
|
||||
final Pattern p = Pattern.compile("%(\\w+)%");
|
||||
|
||||
final Matcher m = p.matcher(s);
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
while (m.find()) {
|
||||
final String var = m.group(1);
|
||||
final String value = getenv(var);
|
||||
if (value != null) {
|
||||
m.appendReplacement(sb, Matcher.quoteReplacement(value));
|
||||
}
|
||||
}
|
||||
m.appendTail(sb);
|
||||
s = sb.toString();
|
||||
return s;
|
||||
}
|
||||
|
||||
public static String getenv(String var) {
|
||||
final String env = System.getProperty(var);
|
||||
if (StringUtils.isNotEmpty(env)) {
|
||||
return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(env);
|
||||
}
|
||||
final String getenv = System.getenv(var);
|
||||
if (StringUtils.isNotEmpty(getenv)) {
|
||||
return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(getenv);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private InputStream getStdlibInputStream(String filename) {
|
||||
final InputStream result = Stdlib.getResourceAsStream(filename);
|
||||
// Log.info("Loading sdlib " + filename + " ok");
|
||||
return result;
|
||||
}
|
||||
|
||||
private ReadLine getReaderStdlibInclude(CharSequence2 s, String filename) {
|
||||
Log.info("Loading sdlib " + filename);
|
||||
InputStream is = getStdlibInputStream(filename);
|
||||
if (is == null) {
|
||||
return null;
|
||||
}
|
||||
final String description = "<" + filename + ">";
|
||||
try {
|
||||
if (StartDiagramExtractReader.containsStartDiagram(is, s, description)) {
|
||||
is = getStdlibInputStream(filename);
|
||||
return StartDiagramExtractReader.build(is, s, description);
|
||||
}
|
||||
is = getStdlibInputStream(filename);
|
||||
if (is == null) {
|
||||
return null;
|
||||
}
|
||||
return ReadLineReader.create(new InputStreamReader(is), description);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return new ReadLineSimple(s, e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private ReadLine getReaderInclude(FileWithSuffix f2, CharSequence2 s) {
|
||||
try {
|
||||
if (StartDiagramExtractReader.containsStartDiagram(f2, s, charset)) {
|
||||
return StartDiagramExtractReader.build(f2, s, charset);
|
||||
}
|
||||
final Reader reader = f2.getReader(charset);
|
||||
if (reader == null) {
|
||||
return new ReadLineSimple(s, "Cannot open " + f2.getDescription());
|
||||
}
|
||||
return ReadLineReader.create(reader, f2.getDescription(), s.getLocation());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return new ReadLineSimple(s, e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private ReadLine getReaderInclude(final URL url, CharSequence2 s, String suf) {
|
||||
try {
|
||||
if (StartDiagramExtractReader.containsStartDiagram(url, s, charset)) {
|
||||
return StartDiagramExtractReader.build(url, s, suf, charset);
|
||||
}
|
||||
final InputStream is = url.openStream();
|
||||
if (charset == null) {
|
||||
Log.info("Using default charset");
|
||||
return ReadLineReader.create(new InputStreamReader(is), url.toString(), s.getLocation());
|
||||
}
|
||||
Log.info("Using charset " + charset);
|
||||
return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return new ReadLineSimple(s, e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Set<FileWithSuffix> getFilesUsedGlobal() {
|
||||
return filesUsedGlobal;
|
||||
}
|
||||
|
||||
// public int getLineNumber() {
|
||||
// return numLine;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// void closeInst() throws IOException {
|
||||
// restoreCurrentDir();
|
||||
// reader2.close();
|
||||
// }
|
||||
|
||||
}
|
44
src/net/sourceforge/plantuml/preproc2/ReadFilter.java
Normal file
44
src/net/sourceforge/plantuml/preproc2/ReadFilter.java
Normal file
@ -0,0 +1,44 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
|
||||
public interface ReadFilter {
|
||||
|
||||
public ReadLine applyFilter(ReadLine source);
|
||||
|
||||
}
|
65
src/net/sourceforge/plantuml/preproc2/ReadFilterAnd2.java
Normal file
65
src/net/sourceforge/plantuml/preproc2/ReadFilterAnd2.java
Normal file
@ -0,0 +1,65 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
|
||||
public class ReadFilterAnd2 implements ReadFilter {
|
||||
|
||||
private final Collection<ReadFilter> all = new ArrayList<ReadFilter>();
|
||||
|
||||
public void add(ReadFilter filter) {
|
||||
all.add(filter);
|
||||
}
|
||||
|
||||
public ReadLine applyFilter(ReadLine current) {
|
||||
for (ReadFilter f : all) {
|
||||
current = f.applyFilter(current);
|
||||
}
|
||||
return current;
|
||||
// if (filter3 == null && filter4 == null) {
|
||||
// return filter2.applyFilter(filter1.applyFilter(source));
|
||||
// }
|
||||
// if (filter4 == null) {
|
||||
// return filter3.applyFilter(filter2.applyFilter(filter1.applyFilter(source)));
|
||||
// }
|
||||
// return filter4.applyFilter(filter3.applyFilter(filter2.applyFilter(filter1.applyFilter(source))));
|
||||
}
|
||||
|
||||
}
|
79
src/net/sourceforge/plantuml/preproc2/ReadLineAddConfig.java
Normal file
79
src/net/sourceforge/plantuml/preproc2/ReadLineAddConfig.java
Normal file
@ -0,0 +1,79 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineList;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
public class ReadLineAddConfig implements ReadLine {
|
||||
|
||||
private ReadLine inserted;
|
||||
private final ReadLine raw;
|
||||
private final List<String> config;
|
||||
|
||||
public ReadLineAddConfig(List<String> config, ReadLine source) {
|
||||
this.config = config;
|
||||
this.raw = source;
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
raw.close();
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
CharSequence2 result = null;
|
||||
if (inserted != null) {
|
||||
result = inserted.readLine();
|
||||
if (result == null) {
|
||||
inserted.close();
|
||||
inserted = null;
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
result = raw.readLine();
|
||||
if (result != null && StartUtils.isArobaseStartDiagram(result) && config.size() > 0) {
|
||||
this.inserted = new ReadLineList(config, result.getLocation());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineList;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
public class ReadLineAddConfig2 implements ReadFilter {
|
||||
|
||||
private final List<String> config;
|
||||
|
||||
public ReadLineAddConfig2(List<String> config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public ReadLine applyFilter(final ReadLine raw) {
|
||||
|
||||
return new ReadLine() {
|
||||
|
||||
private ReadLine inserted;
|
||||
|
||||
public void close() throws IOException {
|
||||
raw.close();
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
CharSequence2 result = null;
|
||||
if (inserted != null) {
|
||||
result = inserted.readLine();
|
||||
if (result == null) {
|
||||
inserted.close();
|
||||
inserted = null;
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
result = raw.readLine();
|
||||
if (result != null && StartUtils.isArobaseStartDiagram(result) && config.size() > 0) {
|
||||
inserted = new ReadLineList(config, result.getLocation());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
|
||||
public abstract class ReadLineInsertable implements ReadLine {
|
||||
|
||||
private final List<ReadLine> sources = new ArrayList<ReadLine>();
|
||||
|
||||
final protected void insert(ReadLine inserted) throws IOException {
|
||||
sources.add(0, inserted);
|
||||
}
|
||||
|
||||
abstract CharSequence2 readLineInternal() throws IOException;
|
||||
|
||||
final public CharSequence2 readLine() throws IOException {
|
||||
while (sources.size() > 0) {
|
||||
final ReadLine tmp = sources.get(0);
|
||||
final CharSequence2 result = tmp.readLine();
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
tmp.close();
|
||||
sources.remove(0);
|
||||
}
|
||||
return readLineInternal();
|
||||
}
|
||||
|
||||
abstract void closeInternal() throws IOException;
|
||||
|
||||
final public void close() throws IOException {
|
||||
for (ReadLine s : sources) {
|
||||
s.close();
|
||||
}
|
||||
closeInternal();
|
||||
}
|
||||
|
||||
}
|
69
src/net/sourceforge/plantuml/preproc2/ReadLineList2.java
Normal file
69
src/net/sourceforge/plantuml/preproc2/ReadLineList2.java
Normal file
@ -0,0 +1,69 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineNumbered;
|
||||
|
||||
public class ReadLineList2 implements ReadLineNumbered {
|
||||
|
||||
private final Iterator<CharSequence2> iterator;
|
||||
|
||||
public ReadLineList2(List<CharSequence2> definition) {
|
||||
this.iterator = definition.iterator();
|
||||
}
|
||||
|
||||
public void close() {
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() {
|
||||
if (iterator.hasNext() == false) {
|
||||
return null;
|
||||
}
|
||||
return iterator.next();
|
||||
}
|
||||
|
||||
public Set<FileWithSuffix> getFilesUsed() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.CharSequence2Impl;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
|
||||
public class ReadLineQuoteComment2 implements ReadFilter {
|
||||
|
||||
public ReadLine applyFilter(final ReadLine source) {
|
||||
return new ReadLine() {
|
||||
|
||||
public void close() throws IOException {
|
||||
source.close();
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
boolean longComment = false;
|
||||
while (true) {
|
||||
final CharSequence2 result = source.readLine();
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
final String trim = result.toString().replace('\t', ' ').trim();
|
||||
if (longComment && trim.endsWith("'/")) {
|
||||
longComment = false;
|
||||
continue;
|
||||
}
|
||||
if (longComment) {
|
||||
continue;
|
||||
}
|
||||
if (trim.startsWith("'")) {
|
||||
continue;
|
||||
}
|
||||
if (trim.startsWith("/'") && trim.endsWith("'/")) {
|
||||
continue;
|
||||
}
|
||||
if (trim.startsWith("/'") && trim.contains("'/") == false) {
|
||||
longComment = true;
|
||||
continue;
|
||||
}
|
||||
return ((CharSequence2Impl) result).removeInnerComment();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
197
src/net/sourceforge/plantuml/preproc2/SubPreprocessor2.java
Normal file
197
src/net/sourceforge/plantuml/preproc2/SubPreprocessor2.java
Normal file
@ -0,0 +1,197 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2017, 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.preproc2;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.CharSequence2;
|
||||
import net.sourceforge.plantuml.DefinitionsContainer;
|
||||
import net.sourceforge.plantuml.FileSystem;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
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.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.PreprocessorInclude;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineReader;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineSimple;
|
||||
import net.sourceforge.plantuml.preproc.Sub;
|
||||
|
||||
public class SubPreprocessor2 implements ReadFilter {
|
||||
|
||||
private static final String ID = "[A-Za-z_][A-Za-z_0-9]*";
|
||||
|
||||
private static final Pattern2 includeSubPattern = MyPattern.cmpile("^[%s]*!includesub[%s]+[%g]?([^%g]+)[%g]?$");
|
||||
|
||||
private static final Pattern2 startsub = MyPattern.cmpile("^[%s]*!startsub[%s]+(" + ID + ")");
|
||||
private static final Pattern2 endsub = MyPattern.cmpile("^[%s]*!endsub[%s]*");
|
||||
|
||||
private final Defines defines;
|
||||
private final DefinitionsContainer definitionsContainer;
|
||||
private final String charset;
|
||||
|
||||
public SubPreprocessor2(String charset, Defines defines, DefinitionsContainer definitionsContainer) {
|
||||
this.charset = charset;
|
||||
this.defines = defines;
|
||||
this.definitionsContainer = definitionsContainer;
|
||||
}
|
||||
|
||||
private final Map<String, Sub> subs = new HashMap<String, Sub>();
|
||||
private Sub learningSub;
|
||||
private ReadLine includedSub;
|
||||
|
||||
public ReadLine applyFilter(ReadLine source) {
|
||||
return new InnerReadLine(source);
|
||||
}
|
||||
|
||||
class InnerReadLine implements ReadLine {
|
||||
final ReadLine source;
|
||||
|
||||
public InnerReadLine(ReadLine source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
private CharSequence2 manageStartsub(Matcher2 m) throws IOException {
|
||||
final String name = m.group(1);
|
||||
learningSub = getSub(name);
|
||||
return this.readLine();
|
||||
}
|
||||
|
||||
private CharSequence2 manageEndsub(Matcher2 m) throws IOException {
|
||||
learningSub = null;
|
||||
return this.readLine();
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
source.close();
|
||||
}
|
||||
|
||||
private CharSequence2 manageIncludeSub(CharSequence2 s, Matcher2 m) throws IOException {
|
||||
final String name = m.group(1);
|
||||
final int idx = name.indexOf('!');
|
||||
if (idx != -1) {
|
||||
final String filename = name.substring(0, idx);
|
||||
final String blocname = name.substring(idx + 1);
|
||||
final File f = FileSystem.getInstance().getFile(PreprocessorInclude.withEnvironmentVariable(filename));
|
||||
if (f.exists() == false || f.isDirectory()) {
|
||||
return s.withErrorPreprocessor("Cannot include " + f.getAbsolutePath());
|
||||
}
|
||||
final SubPreprocessor2 data = new SubPreprocessor2(charset, defines, definitionsContainer);
|
||||
InnerReadLine tmp = (InnerReadLine) data.applyFilter(getReaderInclude(s, f));
|
||||
while (tmp.readLine() != null) {
|
||||
// Read file
|
||||
}
|
||||
tmp.close();
|
||||
includedSub = tmp.getSub(blocname).getReadLine(s.getLocation());
|
||||
} else {
|
||||
includedSub = getSub(name).getReadLine(s.getLocation());
|
||||
}
|
||||
return this.readLine();
|
||||
}
|
||||
|
||||
public CharSequence2 readLine() throws IOException {
|
||||
if (includedSub != null) {
|
||||
final CharSequence2 s = includedSub.readLine();
|
||||
if (s != null) {
|
||||
eventuallyLearn(s);
|
||||
return s;
|
||||
}
|
||||
includedSub = null;
|
||||
}
|
||||
|
||||
final CharSequence2 s = source.readLine();
|
||||
if (s == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final Matcher2 m1 = includeSubPattern.matcher(s);
|
||||
if (m1.find()) {
|
||||
return manageIncludeSub(s, m1);
|
||||
}
|
||||
|
||||
Matcher2 m = startsub.matcher(s);
|
||||
if (m.find()) {
|
||||
return manageStartsub(m);
|
||||
}
|
||||
|
||||
m = endsub.matcher(s);
|
||||
if (m.find()) {
|
||||
return manageEndsub(m);
|
||||
}
|
||||
eventuallyLearn(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
private void eventuallyLearn(final CharSequence2 s) {
|
||||
if (learningSub != null) {
|
||||
learningSub.add(s);
|
||||
}
|
||||
}
|
||||
|
||||
Sub getSub(String name) {
|
||||
Sub result = subs.get(name);
|
||||
if (result == null) {
|
||||
result = new Sub(name);
|
||||
subs.put(name, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private ReadLine getReaderInclude(CharSequence2 s, final File f) {
|
||||
try {
|
||||
if (charset == null) {
|
||||
Log.info("Using default charset");
|
||||
return ReadLineReader.create(new FileReader(f), f.getAbsolutePath(), s.getLocation());
|
||||
}
|
||||
Log.info("Using charset " + charset);
|
||||
return ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset), f.getAbsolutePath(),
|
||||
s.getLocation());
|
||||
} catch (IOException e) {
|
||||
return new ReadLineSimple(s, e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -39,12 +39,15 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.SpriteContainer;
|
||||
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
|
||||
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
|
||||
import net.sourceforge.plantuml.salt.element.Element;
|
||||
import net.sourceforge.plantuml.salt.element.WrappedElement;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapper;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
|
||||
|
||||
public class Dictionary implements SpriteContainer, ISkinSimple {
|
||||
@ -102,4 +105,12 @@ public class Dictionary implements SpriteContainer, ISkinSimple {
|
||||
|
||||
}
|
||||
|
||||
public LineBreakStrategy wrapWidth() {
|
||||
return LineBreakStrategy.NONE;
|
||||
}
|
||||
|
||||
public ColorMapper getColorMapper() {
|
||||
return new ColorMapperIdentity();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -113,7 +113,6 @@ final public class GroupingLeaf extends Grouping implements EventWithDeactivate
|
||||
}
|
||||
|
||||
public boolean addLifeEvent(LifeEvent lifeEvent) {
|
||||
lifeEvent.setLinkedToGroupingEnd(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,6 @@ public class LifeEvent extends AbstractEvent implements Event {
|
||||
return this.p == p && type == LifeEventType.DESTROY;
|
||||
}
|
||||
|
||||
// public double getStrangePos() {
|
||||
// return message.getPosYendLevel();
|
||||
// }
|
||||
//
|
||||
private AbstractMessage message;
|
||||
|
||||
public void setMessage(AbstractMessage message) {
|
||||
@ -101,14 +97,4 @@ public class LifeEvent extends AbstractEvent implements Event {
|
||||
return message;
|
||||
}
|
||||
|
||||
// private boolean linkedToGroupingEnd;
|
||||
//
|
||||
// // public boolean isLinkedToGroupingEnd() {
|
||||
// // return linkedToGroupingEnd;
|
||||
// // }
|
||||
|
||||
public void setLinkedToGroupingEnd(boolean linkedToGroupingEnd) {
|
||||
// this.linkedToGroupingEnd = linkedToGroupingEnd;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -626,7 +626,7 @@ class DrawableSetInitializer {
|
||||
drawableSet.getSkinParam(), null);
|
||||
|
||||
final LifeLine lifeLine = new LifeLine(box, comp.getPreferredWidth(stringBounder), drawableSet.getSkinParam()
|
||||
.shadowing());
|
||||
.shadowing(p.getStereotype()));
|
||||
drawableSet.setLivingParticipantBox(p, new LivingParticipantBox(box, lifeLine));
|
||||
|
||||
this.freeX = box.getMaxX(stringBounder);
|
||||
|
@ -36,7 +36,6 @@
|
||||
package net.sourceforge.plantuml.skin.rose;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.creole.Stencil;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
@ -61,7 +60,7 @@ final public class ComponentRoseNote extends AbstractTextualComponent implements
|
||||
|
||||
public ComponentRoseNote(SymbolContext symbolContext, FontConfiguration font, Display strings, double paddingX,
|
||||
double paddingY, ISkinSimple spriteContainer, double roundCorner, HorizontalAlignment horizontalAlignment) {
|
||||
super(LineBreakStrategy.NONE, strings, font, horizontalAlignment,
|
||||
super(spriteContainer.wrapWidth(), strings, font, horizontalAlignment,
|
||||
horizontalAlignment == HorizontalAlignment.CENTER ? 15 : 6, 15, 5, spriteContainer, true, null, null);
|
||||
this.roundCorner = roundCorner;
|
||||
this.paddingX = paddingX;
|
||||
|
@ -36,7 +36,6 @@
|
||||
package net.sourceforge.plantuml.skin.rose;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinSimple;
|
||||
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||
import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
@ -55,7 +54,8 @@ final public class ComponentRoseNoteBox extends AbstractTextualComponent {
|
||||
|
||||
public ComponentRoseNoteBox(SymbolContext symbolContext, FontConfiguration font, Display strings,
|
||||
ISkinSimple spriteContainer) {
|
||||
super(LineBreakStrategy.NONE, strings, font, HorizontalAlignment.LEFT, 4, 4, 4, spriteContainer, false, null, null);
|
||||
super(spriteContainer.wrapWidth(), strings, font, HorizontalAlignment.LEFT, 4, 4, 4, spriteContainer, false,
|
||||
null, null);
|
||||
this.symbolContext = symbolContext;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ public class Rose implements Skin {
|
||||
}
|
||||
|
||||
private double deltaShadow(ISkinParam param) {
|
||||
return param.shadowing() ? 4.0 : 0;
|
||||
return param.shadowing(null) ? 4.0 : 0;
|
||||
}
|
||||
|
||||
private SymbolContext getSymbolContext(ISkinParam param, ColorParam color) {
|
||||
|
@ -354,8 +354,8 @@ public class Cluster implements Moveable {
|
||||
}
|
||||
}
|
||||
|
||||
final boolean shadowing = group.getUSymbol() == null ? skinParam2.shadowing() : skinParam2.shadowing2(group
|
||||
.getUSymbol().getSkinParameter());
|
||||
final boolean shadowing = group.getUSymbol() == null ? skinParam2.shadowing2(group.getStereotype(), USymbol.PACKAGE.getSkinParameter())
|
||||
: skinParam2.shadowing2(group.getStereotype(), group.getUSymbol().getSkinParameter());
|
||||
if (ztitle != null || zstereo != null) {
|
||||
final HtmlColor back = getBackColor(getBackColor(umlDiagramType), skinParam2, group.getStereotype());
|
||||
final double roundCorner = group.getUSymbol() == null ? 0 : group.getUSymbol().getSkinParameter()
|
||||
@ -462,7 +462,7 @@ public class Cluster implements Moveable {
|
||||
final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight();
|
||||
final RoundedContainer r = new RoundedContainer(total, suppY, attributeHeight
|
||||
+ (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, stateBack, background, stroke);
|
||||
r.drawU(ug.apply(new UTranslate(minX, minY)), skinParam2.shadowing());
|
||||
r.drawU(ug.apply(new UTranslate(minX, minY)), skinParam2.shadowing(group.getStereotype()));
|
||||
|
||||
if (ztitle != null) {
|
||||
ztitle.drawU(ug.apply(new UTranslate(xTitle, yTitle)));
|
||||
@ -741,8 +741,8 @@ public class Cluster implements Moveable {
|
||||
Line.appendTable(sblabel, getTitleAndAttributeWidth(), getTitleAndAttributeHeight() - 5, colorTitle);
|
||||
sblabel.append(">");
|
||||
label = sblabel.toString();
|
||||
final HorizontalAlignment align = skinParam
|
||||
.getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null);
|
||||
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.packageTitleAlignment,
|
||||
null);
|
||||
sb.append("labeljust=\"" + align.getGraphVizValue() + "\";");
|
||||
} else {
|
||||
label = "\"\"";
|
||||
|
@ -35,6 +35,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.svek;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.ArrayList;
|
||||
@ -69,7 +70,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage {
|
||||
public GraphvizCrash(String text) {
|
||||
this.text = text;
|
||||
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
|
||||
this.flashCode = utils.exportFlashcode(text);
|
||||
this.flashCode = utils.exportFlashcode(text, Color.BLACK, Color.WHITE);
|
||||
this.graphicStrings = GraphicStrings.createBlackOnWhite(init(), IconLoader.getRandom(),
|
||||
GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public final class GroupPngMakerActivity {
|
||||
final HtmlColor backColor = group.getColors(skinParam).getColor(ColorType.BACK) == null ? getColor(
|
||||
ColorParam.background, stereo) : group.getColors(skinParam).getColor(ColorType.BACK);
|
||||
return new InnerActivity(svek2.buildImage(null, new String[0]), borderColor, backColor,
|
||||
skinParam.shadowing());
|
||||
skinParam.shadowing(group.getStereotype()));
|
||||
}
|
||||
|
||||
throw new UnsupportedOperationException(group.getGroupType().toString());
|
||||
|
@ -155,8 +155,8 @@ public final class GroupPngMakerState {
|
||||
if (stroke == null) {
|
||||
stroke = new UStroke(1.5);
|
||||
}
|
||||
return new InnerStateAutonom(image, title, attribute, borderColor, backColor, skinParam.shadowing(),
|
||||
group.getUrl99(), withSymbol, stroke);
|
||||
return new InnerStateAutonom(image, title, attribute, borderColor, backColor, skinParam.shadowing(group
|
||||
.getStereotype()), group.getUrl99(), withSymbol, stroke);
|
||||
|
||||
}
|
||||
|
||||
@ -167,7 +167,15 @@ public final class GroupPngMakerState {
|
||||
return new TextBlockEmpty();
|
||||
}
|
||||
final FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.STATE_ATTRIBUTE, null);
|
||||
final Display display = details.size() == 1 ? Display.getWithNewlines(details.get(0)) : Display.create(details);
|
||||
Display display = null;
|
||||
for (String s : details) {
|
||||
if (display == null) {
|
||||
display = Display.getWithNewlines(s);
|
||||
} else {
|
||||
display = display.addAll(Display.getWithNewlines(s));
|
||||
}
|
||||
}
|
||||
|
||||
final TextBlock result = display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam);
|
||||
return new TextBlockWidthAdapter(result, 0);
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class EntityImageActivity extends AbstractEntityImage {
|
||||
private UGraphic drawOctagon(UGraphic ug) {
|
||||
final Shape shape = bibliotekon.getShape(getEntity());
|
||||
final Shadowable octagon = shape.getOctagon();
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
octagon.setDeltaShadow(4);
|
||||
}
|
||||
ug = applyColors(ug);
|
||||
@ -122,7 +122,7 @@ public class EntityImageActivity extends AbstractEntityImage {
|
||||
final double widthTotal = dimTotal.getWidth();
|
||||
final double heightTotal = dimTotal.getHeight();
|
||||
final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER);
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
rect.setDeltaShadow(4);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class EntityImageAssociation extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
final UPolygon diams = new UPolygon();
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
diams.setDeltaShadow(5);
|
||||
}
|
||||
diams.addPoint(SIZE, 0);
|
||||
|
@ -65,7 +65,7 @@ public class EntityImageBranch extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
final UPolygon diams = new UPolygon();
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
diams.setDeltaShadow(5);
|
||||
}
|
||||
diams.addPoint(SIZE, 0);
|
||||
|
@ -68,7 +68,7 @@ public class EntityImageCircleEnd extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
circle.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeBackColor(null))
|
||||
|
@ -66,7 +66,7 @@ public class EntityImageCircleStart extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
final UEllipse circle = new UEllipse(SIZE, SIZE);
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
circle.setDeltaShadow(3);
|
||||
}
|
||||
ug.apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), colorParam, getStereo())))
|
||||
|
@ -142,7 +142,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
|
||||
final double heightTotal = dimTotal.getHeight();
|
||||
final Shadowable rect = new URectangle(widthTotal, heightTotal, roundCorner, roundCorner, getEntity().getCode()
|
||||
.getFullName());
|
||||
if (getSkinParam().shadowing()) {
|
||||
if (getSkinParam().shadowing(getEntity().getStereotype())) {
|
||||
rect.setDeltaShadow(4);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class EntityImageDescription extends AbstractEntityImage {
|
||||
final UStroke stroke = colors.muteStroke(symbol.getSkinParameter().getStroke(getSkinParam(), stereotype));
|
||||
|
||||
final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(stroke)
|
||||
.withShadow(getSkinParam().shadowing2(symbol.getSkinParameter()))
|
||||
.withShadow(getSkinParam().shadowing2(getEntity().getStereotype(), symbol.getSkinParameter()))
|
||||
.withCorner(roundCorner, diagonalCorner);
|
||||
|
||||
stereo = TextBlockUtils.empty(0, 0);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user