panda.doc.markdown.html.YumlPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.doc.markdown.html;
import java.util.List;
import java.util.Map;
import panda.doc.markdown.Plugin;
public class YumlPlugin extends Plugin {
public YumlPlugin() {
super("yuml");
}
@Override
public void emit(final StringBuilder out, final List lines, final Map params) {
StringBuilder sb2 = new StringBuilder();
for (String line : lines) {
line = line.trim();
if (line.length() > 0) {
if (sb2.length() > 0) {
sb2.append(", ");
}
sb2.append(line);
}
}
String type = params.get("type");
if (type == null) {
type = "class";
}
String style = params.get("style");
if (style == null) {
style = "scruffy";
}
String dir = params.get("dir");
if (dir != null) {
style = style + ";dir:" + dir + ";";
}
String scale = params.get("scale");
if (scale != null) {
style = style + ";scale:" + scale + ";";
}
out.append("");
}
}