Author Topic: code completion is not working with C-like structure definition  (Read 3372 times)

Offline coder

  • Single posting newcomer
  • *
  • Posts: 4
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.


Offline McZim

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: code completion is not working with C-like structure definition
« Reply #1 on: July 07, 2008, 01:40:57 pm »
Hi,

try several time rebuild project. And try get access to the your functions.

Offline coder

  • Single posting newcomer
  • *
  • Posts: 4
Re: code completion is not working with C-like structure definition
« Reply #2 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.

Offline jfouche

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: code completion is not working with C-like structure definition
« Reply #3 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

Offline coder

  • Single posting newcomer
  • *
  • Posts: 4
Re: code completion is not working with C-like structure definition
« Reply #4 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
« Last Edit: July 07, 2008, 09:59:15 pm by coder »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: code completion is not working with C-like structure definition
« Reply #5 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.
There's also a wiki-article about CC-redesign: http://wiki.codeblocks.org/index.php?title=Code::Completion_Rewrite