Permalink
Browse files

Removed hard-coded package name from Java code generators

  • Loading branch information...
hintjens committed Dec 27, 2012
1 parent ba2d932 commit 187d7dc8d069a2afaf9eea52ebb7d4e4e9659d4f
Showing with 20 additions and 20 deletions.
  1. +6 −6 model/client_java.gsl
  2. +5 −5 model/codec_java.gsl
  3. +3 −3 model/generate
  4. +6 −6 model/server_java.gsl
View
@@ -4,8 +4,8 @@
.#
.include "library.gsl"
.resolve_includes ()
-.echo "Generating ../java/src/main/java/org/filemq/$(class.name:pascal).java..."
-.output "../java/src/main/java/org/filemq/$(class.name:pascal).java"
+.echo "Generating ../java/src/main/java/org/$(switches.package)/$(class.name:pascal).java..."
+.output "../java/src/main/java/org/$(switches.package)/$(class.name:pascal).java"
/* =========================================================================
$(class.name:pascal).java
@@ -32,7 +32,7 @@
. endfor
.endfor
-package org.filemq;
+package org.$(switches.package);
import java.util.List;
import java.util.Iterator;
@@ -586,8 +586,8 @@ long $(name)\
}
-.echo "Generating ../java/src/test/java/org/filemq/Test$(class.name:pascal).java..."
-.output "../java/src/test/java/org/filemq/Test$(class.name:pascal).java"
+.echo "Generating ../java/src/test/java/org/$(switches.package)/Test$(class.name:pascal).java..."
+.output "../java/src/test/java/org/$(switches.package)/Test$(class.name:pascal).java"
/* =========================================================================
Test$(class.name:pascal).java
@@ -600,7 +600,7 @@ long $(name)\
// --------------------------------------------------------------------------
// Selftest
-package org.filemq;
+package org.$(switches.package);
import org.junit.Test;
View
@@ -5,8 +5,8 @@
.include "library.gsl"
.resolve_includes ()
.global.ClassName = java_class_name($(class.name))
-.echo "Generating ../java/src/main/java/org/filemq/$(ClassName).java..."
-.output "../java/src/main/java/org/filemq/$(ClassName).java"
+.echo "Generating ../java/src/main/java/org/$(switches.package:)/$(ClassName).java..."
+.output "../java/src/main/java/org/$(switches.package:)/$(ClassName).java"
/* =========================================================================
$(ClassName).java
@@ -66,7 +66,7 @@
.endfor
*/
-package org.filemq;
+package org.$(switches.package:);
import java.util.Collection;
import java.util.List;
@@ -844,11 +844,11 @@ public class $(ClassName)
}
.echo "Generating ../Java/src/test/java/org/zeromq/zyre/Test$(ClassName).java..."
-.output "../java/src/test/java/org/filemq/Test$(ClassName).java"
+.output "../java/src/test/java/org/$(switches.package:)/Test$(ClassName).java"
// --------------------------------------------------------------------------
// Selftest
-package org.filemq;
+package org.$(switches.package:);
import static org.junit.Assert.*;
import org.junit.Test;
View
@@ -3,6 +3,6 @@ gsl -q -trace:0 -animate:0 fmq_server.xml
gsl -q -script:graphs fmq_server.xml
gsl -q -trace:0 -animate:0 fmq_client.xml
-gsl -q -script:codec_java fmq_msg.xml
-gsl -q -script:server_java -trace:0 -animate:0 fmq_server.xml
-gsl -q -script:client_java -trace:0 -animate:0 fmq_client.xml
+gsl -q -script:codec_java -package:filemq fmq_msg.xml
+gsl -q -script:server_java -package:filemq -trace:0 -animate:0 fmq_server.xml
+gsl -q -script:client_java -package:filemq -trace:0 -animate:0 fmq_client.xml
View
@@ -4,8 +4,8 @@
.#
.include "library.gsl"
.resolve_includes ()
-.echo "Generating ../java/src/main/java/org/filemq/$(class.name:pascal).java..."
-.output "../java/src/main/java/org/filemq/$(class.name:pascal).java"
+.echo "Generating ../java/src/main/java/org/$(switches.package)/$(class.name:pascal).java..."
+.output "../java/src/main/java/org/$(switches.package)/$(class.name:pascal).java"
/* =========================================================================
$(class.name).c
@@ -16,7 +16,7 @@
=========================================================================
*/
-package org.filemq;
+package org.$(switches.package);
import java.util.List;
import java.util.Iterator;
@@ -667,12 +667,12 @@ long $(name)\
}
}
-.echo "Generating ../java/src/test/java/org/filemq/Test$(class.name:pascal).java..."
-.output "../java/src/test/java/org/filemq/Test$(class.name:pascal).java"
+.echo "Generating ../java/src/test/java/org/$(switches.package)/Test$(class.name:pascal).java..."
+.output "../java/src/test/java/org/$(switches.package)/Test$(class.name:pascal).java"
// --------------------------------------------------------------------------
// Selftest
-package org.filemq;
+package org.$(switches.package);
import static org.junit.Assert.*;
import org.junit.Test;

0 comments on commit 187d7dc

Please sign in to comment.