You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/09/01 21:46:31 UTC

svn commit: r991669 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator: ./ src/main/java/org/apache/activemq/nms/openwire/tool/commands/ src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/

Author: tabish
Date: Wed Sep  1 19:46:30 2010
New Revision: 991669

URL: http://svn.apache.org/viewvc?rev=991669&view=rev
Log:
Update the NMS Commands and Marshalers generator to produce somewhat cleaner code, removes unneeded using statements.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml?rev=991669&r1=991668&r2=991669&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml Wed Sep  1 19:46:30 2010
@@ -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>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java?rev=991669&r1=991668&r2=991669&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java Wed Sep  1 19:46:30 2010
@@ -122,10 +122,7 @@ public class CommandClassGenerator exten
             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 class CommandClassGenerator exten
     }
 
     protected void generateUsingDirectives( PrintWriter out ) {
-        out.println("using System;");
-        out.println("using System.Collections;");
 
         if( getBaseClassName().equals( "BaseCommand" ) ) {
             out.println("");

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java?rev=991669&r1=991668&r2=991669&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java Wed Sep  1 19:46:30 2010
@@ -29,6 +29,8 @@ public class MessageGenerator extends Co
     protected void generateUsingDirectives( PrintWriter out ) {
         super.generateUsingDirectives(out);
 
+        out.println("using System;");
+        out.println("");
         out.println("using Apache.NMS.Util;");
     }
 

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java?rev=991669&r1=991668&r2=991669&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java Wed Sep  1 19:46:30 2010
@@ -28,6 +28,12 @@ public class MessageIdGenerator extends 
         out.println("");
     }
 
+    protected void generateUsingDirectives( PrintWriter out ) {
+        super.generateUsingDirectives(out);
+
+        out.println("using System;");
+    }
+
     protected void generateConstructors( PrintWriter out ) {
 
         out.println("        public "+getClassName()+"() : base()");

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java?rev=991669&r1=991668&r2=991669&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java Wed Sep  1 19:46:30 2010
@@ -48,6 +48,12 @@ public class ProducerIdGenerator extends
         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;");

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java?rev=991669&r1=991668&r2=991669&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java Wed Sep  1 19:46:30 2010
@@ -149,12 +149,9 @@ out.println(" */");
         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("{");