From c30f0db4b785f21288f9cc5f7fd65393781d93c3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 10 Aug 2023 10:55:35 +0200 Subject: Bug 1450: Be more verbose w/ JavaEmitter comment lines for enums and defines, include native expression --- src/java/com/jogamp/gluegen/GlueGen.java | 11 ++++++++--- src/java/com/jogamp/gluegen/JavaEmitter.java | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/java') 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(""); } + if (comment.length() > 0) { + comment.append("
\n"); + } if (def.getEnumName() != null) { - if (comment.length() > 0) - comment.append("
\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 '"+def.getNativeExpr()+"'"); 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 ) { -- cgit v1.2.3