PreProcessing plugin to remove debug and loggin calls
Hi,
I am looking to do certain preprocessing of the java code at build time using the Intellij Refactoring capabilities such as remove all the debug code in production mode.
This is exactly I am looking to achive through Intellj open api
http://stackoverflow.com/questions/451385/remove-uses-of-certain-java-classes-at-compile-time
Can any one sugest me a good way to start this effort though a good plugin development document, opensource refactoring plugins developed if any
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
Please sign in to leave a comment.
This issue would be been simpler, in case JavaC would have automatically removed the calls to a method which has no instructions.
public final class Log
{
public static final void printLOG(final String value)
{
}
}
public final class Use
{
public void nag()
{
String s = "kk";
String y = "ee";
Log.printLOG(s + y);//line 3
}
public static void main(String[] args)
{
new Use().nag();
}
}
As printLOG() is empty.. the code generated for Use would have been with the line number : 3