Author Topic: Code Completion / Suggestion - only after compile?  (Read 5354 times)

Offline roussec

  • Multiple posting newcomer
  • *
  • Posts: 27
    • http://
Code Completion / Suggestion - only after compile?
« 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

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Code Completion / Suggestion - only after compile?
« Reply #1 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.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Completion / Suggestion - only after compile?
« Reply #2 on: August 22, 2005, 05:14:52 pm »
Try checking the "always update cache" box in the code completion settings...

Offline roussec

  • Multiple posting newcomer
  • *
  • Posts: 27
    • http://
Re: Code Completion / Suggestion - only after compile?
« Reply #3 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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Completion / Suggestion - only after compile?
« Reply #4 on: August 22, 2005, 08:07:11 pm »
i think parsing is only done on already saved files.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code Completion / Suggestion - only after compile?
« Reply #5 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.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Completion / Suggestion - only after compile?
« Reply #6 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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code Completion / Suggestion - only after compile?
« Reply #7 on: August 22, 2005, 11:24:30 pm »
And "only when necessary" isn't very descriptive :P

You 're referring to?

Yiannis.
Be patient!
This bug will be fixed soon...

Offline roussec

  • Multiple posting newcomer
  • *
  • Posts: 27
    • http://
Re: Code Completion / Suggestion - only after compile?
« Reply #8 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?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Completion / Suggestion - only after compile?
« Reply #9 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.