Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: coder on July 07, 2008, 12:37:40 pm

Title: code completion is not working with C-like structure definition
Post by: coder on July 07, 2008, 12:37:40 pm
I found a problem with Codeblocks, which is very critical for all C developers.

When I declare structure like this:

typedef struct My_test_struct My_test_struct_t;

struct My_test_struct
{
   int nElement1;
   int nElement2;
};

, code completion is not able to show elements:

   My_test_struct_t a;
   a.

But, if structure is declared like this:
typedef struct
{
   int nElement1;
   int nElement2;
}My_test_struct_t;

, then it works perfect:

   My_test_struct_t a;

   a.
     nElement1
     nElement2

I think for all C-developers is very important to extend "code completion" to make completion feature working also in case of C-like structure definition.

Title: Re: code completion is not working with C-like structure definition
Post by: McZim on July 07, 2008, 01:40:57 pm
Hi,

try several time rebuild project. And try get access to the your functions.
Title: Re: code completion is not working with C-like structure definition
Post by: coder on July 07, 2008, 01:56:10 pm
access to the functions in my project is OK, in the "symbols browser" I can see all functions, and also when i type the name of function, autocompletion is working.
Title: Re: code completion is not working with C-like structure definition
Post by: jfouche on July 07, 2008, 08:41:15 pm
I agree, I have the same problem :

typedef struct My_test_struct My_test_struct_t;

struct My_test_struct
{
   int nElement1;
   int nElement2;
};

My_test_struct_t a;
a.
--
Jérémie
Title: Re: code completion is not working with C-like structure definition
Post by: coder on July 07, 2008, 09:46:34 pm
question to developers of codeblocks and code completion plugin: any plans to fix this in the near feature?
Bug is posted here: http://developer.berlios.de/bugs/?func=detailbug&bug_id=14159&group_id=5358
Title: Re: code completion is not working with C-like structure definition
Post by: Jenna on July 07, 2008, 10:01:08 pm
An answer of a normal user (not a C::B developer):

CodeCompletion gets currently redesigned.

You may find some interesting articles in http://forums.codeblocks.org/index.php/board,18.0.html (http://forums.codeblocks.org/index.php/board,18.0.html).
There's also a wiki-article about CC-redesign: http://wiki.codeblocks.org/index.php?title=Code::Completion_Rewrite (http://wiki.codeblocks.org/index.php?title=Code::Completion_Rewrite)