Sign in to follow this  

Java: getting Eclipse to work with preprocessor

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This kind of preprocessor: #ifdef #define something #endif Eclipse has those wiggly red lines over those kinds of lines. How do I keep Eclipse from doing that while checking other syntax errors like misspelled variables? I'm willing to use a preprocessor that can have it's directives placed inside some form of Java comment, if one is available. I'm also willing to switch to another full featured editor (preferrably free). So... what should I do? Thanks.

Share this post


Link to post
Share on other sites
Hey,

This sounds like a job for Antenna.

The preprocessor that comes with antenna doesnt integrate with Eclipse but allows you to hide your preprocessor directives behind the comments


//#ifdef DEBUG
System.out.println("this will only be displayed if DEBUG is defined!");
//#endif



Ontop of needing antenna you will also need ant. Remember the preprocessor doesnt integrate into eclipse, but the nice comments allow for the IDE to skip over them and just read them as comments.

Share this post


Link to post
Share on other sites
Quote:
Original post by kooktroop
This sounds like a job for Antenna.


I'm curious on how you're setting up Eclipse. Are you using Antenna to do the entire build process thus removing Eclipse's builder, or are you using the preprocessor with Eclipse's builder?

Share this post


Link to post
Share on other sites
I dont use ANT with Eclipse but thats because i use some of the ant tasks that arent supported by eclipse (at least the version i have). I'm sure if i spent the time i could set it up to work but ive got other things to do.

At the moment i just run ant from the command line. I find it better this way anyhow. All i have to do is type ant and press enter, rather than a series of clicks with the mouse.

Share this post


Link to post
Share on other sites

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this