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/04/05 17:47:49 UTC

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

Author: tabish
Date: Mon Apr  5 15:47:48 2010
New Revision: 930885

URL: http://svn.apache.org/viewvc?rev=930885&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQNET-246
Fix the generated code to use correct interfaces.

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/CommandCodeGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandGenerator.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=930885&r1=930884&r2=930885&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml Mon Apr  5 15:47:48 2010
@@ -61,7 +61,7 @@
   </mailingLists>
 
   <properties>
-    <activemq-version>5.3.0</activemq-version>
+    <activemq-version>5.3.1</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/CommandCodeGenerator.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/CommandCodeGenerator.java?rev=930885&r1=930884&r2=930885&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandCodeGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandCodeGenerator.java Mon Apr  5 15:47:48 2010
@@ -145,6 +145,12 @@ public abstract class CommandCodeGenerat
         else if( name.equals("ByteSequence") ) {
             return "byte[]";
         }
+        else if( name.equals("Comparable") ) {
+            return null;
+        }
+        else if( name.equals("MarshallAware") ) {
+            return null;
+        }
         else if( name.equals("boolean") ) {
             return "bool";
         }

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandGenerator.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/CommandGenerator.java?rev=930885&r1=930884&r2=930885&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandGenerator.java Mon Apr  5 15:47:48 2010
@@ -86,6 +86,15 @@ public class CommandGenerator extends Mu
         generator.setOpenWireOpCode( getOpenWireOpCode(getJclass()) );
         generator.setComparable( className.endsWith("Id") || generator.isComparable() );
 
+        for (int i = 0; i < getJclass().getInterfaces().length; i++) {
+            JClass intf = getJclass().getInterfaces()[i];
+
+            String name = generator.toCSharpType( intf );
+            if( name != null && !name.endsWith("DataStructure") && !name.equals("Command") ) {
+                generator.addAdditionalBase( name );
+            }
+        }
+
         PrintWriter out = null;
         try {
             out = new PrintWriter(new FileWriter(headerFile));