views:

425

answers:

2

I'll try to better explain my problem. Using Eclipse and MTJ (Mobile Tools for Java) plugin you can set some directives for the preprocessor in order to create different builds of your code, like in C/C++. My problem is that i'm unable to use this feature. I mean, when i build my sources, the resulting output contains every line of code, even ones contained within

//#mdebug info
...
//#enddebug

directive. I have "Enable preprocessing" option checked and i've changed the debug level to every possible setup (lower, equals and higher than "info") and the result is always the same: the directives are simply ignored.

+2  A: 

Are you using v0.9.1 (or an even more recent version) of MTJ? This wiki shows their planning for MTJ and mdebug and debug were not supported until 0.9.1.

For anyone that might come across this, here is the setup instruction page for preprocessing.

Fostah
yes i'm using 0.9.1 release of MTJ
Stefano Driussi
Thanks for your reply. however, the link you posted is referred to eclipseme that is the old and discontinued plugin for JavaME development within eclipse. now it's reborn as MTJ (http://www.eclipse.org/dsdp/mtj/)
Stefano Driussi
+1  A: 

Found it! It was a configuration issue, my mistake. Still there is a problem with MTJ plugin itself: when you export the build.xml file to feed Ant, whatever debug level you have selected on the dropdown menu, it will always end in writing "info" on the output, so I have to change it manually. I'll try to ask directly the developers of the plugin.

Stefano Driussi