This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
I want to clean up my source code. I am looking for a tool that read all .java files of given folder and its subfolders, and perform following operations (i) If length of commented block is more then 10 lines, remove it (ii) If SOP exist in catch block, replace it with e.printStackTrace(); (iii) Remove all SOPs
Is there any OpenSouce Tool for this?
My blood is tested +ve for Java.
posted 8 years ago
So far as per my knowledge there is no such a tool. You need to write your own program which reads the file one by one. and search for /* & */. if the length betwen them is more then 10 lines simple remove them. You can check for the remaining conditions also.