How to get eclipse to recognize preprocessor statements?
eclipse, eclipse-plugin, ide, java
Solution
A more OO approach to this would use separate classes, selecting between them at runtime:
public class FirstVideo extends FirstCanvas {
...
}
public class SecondVideo extends SecondCanvas {
...
}
...
video = (something ? new FirstVideo() : new SecondVideo());
This does not require non-standard compilation steps to achieve and doesn't open the door to the eldritch horrors of C/C++ preprocessor directives.
Problem
I've managed to get the IDE to compile the java project correctly by modifying the config.ini, but the IDE itself is still showing errors concerning the processor statements: ``` //#ifdef VER_X public class Video extends FirstCanvas { //#else public class Video extends SecondCanvas { //#endif ... ``` Is there a setting or a plug-in that would solve this? EDIT: Maybe a little clarification: I'm looking for something that will make the IDE editor more compliant with the code. It won't let me follow any definitions because of what the editor THINKS are errors.