User forums > Using Code::Blocks

SmartSense/IntelliSense/CodeCompletion

<< < (2/4) > >>

Ceniza:
Well, mandrav is the only man on earth who understands that plugin (he wrote it after all :wink:). I don't know how many time it would take a mortal to add it, and I have no idea if mandrav feels like implementing it anytime soon.

Even though there's something to clarify: CodeCompletion is able to parse structs and classes, but not those declared with a typedef.

In your example the plugin should be able to parse the class (testclass), but it should fail with the struct... and the function too. I just tested it and it's so.

Something that is not helping the plugin, 'cause it's unable to parse it, is the way you define the function: old-C style. If you change it from:

--- Code: ---BOOL InitInstance(hInstance, nCmdShow)
HANDLE  hInstance;
int     nCmdShow;
--- End code ---

to:

--- Code: ---BOOL InitInstance(HANDLE hInstance, int nCmdShow)
--- End code ---

then the plugin will be able to suggest things, and since you're also defining a class I guess you're using C++, so you should really define functions that way.

If you define structs like this:

--- Code: ---struct NameOfTheStruct
{
  // data members
};
--- End code ---

the plugin will be able to parse them.

Please have in mind the CodeCompletion plugin is still work in progress, even though it hasn't been touched that much for many months and it's known to lack support for a few 'constructs' (you know two now).

mandrav:
[*] Typedefs are supported.
[*] "Typedef struct XYZ {} ABC;" is not supported. Break it in two steps if you need it (struct XYZ {}; typedef XYZ Sxyz).

[*] This kind of code (what's it called? K&R?) is not supported:

--- Code: ---BOOL InitInstance(hInstance, nCmdShow)
HANDLE  hInstance;
int     nCmdShow;
--- End code ---

[*] Finally, this is WIP. Never forget that :).

Aboq:
so i should rewrite all library header files?

please implement C parsing since C is a subset of C++

This is not my coding style, my code can be parsed (if i dont use this typedef) but major library headers wont work.

So for Linux Developers Code::Blocks might be a good thing, but i dont see why i should prefer codeblocks over visual studio.


killerbot:
you have a point there, that libraries you *use* might be created like that. For the moment we focus the most on the modern language style. No promise if that old style will be supported some day, but then again no promise we will never support this. There are things with higher priorities, it hope you can accept that.

Aboq:
Another Problem: Function Parameter display doesnt work right

void tester(int testparam) {
  // do something
}

void main() {
  // i enter tester( -> no parameters displayed
  // i delete ( and enter ( -> parameters are now displayed
}

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version