Code::Blocks Forums

User forums => Help => Topic started by: roussec on August 22, 2005, 02:54:27 pm

Title: Code Completion / Suggestion - only after compile?
Post by: roussec on August 22, 2005, 02:54:27 pm
Code completion seems to currently only work after I compile the source once (or whenever I add something new that needs to be recognized). Is this intended behaviour? Is there a way to enable "on-demand" compiling?

Christian
Title: Re: Code Completion / Suggestion - only after compile?
Post by: Urxae on August 22, 2005, 04:14:10 pm
Actually, I think it parses after you save your source. It just happens that when you compile, you save your source automatically.
If you go to the symbols tab and right-click you can tell C::B to "reparse now", but I'm not sure if that works on non-saved files or not.
Title: Re: Code Completion / Suggestion - only after compile?
Post by: rickg22 on August 22, 2005, 05:14:52 pm
Try checking the "always update cache" box in the code completion settings...
Title: Re: Code Completion / Suggestion - only after compile?
Post by: roussec on August 22, 2005, 07:22:28 pm
It works after saving, thanks Urxae. Reparse now does not work on non saved files and "always update" does not seem to help either. Is this intended or not yet implemented?

Christian
Title: Re: Code Completion / Suggestion - only after compile?
Post by: rickg22 on August 22, 2005, 08:07:11 pm
i think parsing is only done on already saved files.
Title: Re: Code Completion / Suggestion - only after compile?
Post by: mandrav on August 22, 2005, 08:10:02 pm
Parsing is performed on saved files only.
When code-completion is invoked, the local scope is also parsed for local variables (no need to be saved - it reads directly from the active editor).
And the "always update cache" option refers to the cache and means to always update the cache (physically, on disk) when the project is closed, regardless if it thinks it hasn't changed (the cache).

Yiannis.
Title: Re: Code Completion / Suggestion - only after compile?
Post by: rickg22 on August 22, 2005, 10:32:20 pm
perhaps we need to rephrase that setting...

programmers like to know what's happening behind curtains. And "only when necessary" isn't very descriptive :P
Title: Re: Code Completion / Suggestion - only after compile?
Post by: mandrav on August 22, 2005, 11:24:30 pm
And "only when necessary" isn't very descriptive :P

You 're referring to?

Yiannis.
Title: Re: Code Completion / Suggestion - only after compile?
Post by: roussec on August 23, 2005, 12:08:47 am
Why is it not parsed "on-line" like in the Visual C++ IDE? Where is the problem?
Title: Re: Code Completion / Suggestion - only after compile?
Post by: rickg22 on August 23, 2005, 12:30:23 am
And "only when necessary" isn't very descriptive :P

You 're referring to?

Yiannis.

The tooltip text in the codecompletion settings. Ah, nevermind.