Bug #11536 2007-07-11 05:36

rickg22

Same tokens in different projects, missing

Here's a tricky one. Copy one project - any project - to a different directory. Open both the original and the cloned project in Code::Blocks.

Switch to the symbols tab. Only one project displays the tokens when choosing "Active Project's symbols". If I close one of the open projects (depending on which one was parsed first), the symbols don't appear either. I have to close C::B and open that project for the symbols to appear.

I think this bug appeared after changing from "one parser per project", to "one parser per workspace": The parser thinks they're duplicate tokens, and functionally they are, but they refer to completely different files.

This case hadn't been accounted for when CC. had been designed. I don't think this could (or should) be fixed in the short term due to the 1.0 deadline. Perhaps we might need to discuss an appropriate solution in the forums.

Category
Plugin::CodeCompletion
Group
 
Status
Closed
Close date
2010-10-16 01:34
Assigned to
loaden
mandrav 2007-07-11 11:16

Although you 're right in what you 're saying, it will not be fixed. This "limitation" is a chosen one, i.e. it was taken into account when designing the thing.

Your example is something that I doubt would ever happen to anyone in a real-world application/workspace.

Hence I am not closing this but leaving it for future reference. Just don't expect any work on it for the foreseeable future.

rickg22 2007-07-11 18:12

Alright then. By the way, a possible (looooong-term) solution would be to include project id's in the parser, and keep the file-id's in an std::map of projects for each token.this way, we could, for example switch to the declaration / implementation and navigate to different files according to the currently opened project. But then again, it's a long-term idea, possibly implemented in the next major version of CC.

loaden 2010-10-16 01:34

This bug has been already fixed in HEAD.

Thank you.