aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/ant/GlueGenTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/sun/gluegen/ant/GlueGenTask.java')
-rw-r--r--src/java/com/sun/gluegen/ant/GlueGenTask.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/ant/GlueGenTask.java b/src/java/com/sun/gluegen/ant/GlueGenTask.java
index af42392..cc66c64 100644
--- a/src/java/com/sun/gluegen/ant/GlueGenTask.java
+++ b/src/java/com/sun/gluegen/ant/GlueGenTask.java
@@ -71,7 +71,8 @@ import org.apache.tools.ant.util.JavaEnvUtils;
includeRefid="[optional FileSet or DirSet for include files]"
literalInclude="[optional hack to get around FileSet / DirSet issues with different drives]"
emitter="[emitter class name]"
- config="[configuration file]" />
+ config="[configuration file]"
+ debug="[optional boolean]" />
* </pre>
*
* @author Rob Grzywinski <a href="mailto:[email protected]">[email protected]</a>
@@ -94,6 +95,11 @@ public class GlueGenTask extends Task
// =========================================================================
/**
+ * <p>The optional debug flag.</p>
+ */
+ private boolean debug=false;
+
+ /**
* <p>The optional output root dir.</p>
*/
private String outputRootDir;
@@ -160,6 +166,17 @@ public class GlueGenTask extends Task
// ANT getters and setters
/**
+ * <p>Set the debug flag (optional). This is called by ANT.</p>
+ *
+ * @param outputRootDir the optional output root dir
+ */
+ public void setDebug(boolean debug)
+ {
+ log( ("Setting debug flag: " + debug), Project.MSG_VERBOSE);
+ this.debug=debug;
+ }
+
+ /**
* <p>Set the output root dir (optional). This is called by ANT.</p>
*
* @param outputRootDir the optional output root dir
@@ -418,6 +435,11 @@ public class GlueGenTask extends Task
// NOTE: GlueGen uses concatenated flag / value rather than two
// separate arguments
+ // add the debug flag if enabled
+ if(debug) {
+ gluegenCommandline.createArgument().setValue("--debug");
+ }
+
// add the output root dir
if(null!=outputRootDir && outputRootDir.trim().length()>0) {
gluegenCommandline.createArgument().setValue("-O" + outputRootDir);