Skip to content
Permalink
Browse files
Marshaler class generation now works, and some fixes to Command gener…
…ation.
  • Loading branch information
Timothy A. Bish committed Jul 29, 2009
1 parent 3b257ca commit 6fb65661d424f27f4b2bb67430fdab402090b65b
Showing 3 changed files with 630 additions and 298 deletions.
@@ -20,6 +20,7 @@
import java.io.File;

import org.apache.activemq.nms.openwire.tool.commands.CommandGenerator;
import org.apache.activemq.nms.openwire.tool.marshalers.AmqCSharpMarshallersGenerator;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -63,8 +64,10 @@ public void execute() throws BuildException {
try {

String sourceDir = source + "/src/main/java";
String targetDir = target + "/src/main/csharp";

System.out.println("Parsing source files in: " + sourceDir);
System.out.println("Writing resultant files in: " + targetDir);

JamServiceFactory jamServiceFactory = JamServiceFactory
.getInstance();
@@ -76,42 +79,18 @@ public void execute() throws BuildException {
{
CommandGenerator script = new CommandGenerator();
script.setJam(jam);
script.setTargetDir(target + "/src/main/csharp");
script.setTargetDir(targetDir);
script.setOpenwireVersion(maxVersion);
script.run();
}

// for (int i = 1; i <= maxVersion; ++i) {
//
// {
// AmqCppMarshallingHeadersGenerator script = new AmqCppMarshallingHeadersGenerator();
// script.setJam(jam);
// script.setTargetDir(target + "/src/main");
// script.setOpenwireVersion(i);
// script.run();
// }
// {
// AmqCppMarshallingClassesGenerator script = new AmqCppMarshallingClassesGenerator();
// script.setJam(jam);
// script.setTargetDir(target + "/src/main");
// script.setOpenwireVersion(i);
// script.run();
// }
// {
// AmqCppTestMarshallingHeadersGenerator script = new AmqCppTestMarshallingHeadersGenerator();
// script.setJam(jam);
// script.setTargetDir(target + "/src/test");
// script.setOpenwireVersion(i);
// script.run();
// }
// {
// AmqCppTestMarshallingClassesGenerator script = new AmqCppTestMarshallingClassesGenerator();
// script.setJam(jam);
// script.setTargetDir(target + "/src/test");
// script.setOpenwireVersion(i);
// script.run();
// }
// }
for (int i = 1; i <= maxVersion; ++i) {
AmqCSharpMarshallersGenerator script = new AmqCSharpMarshallersGenerator();
script.setJam(jam);
script.setTargetDir(targetDir);
script.setOpenwireVersion(i);
script.run();
}

} catch (Exception e) {
throw new BuildException(e);
@@ -57,7 +57,7 @@ protected void generateProperties( PrintWriter out ) {
}

protected void generateAdditonalMembers( PrintWriter out ) {
out.println(" public ConnectionId getParentId");
out.println(" public ConnectionId ParentId");
out.println(" {");
out.println(" get");
out.println(" {");

0 comments on commit 6fb6566

Please sign in to comment.