the ifdef markup does not compute what is active and what not (it can not do that, as it does not know which param will be passed to fpc)
you need to tell it about each ifdef node, and if it is active or not. search ide/sourceeditor.pp
In the IDE the info comes from codetools