Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Code Completion works only partially per file

<< < (3/3)

mandrav:
Thanks for investigating some more.

So, here's the deal: the parser does parse preprocessor directives (if enabled in options) but only to collect them as tokens. The only extra handling for preprocessor directives is distinguishing #if/#else blocks. In that case it always parses inside the #if/#ifdef and skips the #else/#elsif. The only thing missing yet is support for the special "#if 0" directive so that it skips it and parse the #else/#elsif branch instead. This is planned and will come at some point.

There are no plans atm to add "smarter" behaviour wrt preprocessor blocks and that's because it's just a parser. It's not a compiler (or a post-processor if you like).

jamieo:
Hmm... Did you have time yet to look into the headers I attached?  I don't think it's a new feature I'm requesting - the code is already there, it just ain't workin!  ;)

When you say it always parses inside the #if/#ifdef and skips the #else/#elsif do you mean when the #if condition is true?  Otherwise the inverse should be perfomed?  Anyway, your post confirms that turning off the option should stop it caring about the preprocessor directives all together... so why does the problem occur with this option turned off? 

While on the subject of preprocessor directives, did you see my previous post?  With the preprocessor option on, functions defined by ie, '#define MessageBox  MessageBoxW' are parsed but the #define isn't followed to set up the tooltips for the function parameters.  Is this what you mean when you say only tokens are collected?  Surely once you have the token it would be straightforward (for the original dev anyway) to lookup the function it references and copy the parameters (tooltip string) to the new token?

The annoying thing is that apart from these niggles the parser works very well - it just seems everybody has given up on it!   Unfortunately it's these little bugs that prevent it from being useful for it's purpose - which afaic is to have all the available symbols in the list and not having to have the MSDN docs (or similar) to hand.

I've checked out the CodeBlocks source from svn but am not getting too far in compiling wxwidgets with mingw (although vc2003 is no problem).  It's unfortunate that these little bugs ruin the usefulness of what is a great IDE - I would much prefer using CodeBlocks over VS2005 but without these basic features working properly I find myself using VS2005 for coding while most of my time in CodeBlocks is spent investigating the cause of various problems.   :(

Are these bugs being looked into?  Your last post sounds as though you do not intend to and while it's your right to prioritise your time could you confirm either way case so I can prioritise my time too.

Jamie

Navigation

[0] Message Index

[*] Previous page

Go to full version