Show enum name in presence of Doxygen comment for simple Java enums
This commit is contained in:
parent
cb8d42b750
commit
5cfb04adb7
1 changed files with 3 additions and 3 deletions
|
|
@ -1304,17 +1304,17 @@ public:
|
||||||
Replaceall(enum_code, "$static ", "");
|
Replaceall(enum_code, "$static ", "");
|
||||||
Delete(scope);
|
Delete(scope);
|
||||||
} else {
|
} else {
|
||||||
|
if (symname && !Getattr(n, "unnamedinstance"))
|
||||||
|
Printf(constants_code, " // %s \n", symname);
|
||||||
// Translate and write javadoc comment for the enum itself if flagged
|
// Translate and write javadoc comment for the enum itself if flagged
|
||||||
if (doxygen && doxygenTranslator->hasDocumentation(n)) {
|
if (doxygen && doxygenTranslator->hasDocumentation(n)) {
|
||||||
String *doxygen_comments = doxygenTranslator->getDocumentation(n, " ");
|
String *doxygen_comments = doxygenTranslator->getDocumentation(n, " ");
|
||||||
if (comment_creation_chatter)
|
if (comment_creation_chatter)
|
||||||
Printf(constants_code, "/* This was generated from enumDeclaration() */\n");
|
Printf(constants_code, "/* This was generated from enumDeclaration() */\n");
|
||||||
Printf(constants_code, " /* Comment for enum %s */\n", Getattr(n, "unnamedinstance") ? "" : symname);
|
|
||||||
Printf(constants_code, Char(doxygen_comments));
|
Printf(constants_code, Char(doxygen_comments));
|
||||||
Printf(constants_code, "\n");
|
Printf(constants_code, "\n");
|
||||||
Delete(doxygen_comments);
|
Delete(doxygen_comments);
|
||||||
} else if (symname && !Getattr(n, "unnamedinstance"))
|
}
|
||||||
Printf(constants_code, " // %s \n", symname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit each enum item
|
// Emit each enum item
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue