本文整理汇总了Java中net.sourceforge.plantuml.version.Version类的典型用法代码示例。如果您正苦于以下问题:Java Version类的具体用法?Java Version怎么用?Java Version使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Version类属于net.sourceforge.plantuml.version包,在下文中一共展示了Version类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFailureText1
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
static private List<String> getFailureText1(Throwable exception, String graphvizVersion) {
final List<String> strings = GraphvizCrash.anErrorHasOccured(exception);
strings.add("PlantUML (" + Version.versionString() + ") cannot parse result from dot/GraphViz.");
if (exception instanceof EmptySvgException) {
strings.add("Because dot/GraphViz returns an empty string.");
}
GraphvizCrash.checkOldVersionWarning(strings);
if (graphvizVersion != null) {
strings.add(" ");
strings.add("GraphViz version used : " + graphvizVersion);
}
GraphvizCrash.pleaseGoTo(strings);
GraphvizCrash.addProperties(strings);
strings.add(" ");
GraphvizCrash.thisMayBeCaused(strings);
strings.add(" ");
GraphvizCrash.youShouldSendThisDiagram(strings);
strings.add(" ");
return strings;
}
示例2: getVersion
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
private String getVersion() {
final StringBuilder toAppend = new StringBuilder();
toAppend.append("PlantUML version ");
toAppend.append(Version.versionString());
toAppend.append("(" + Version.compileTimeString() + ")\n");
toAppend.append("(" + License.getCurrent() + " source distribution)\n");
final Properties p = System.getProperties();
toAppend.append(p.getProperty("java.runtime.name"));
toAppend.append('\n');
toAppend.append(p.getProperty("java.vm.name"));
toAppend.append('\n');
toAppend.append(p.getProperty("java.runtime.version"));
toAppend.append('\n');
toAppend.append(p.getProperty("os.name"));
return toAppend.toString();
}
示例3: checkVersion
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public static void checkVersion() throws InterruptedException {
System.out
.println("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")");
System.out.println();
final int lastversion = PSystemVersion.extractDownloadableVersion(null, null);
if (lastversion == -1) {
System.out.println("Error");
System.out.println("Cannot connect to http://plantuml.com/");
System.out.println("Maybe you should set your proxy ?");
} else if (lastversion == 0) {
System.out.println("Error");
System.out.println("Cannot retrieve last version from http://plantuml.com/");
} else {
System.out.println("Last available version for download : " + lastversion);
System.out.println();
if (Version.version() >= lastversion) {
System.out.println("Your version is up to date.");
} else {
System.out.println("A newer version is available for download.");
}
}
exit();
}
示例4: printAbout
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public static void printAbout() throws InterruptedException {
// Duplicate in PSystemVersion
System.out
.println("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")");
System.out.println();
System.out.println("Original idea: Arnaud Roques");
System.out.println("Word Macro: Alain Bertucat & Matthieu Sabatier");
System.out.println("Word Add-in: Adriaan van den Brand");
System.out.println("Eclipse Plugin: Claude Durif & Anne Pecoil");
System.out.println("Servlet & XWiki: Maxime Sinclair");
System.out.println("Site design: Raphael Cotisson");
System.out.println("Logo: Benjamin Croizet");
System.out.println();
System.out.println("http://plantuml.sourceforge.net");
exit();
}
示例5: init
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
private List<String> init() {
final List<String> strings = anErrorHasOccured(null);
strings.add("For some reason, dot/Graphviz has crashed.");
strings.add("This has been generated with PlantUML (" + Version.versionString() + ").");
checkOldVersionWarning(strings);
strings.add(" ");
addProperties(strings);
strings.add(" ");
try {
final String dotVersion = GraphvizUtils.dotVersion();
strings.add("Default dot version: " + dotVersion);
} catch (Throwable e) {
strings.add("Cannot determine dot version: " + e.toString());
}
pleaseGoTo(strings);
youShouldSendThisDiagram(strings);
if (flashCode != null) {
addDecodeHint(strings);
}
return strings;
}
示例6: EpsGraphics
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public EpsGraphics() {
header.append("%!PS-Adobe-3.0 EPSF-3.0\n");
header.append("%%Creator: PlantUML v" + Version.versionString(10) + "\n");
header.append("%%Title: noTitle\n");
// header.append("%%CreationDate: " + new Date() + "\n");
setcolorgradient.add(new PostScriptCommandRaw("3 index 7 index sub 1 index mul 7 index add", true));
setcolorgradient.add(new PostScriptCommandRaw("3 index 7 index sub 2 index mul 7 index add", true));
setcolorgradient.add(new PostScriptCommandRaw("3 index 7 index sub 3 index mul 7 index add", true));
setcolorgradient.add(new PostScriptCommandRaw("setrgbcolor", true));
// setcolorgradient.add(new PostScriptCommandRaw("0 7 1 {pop} for"));
setcolorgradient.add(new PostScriptCommandRaw("pop pop pop pop pop pop pop ", true));
simplerect.add(new PostScriptCommandRaw("newpath moveto 1 index 0 rlineto", true));
simplerect.add(new PostScriptCommandRaw("0 exch rlineto", true));
simplerect.add(new PostScriptCommandRaw("neg 0 rlineto", true));
roundrect.add(new PostScriptCommandRaw("newpath", true));
roundrect.add(new PostScriptCommandRaw("dup 3 index add 2 index 2 index add 2 index 180 270 arc", true));
roundrect.add(new PostScriptCommandRaw("2 index 5 index add 1 index sub 2 index 2 index add 2 index 270 0 arc",
true));
roundrect.add(new PostScriptCommandRaw(
"2 index 5 index add 1 index sub 2 index 5 index add 2 index sub 2 index 0 90 arc", true));
roundrect.add(new PostScriptCommandRaw("dup 3 index add 2 index 5 index add 2 index sub 2 index 90 180 arc",
true));
roundrect.add(new PostScriptCommandRaw("pop pop pop pop pop ", true));
}
示例7: LicenseWindow
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public LicenseWindow() {
super();
setIconImage(PSystemVersion.getPlantumlSmallIcon2());
this.setTitle("Licence PlantUML (" + Version.versionString() + ")");
getContentPane().add(getNorthLabel(), BorderLayout.NORTH);
final List<String> list = new ArrayList<String>(License.getCurrent().getText());
getContentPane().add(getJComponent(list), BorderLayout.CENTER);
getContentPane().add(getSouthLabel(), BorderLayout.SOUTH);
setSize(800, 600);
this.setLocationRelativeTo(this.getParent());
setVisible(true);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
示例8: AboutWindow
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public AboutWindow() {
super();
setIconImage(PSystemVersion.getPlantumlSmallIcon2());
this.setTitle("About PlantUML (" + Version.versionString() + ")");
final JPanel panel1 = new JPanel(new GridLayout(2, 1));
panel1.add(getInfoVersion());
panel1.add(getInfoAuthors());
getContentPane().add(getNorthLabel(), BorderLayout.NORTH);
getContentPane().add(panel1, BorderLayout.CENTER);
getContentPane().add(getSouthLabel(), BorderLayout.SOUTH);
pack();
this.setLocationRelativeTo(this.getParent());
setVisible(true);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
示例9: execute
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public CommandExecutionResult execute(S system, BlocLines lines) {
try {
final CommandExecutionResult result = cmd.execute(system, lines);
// if (result.isOk()) {
// // TRACECOMMAND
// System.err.println("CMD = " + cmd.getClass());
// }
return result;
} catch (Throwable t) {
Log.error("Error " + t);
t.printStackTrace();
String msg = "You should send a mail to [email protected] or post to http://plantuml.com/qa with this log (V" + Version.versionString()
+ ")";
Log.error(msg);
msg += " " + t.toString();
return CommandExecutionResult.error(msg, t);
}
}
示例10: createData
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public void createData(OutputStream os) throws IOException {
out(os, "\\documentclass{article}");
out(os, "\\usepackage{tikz}");
// out(os, "\\usetikzlibrary{trees}");
out(os, "\\begin{document}");
out(os, "% generated by Plantuml " + Version.versionString());
for (Map.Entry<Color, String> ent : colornames.entrySet()) {
out(os, definecolor(ent.getValue(), ent.getKey()));
}
out(os, "\\begin{tikzpicture}[yscale=-1]");
for (String s : cmd) {
out(os, s);
}
out(os, "\\end{tikzpicture}");
out(os, "\\end{document}");
}
示例11: checkVersion
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public static void checkVersion() throws InterruptedException {
System.out
.println("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")");
System.out.println();
final int lastversion = PSystemVersion.extractDownloadableVersion(null, null);
if (lastversion == -1) {
System.out.println("Error");
System.out.println("Cannot connect to http://plantuml.sourceforge.net/");
System.out.println("Maybe you should set your proxy ?");
} else if (lastversion == 0) {
System.out.println("Error");
System.out.println("Cannot retrieve last version from http://plantuml.sourceforge.net/");
} else {
System.out.println("Last available version for download : " + lastversion);
System.out.println();
if (Version.version() >= lastversion) {
System.out.println("Your version is up to date.");
} else {
System.out.println("A newer version is available for download.");
}
}
exit();
}
示例12: init
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
private List<String> init() {
final List<String> strings = new ArrayList<String>();
strings.add("An error has occured!");
final String quote = QuoteUtils.getSomeQuote();
strings.add("<i>" + quote);
strings.add(" ");
strings.add("For some reason, dot/Graphviz has crashed.");
strings.add("This has been generated with PlantUML (" + Version.versionString() + ").");
strings.add(" ");
addProperties(strings);
strings.add(" ");
try {
final String dotVersion = GraphvizUtils.dotVersion();
strings.add("Default dot version: " + dotVersion);
} catch (Throwable e) {
strings.add("Cannot determine dot version: " + e.toString());
}
strings.add(" ");
strings.add("You should send this diagram and this image to <b>[email protected]</b> to solve this issue.");
strings.add("You can try to turn arround this issue by simplifing your diagram.");
if (flashCode != null) {
addDecodeHint(strings);
}
return strings;
}
示例13: execute
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public CommandExecutionResult execute(S system, List<String> lines) {
try {
final CommandExecutionResult result = cmd.execute(system, lines);
// if (result.isOk()) {
// // TRACECOMMAND
// System.err.println("CMD = " + cmd.getClass());
// }
return result;
} catch (Throwable t) {
t.printStackTrace();
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final PrintWriter pw = new PrintWriter(baos);
t.printStackTrace(pw);
Log.error("Error " + t);
String msg = "You should send a mail to [email protected] with this log (V" + Version.versionString()
+ ")";
Log.error(msg);
msg += " " + new String(baos.toByteArray());
return CommandExecutionResult.error(msg);
}
}
示例14: UMLDoclet
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public UMLDoclet(RootDoc rootDoc) {
this.rootDoc = requireNonNull(rootDoc, "No root document received.");
this.config = new UMLDocletConfig(rootDoc.options(), rootDoc);
info("UML Doclet (C) Copyright Talsma ICT, version: {1}.", getClass().getSimpleName(), config.version());
info("This software uses PlantUML (C) Copyright Arnaud Roques, version: {0}.", Version.versionString());
debug("Initialized {0}...", config);
}
示例15: getFailureText2
import net.sourceforge.plantuml.version.Version; //导入依赖的package包/类
public static List<String> getFailureText2(Throwable exception) {
final List<String> strings = GraphvizCrash.anErrorHasOccured(exception);
strings.add("PlantUML (" + Version.versionString() + ") has crashed.");
GraphvizCrash.checkOldVersionWarning(strings);
strings.add(" ");
GraphvizCrash.youShouldSendThisDiagram(strings);
strings.add(" ");
return strings;
}