Is there any tool / Eclipse plugin that can remove all JavaDoc comments in a file?
The normal (non-JavaDoc) comments should be intact after running the tool.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this regex to search replace either in eclipse / sed / your favorite editor that has regex support.
?streat input as single line\***/*/Edit
To tackle cases where strings containing javadoc, use this regex
and replace it with first capture group
Then if you say this shouldn’t match
or more complex cases
I suggest, using a parser tool like antlr to parse using java grammar for tokens like comments and strings and remove elements that you don’t want
Sometime I find my own regex answers cryptic !!
So here is some visual feedback
Debuggex Demo
Debuggex Demo