From dc32ed4f045cbdfdc70fe8572564cd8e3b5eb33b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 1 Apr 2015 16:05:18 +0200 Subject: Bug 1153 - GLEmitter: Only dump extra comment if w/o enum-name or w/o extension Since GlueGen handles enum typedef's properly, this relation to the enum-name is already printed. --- src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java') diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java index c0a527ad7..8df4a9488 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java @@ -377,18 +377,17 @@ public class GLEmitter extends ProcAddressEmitter { public void emitDefine(final ConstantDefinition def, final String optionalComment) throws Exception { final String symbolRenamed = def.getName(); final StringBuilder newComment = new StringBuilder(); - newComment.append("Part of "); if (0 == addExtensionsOfSymbols2Doc(newComment, ", ", ", ", symbolRenamed)) { if (def.isEnum()) { final String enumName = def.getEnumName(); - if (null != enumName) { - newComment.append(enumName); - } else { - newComment.append("CORE ENUM"); + if (null == enumName) { + newComment.append("Part of CORE "); + newComment.append("ENUM"); } } else { if (getGLConfig().getAllowNonGLExtensions()) { - newComment.append("CORE DEF"); + newComment.append("Part of CORE "); + newComment.append("DEF"); } else { // Note: All GL defines must be contained within an extension marker ! // #ifndef GL_EXT_lala @@ -403,7 +402,9 @@ public class GLEmitter extends ProcAddressEmitter { } } if (null != optionalComment) { - newComment.append("
"); + if( newComment.length() > 0 ) { + newComment.append("
"); + } newComment.append(optionalComment); } -- cgit v1.2.3