Commit 874c11e7 authored by Claus Nagel's avatar Claus Nagel
Browse files

Merge branch 'master' of https://github.com/citygml4j/ade-xjc

parents 31011dde a1abbf48
...@@ -48,6 +48,8 @@ import org.kohsuke.args4j.ParserProperties; ...@@ -48,6 +48,8 @@ import org.kohsuke.args4j.ParserProperties;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import com.sun.codemodel.JCodeModel; import com.sun.codemodel.JCodeModel;
import com.sun.codemodel.writer.FileCodeWriter;
import com.sun.codemodel.writer.PrologCodeWriter;
import com.sun.tools.xjc.Options; import com.sun.tools.xjc.Options;
import com.sun.tools.xjc.Plugin; import com.sun.tools.xjc.Plugin;
import com.sun.tools.xjc.api.S2JJAXBModel; import com.sun.tools.xjc.api.S2JJAXBModel;
...@@ -205,7 +207,14 @@ public class ADE_XJC { ...@@ -205,7 +207,14 @@ public class ADE_XJC {
S2JJAXBModel model = sc.bind(); S2JJAXBModel model = sc.bind();
JCodeModel code = model.generateCode(null, listener); JCodeModel code = model.generateCode(null, listener);
code.build(outputFolder, (PrintStream)null);
// write classes using a header comment
PrologCodeWriter writer = new PrologCodeWriter(new FileCodeWriter(outputFolder, "UTF-8"),
"Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version " + this.getClass().getPackage().getImplementationVersion() + "\n"
+ "ade-xjc is part of the citygml4j project, see https://github.com/citygml4j\n"
+ "Any modifications to this file will be lost upon recompilation of the source\n"
+ "Generated: " + new Date().toString() + "\n");
code.build(writer);
File packageDir = new File(outputFolder.getAbsolutePath()); File packageDir = new File(outputFolder.getAbsolutePath());
log(LogLevel.INFO, "JAXB classes successfully written to " + packageDir.getCanonicalPath()); log(LogLevel.INFO, "JAXB classes successfully written to " + packageDir.getCanonicalPath());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment