Fixed enum comments generation in java
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13209 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4289b8e273
commit
304e232dbc
2 changed files with 18 additions and 4 deletions
|
|
@ -64,7 +64,6 @@ public class doxygen_parsing_enums_simple_runme {
|
||||||
com.sun.tools.javadoc.Main.execute("doxygen_parsing_enums_simple runtime test",
|
com.sun.tools.javadoc.Main.execute("doxygen_parsing_enums_simple runtime test",
|
||||||
"doxygen_parsing_enums_simple_runme", new String[]{"-quiet", "doxygen_parsing_enums_simple"});
|
"doxygen_parsing_enums_simple_runme", new String[]{"-quiet", "doxygen_parsing_enums_simple"});
|
||||||
|
|
||||||
wantedComments.put("E_TEST", " Test enumeration \n");
|
|
||||||
wantedComments.put("E_TEST_ONE", " the first item \n");
|
wantedComments.put("E_TEST_ONE", " the first item \n");
|
||||||
wantedComments.put("E_TEST_TWO", " the second \n");
|
wantedComments.put("E_TEST_TWO", " the second \n");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1279,8 +1279,12 @@ public:
|
||||||
Replaceall(enum_code, "$static ", "");
|
Replaceall(enum_code, "$static ", "");
|
||||||
Delete(scope);
|
Delete(scope);
|
||||||
} else {
|
} else {
|
||||||
// Wrap C++ enum with integers - just indicate start of enum with a comment, no comment for anonymous enums of any sort
|
//translate and write javadoc comment for the enum itself if flagged
|
||||||
if (symname && !Getattr(n, "unnamedinstance"))
|
if (doxygen && doxygenTranslator->hasDocumentation(n)){
|
||||||
|
Printf(stdout, "Warning: Not emitting comment for %s, not supported in simple enums mode.\n",
|
||||||
|
Getattr(n, "unnamedinstance") ? "unnamed enum" : symname);
|
||||||
|
}
|
||||||
|
else if (symname && !Getattr(n, "unnamedinstance"))
|
||||||
Printf(constants_code, " // %s \n", symname);
|
Printf(constants_code, " // %s \n", symname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1337,7 +1341,18 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Printv(f_enum, typemapLookup(n, "javaimports", typemap_lookup_type, WARN_NONE), // Import statements
|
Printv(f_enum, typemapLookup(n, "javaimports", typemap_lookup_type, WARN_NONE), // Import statements
|
||||||
"\n", enum_code, "\n", NIL);
|
"\n\n", NIL);
|
||||||
|
|
||||||
|
//translate and write javadoc comment if flagged
|
||||||
|
if (doxygen && doxygenTranslator->hasDocumentation(n)){
|
||||||
|
String *doxygen_comments=doxygenTranslator->getDocumentation(n);
|
||||||
|
if(comment_creation_chatter)
|
||||||
|
Printf(f_enum, "/* This was generated from enumDeclaration() */");
|
||||||
|
Printf(f_enum, Char(doxygen_comments));
|
||||||
|
Delete(doxygen_comments);
|
||||||
|
}
|
||||||
|
|
||||||
|
Printv(f_enum, enum_code, "\n", NIL);
|
||||||
|
|
||||||
Printf(f_enum, "\n");
|
Printf(f_enum, "\n");
|
||||||
Close(f_enum);
|
Close(f_enum);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue