eclipse-m2t-jet

Generating Java code from XML in Eclipse

点点圈 提交于 2020-01-09 10:09:28
问题 I am working on a project that will have several Java classes that are very similar to each other, and that I would like to generate from XML files. What I would like to be able to do is change the Eclipse build process to do something like this: Compile the code generator Run the code generator, converting the XML to Java Compile the rest of the project I could do this all manually but I would prefer to be able to have Eclipse do it all for me. Example I want to be able to take a source XML

Using JET to generate code: Indenting code

心不动则不痛 提交于 2019-12-07 07:05:29
问题 I'm trying to do the following: Write a JET template that receives an object of type Class as argument. The object should represent a Java interface. The template generates a class that implements the interface, i.e. provides methods for all the method signatures it defines. The name of the generated class should be XImplementation where X is the name of the argument interface. The methods in the generated class do nothing or only return constant values: 0 for int and double, false for

Generating Java code from XML in Eclipse

青春壹個敷衍的年華 提交于 2019-11-28 09:31:28
I am working on a project that will have several Java classes that are very similar to each other, and that I would like to generate from XML files. What I would like to be able to do is change the Eclipse build process to do something like this: Compile the code generator Run the code generator, converting the XML to Java Compile the rest of the project I could do this all manually but I would prefer to be able to have Eclipse do it all for me. Example I want to be able to take a source XML file that looks like this: <command-list> <command name="DATE" /> <command name="GROUP"> <capability