Well, apparently not quite heresy, because Eclipse today announced a Java preprocessor as part of the Eclipse Mobile Tools for Java Project (MTJ):
http://www.eclipse.org/org/press-release/20081015_mtj.php I installed the MTJ runtime from http://download.eclipse.org/dsdp/mtj/downloads/drops/R-0.9-200810141345/ but it looks like it only works with MIDlet projects (Java ME) by default, because the "Enable Preprocessing" did not show up in my Android projects context menus under Eclipse Ganymede. From the Eclipse Help | Search (for "preprocessor"), it shows that the preprocessor has all the normal #ifdef #else #endif etc directives (to be preceded by //), so it looks like this could suit us well once we figure out how to enable the MTJ preprocessor for Android projects under Eclipse. Any Eclipse experts? Regards On Sep 10, 1:23 pm, blindfold <[EMAIL PROTECTED]> wrote: > Clever find, yes, this way we can get rid of changing the closing tags > in global substitution such that one need only apply one global > substitution instead of two. Without the comment coloring of Eclipse > it does get confusing to read though. Concerning your //* method, I > would suggest to use something like //*! such that after replacing > this by /*! you can substitute backwards to //*! in order to re- > activate the code segments. with //* to /* alone there is no safe > return path. Basically here I just collapsed my earlier opening tag / > **/ // <xOpenIntents> into a shorter unique comment delimiter. So this > would give > > //*! > int a = 1; > int b = 1; > /* */ > > where one can flip between //*! and /*! through global substitution. > Just as with #ifdef's, I'd rather keep the approach a little more > general such that I can selectively activate and deactivate code > sections in case I have more than just OpenIntents code to toggle on > and off. So I'd then opt for something more specific to OpenIntents > like > > //*<OpenIntents> > int a = 1; > int b = 1; > /* */ > > and flip between //*<OpenIntents> and /*<OpenIntents> through global > substitution. I guess all of this is considered heresy in some > circles. :-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---