Author Topic: Code completion and Symbols Browser problem  (Read 5233 times)

Offline BrianSidebotham

  • Multiple posting newcomer
  • *
  • Posts: 45
Code completion and Symbols Browser problem
« on: September 05, 2006, 06:13:40 pm »
Hi All,

There seems to be a funny in the symbols browser which affects the code completion.

Take the following piece of code:

Code
typedef struct strType
    {
        unsigned char El1;
        unsigned char El2;
        unsigned char El3;
    } New_t;

New_t NewTypeStructure;

int main(void)
{
    NewTypeStructure
}

This gives the symbol NewTypeStructure under the Global Variables section of the symbols browser, and code completion gives it as a suggestion as I type. However, it will not show me the structures elements, or show me the New_t type as a structure in the symbols browser.

Now take the following piece of code:

Code
struct strType
    {
        unsigned char El1;
        unsigned char El2;
        unsigned char El3;
    } NewTypeStructure;

int main(void)
{
    NewT
}

In this example, the symbols browser adds strType to the symbols browser, and you can see the elements of the structure in the symbols browser. However, NewTypeStructure is not offered by code completion any more and the same applies that auto completion does not offer the elements for completion.

Interestingly, NewTypeStructure in the last example does not get added to the Global Variables, even though it is now a global variable with structure strType.

I'm coding for an embedded target, so I'm completely coding in C. Maybe there's something to click in order to get the symbols browser to scan code for c structures?

This is with the 1.0 Rev 2946 version of c::b

Best Regards,

Brian.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Code completion and Symbols Browser problem
« Reply #1 on: September 05, 2006, 07:04:25 pm »
C-style structs and typedefs are not yet supported...
Be patient!
This bug will be fixed soon...

Offline BrianSidebotham

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Code completion and Symbols Browser problem
« Reply #2 on: September 07, 2006, 12:30:01 pm »
Cool. Is this a limitation of C::B? or a different project? (Sorry, I don't know what is used to generate the symbols list)

I presume this is already a development task and doesn't need to be added as a feature request?

Brian.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Code completion and Symbols Browser problem
« Reply #3 on: September 07, 2006, 02:32:53 pm »
Is this a limitation of C::B? or a different project? (Sorry, I don't know what is used to generate the symbols list)

We are using a hand-crafted tokenizer/parser.
And yes, it is under development.
Be patient!
This bug will be fixed soon...