Skip to content
Permalink
Browse files
Update the NMS Commands and Marshalers generator to produce somewhat …
…cleaner code, removes unneeded using statements.
  • Loading branch information
Timothy A. Bish committed Sep 1, 2010
1 parent a6e0662 commit 636543c3de4448d6ce03e3c832e3ecdf25747208
Showing 6 changed files with 17 additions and 11 deletions.
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>6</version>
<version>7</version>
</parent>

<modelVersion>4.0.0</modelVersion>
@@ -61,7 +61,7 @@
</mailingLists>

<properties>
<activemq-version>5.4-SNAPSHOT</activemq-version>
<activemq-version>5.5-SNAPSHOT</activemq-version>
<projectName>Apache NMS.ActiveMQ</projectName>
<annogen-version>0.1.0</annogen-version>
<ant-version>1.6.2</ant-version>
@@ -122,10 +122,7 @@ public void generate( PrintWriter out ) {
out.println(" ///");
out.println(" public override bool Is"+getClassName());
out.println(" {");
out.println(" get");
out.println(" {");
out.println(" return true;");
out.println(" }");
out.println(" get { return true; }");
out.println(" }");
out.println("");
}
@@ -151,8 +148,6 @@ public void generate( PrintWriter out ) {
}

protected void generateUsingDirectives( PrintWriter out ) {
out.println("using System;");
out.println("using System.Collections;");

if( getBaseClassName().equals( "BaseCommand" ) ) {
out.println("");
@@ -29,6 +29,8 @@ public MessageGenerator() {
protected void generateUsingDirectives( PrintWriter out ) {
super.generateUsingDirectives(out);

out.println("using System;");
out.println("");
out.println("using Apache.NMS.Util;");
}

@@ -28,6 +28,12 @@ protected void generateProperties( PrintWriter out ) {
out.println("");
}

protected void generateUsingDirectives( PrintWriter out ) {
super.generateUsingDirectives(out);

out.println("using System;");
}

protected void generateConstructors( PrintWriter out ) {

out.println(" public "+getClassName()+"() : base()");
@@ -48,6 +48,12 @@ protected void generateConstructors( PrintWriter out ) {
super.generateConstructors(out);
}

protected void generateUsingDirectives( PrintWriter out ) {
super.generateUsingDirectives(out);

out.println("using System;");
}

protected void generateProperties( PrintWriter out ) {

out.println(" private SessionId parentId;");
@@ -149,12 +149,9 @@ protected void generateFile(PrintWriter out) throws Exception {
out.println(" */");
out.println("");
out.println("using System;");
out.println("using System.Collections;");
out.println("using System.IO;");
out.println("");
out.println("using Apache.NMS.ActiveMQ.Commands;");
out.println("using Apache.NMS.ActiveMQ.OpenWire;");
out.println("using Apache.NMS.ActiveMQ.OpenWire.V"+getOpenwireVersion()+";");
out.println("");
out.println("namespace Apache.NMS.ActiveMQ.OpenWire.V"+getOpenwireVersion());
out.println("{");

0 comments on commit 636543c

Please sign in to comment.