diff options
author | Sven Gothel <[email protected]> | 2023-08-10 10:55:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-08-10 10:55:35 +0200 |
commit | c30f0db4b785f21288f9cc5f7fd65393781d93c3 (patch) | |
tree | 79031f248c80ba55dd67d90d77d4fb73f7147b60 | |
parent | 5b6e6af3932ece0c656cf4438100f4e213ea91b6 (diff) |
Bug 1450: Be more verbose w/ JavaEmitter comment lines for enums and defines, include native expression
-rw-r--r-- | src/java/com/jogamp/gluegen/GlueGen.java | 11 | ||||
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java index 5aa76f8..5d656a4 100644 --- a/src/java/com/jogamp/gluegen/GlueGen.java +++ b/src/java/com/jogamp/gluegen/GlueGen.java @@ -290,14 +290,19 @@ public class GlueGen implements GlueEmitterControls { } comment.append("</code>"); } + if (comment.length() > 0) { + comment.append("<br>\n"); + } if (def.getEnumName() != null) { - if (comment.length() > 0) - comment.append("<br>\n"); - comment.append("Defined as part of enum type \""); comment.append(def.getEnumName()); comment.append("\""); + } else { + comment.append("Define \""); + comment.append(def.getName()); + comment.append("\""); } + comment.append(" from expression '<code>"+def.getNativeExpr()+"</code>'"); if (comment.length() > 0) { emit.emitDefine(def, comment.toString()); comment.setLength(0); diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 9d0edef..0d26071 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -339,7 +339,7 @@ public class JavaEmitter implements GlueEmitter { javaUnit().emit(" /** "); if (optionalComment != null && optionalComment.length() != 0) { javaUnit().emit(optionalComment); - javaUnit().emit(" - "); + javaUnit().emit(", "); } javaUnit().emit("CType: "); if( constExpr.resultType.isUnsigned ) { |