I need to modify a code but it has so many unused comments like this:
/* 6: */ import java.util.List;
/* 7: */ import org.apache.ibatis.session.SqlSession;
/* 8: 7 */ import org.apache.ibatis.session.SqlSessionFactory;
/* 9: */ import org.apache.log4j.LogManager;
/* 10: */ import org.apache.log4j.Logger;
I can give one alternative way .I 'm using this method.
There is a option search and replace in netbeans. Enable regex option and then type a regex to match the comments and replace with empty character. go to edit menu and then replace.
use regex
/\\*.*?\\*/
to match /*comment*/ style comment
edit > replace
example

I think it's not hard to create a netbeans addon to do this with a button .
Also rectangular selection tool can be helpful some times if the area is a rectangle
example

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With