Hello
thank's for this great soft
There was an error when I generated the image using Java (according to https://plantuml.com/zh/api Description). this error only occurs when I use the 'switch'.
my code:
@Test
public void Test() throws IOException {
String outputFilePath = "/Users/dongdexuan/project/web-demo/src/test/java/com/codegenerate/uml/output.svg";
OutputStream png = new FileOutputStream(new File(outputFilePath));
String source = "@startuml\n"
+ "!pragma layout smetana"
+ "start\n"
+ "switch (测试?)\n"
+ "case ( 条件 A )\n"
+ " :Text 1;\n"
+ "case ( 条件 B ) \n"
+ " :Text 2;\n"
+ "case ( 条件 C )\n"
+ " :Text 3;\n"
+ "case ( 条件 D )\n"
+ " :Text 4;\n"
+ "case ( 条件 E )\n"
+ " :Text 5;\n"
+ "endswitch\n"
+ "stop\n"
+ "@enduml";
SourceStringReader reader = new SourceStringReader(source);
// Write the first image to "svg"
reader.generateImage(png, new FileFormatOption(FileFormat.SVG));
}
output.svg show:
Syntax Error?
Did you mean:
switch- (测试?)
thank's in advance
allen