5

Every time I programming in CodeBlocks, In the beginning, the auto complete work fine. After some action and minutes (I don't know exactly what the reason), the auto complete work partly.

It complete base variables' names, but it don't complete inner names of structures etc.

What's the reason?

In "inner names of structure" I mean, for example, for the variable gl.A:

typedef struct
{
bool A;

} B;          
B gl;

thank you,

and sorry about my poor english...

4 Answers 4

13

Also (as an addition to Lubulos' answer), when you see that this happens, try going to the left pane (Projects management), right-click your project, and then click 'Reparse this project'. You'll notice the bar that shows the current code block at the top will become grayed out for a while. When it is restored, try writing again what you were typing, and check if the problem is gone.

You can also sometimes use 'Reparse this file' which is a bit faster, if you have been editing just one file since the beginning (or since the last reparse).

8

The Code::Blocks' code completion plugin (Code::Completion) is wonderful, but has some bugs. If you program in C++, for example, methods and attributes completion doesn't work sometimes.

Currently in Code::blocks' forum there's a section named CodeCompletion Redesign where developers continuously improve the plugin. After you double-checked that your plugin's settings are all right (Plugin > Manage Plugins or Setting > Editor... > Code::Completion & Symbol Browser), if your problem still persist, try visiting the forum.

2
  • Unusual that they wouldn't include .inl files in the default file types... for the longest time I thought C::B had trouble with templates, haha. Thanks!
    – Conduit
    Dec 6, 2014 at 23:07
  • 3
    Where is the actual download for CodeCompletion Redesign? Unless it's embedded deep somewhere in the forum...
    – Enigma
    Feb 12, 2015 at 19:33
0

For me, it was a rogue "'" at the end of an include statement which stopped the code completion plugin from working. Since the code still compiled, this was difficult to see.

Removing this rogue "'" fixed the problem. The original code was:

#include "DialogSA.h"'

Changing this line to the following (i.e. deleting the rogue "'") fixed CodeComplete in C::B:

#include "DialogSA.h"

In a nutshell, your problem might not be due to the plugin itself, rather a slight error in your code (which in my case still compiled so was therefore difficult to find)

0

Also (as an addition to Lubulos' answer), after you check your settings and it still doesn't work make sure you close and reopen your file/project as it won't update it automatically, atleast that was the case for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.