Closed VincentBlondeau closed 5 years ago
Interesting. I will take a look.
Thanks for all these issue! :)
It turns out that I do not get the comments because JDT does not provide them. Something seems to be wrong somewhere. If someone is interested in debugging further, the relevant method is in InJavaImporter.ensureCommentFromBodyDeclaration(...). There is a (expected failure) test documenting the problem here: ClassWithCommentsTest.testMethodWithOneLineCommentIncludingALink()
Maybe you should look here: http://stackoverflow.com/questions/3019729/how-to-access-comments-from-the-java-compiler-tree-api-generated-ast/9884987#9884987.
It seems that is not parsed by JDT, and one have to do it by parsing or copying the text itself.
Some code comments are cut and the text is not full in the model. E.g.: Parsing of (always in the https://github.com/awillemant/puho git repo):
Give a comment with only // instead of //thanks to http://www.aveol.fr/?p=602