Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: cjbailey1 on November 29, 2007, 02:36:45 pm

Title: Structure code completion.
Post by: cjbailey1 on November 29, 2007, 02:36:45 pm
At the risk of repeating this ad infinitum, I have a query about code completion and structures within C.

Firstly though, let me congratulate everyone on the program itself, Code::Blocks has been of so much use to me that it is one of my highest usage programs on Ubuntu, and has also made it onto my USB stick as part of a PortableApps install for windows.  I have been so impressed that I have also introduced several other people to Code::Blocks  :D

Anyway, down to the question:
 Code completion works for most things that I have used within Code::Blocks, however, it doesn't seem to function with structures properly.
If I define
Code
struct tempStruct
{
  int data1;
  int data2;
  int data3;
};
I get code completion if I type in:
Code
tempStruct.


However, if I define the following
Code
struct tempStruct myTemp;
then typing in
Code
myTemp.
results in no code completion.

I am running SVN version 4592 now, having upgraded the other day to see if this bug went away, but it is still there.

Is this something that I am doing wrong?
If not, then is there a version which has this working?
Again, if not, then is it something that is being worked on?
Title: Re: Structure code completion.
Post by: cjbailey1 on November 29, 2007, 02:39:09 pm
and another bit.

Code completion on a structure within a structure doesn't work either, the embedded structure is not accessible under any circumstances through code completion.
Title: Re: Structure code completion.
Post by: JGM on November 29, 2007, 05:14:18 pm
CodeCompletion plugin stills doesn't have some features. In c++ mode you could declare the structture like this:

struct test
{
  int i;
}

//delclaration
test myTest; //instead of using old c style (struct test myTest)

That will work!
Title: Re: Structure code completion.
Post by: cjbailey1 on November 29, 2007, 06:14:40 pm
Thanks for that, I'm running in C at the moment so I will just have to wait until it's implemented.  Just means I have to stop being lazy and code as I used to!
Title: Re: Structure code completion.
Post by: Latent Force on December 04, 2007, 05:36:32 pm
Is anybody know when this feature will supported by plug-in? I'm using svn 4639 and need so much this  :D
It impacts me. And I think I have to find another IDE :(( insted of my lovely C::B
Title: Re: Structure code completion.
Post by: rickg22 on December 05, 2007, 12:39:34 am
Yiannis is the original author of Code Completion - I helped to optimize a large part of it but I'm afraid I don't have time to develop CB anymore. We need volunteers to help us code.
Title: Re: Structure code completion.
Post by: cjbailey1 on December 05, 2007, 02:08:33 am
It's times like this where I really wish my coding skills were a lot better and that I didn't lack free time!
Title: Re: Structure code completion.
Post by: EnterTheNameHere on December 05, 2007, 03:55:07 pm
And is there actually anybody working on code completion?
Title: Re: Structure code completion.
Post by: TDragon on December 05, 2007, 04:00:12 pm
That would be a qualified no. Yiannis is the only person who would be really comfortable making changes to the current version, but he is aware of its shortcomings and usually reluctant to make further fixes to it. However, he has nonetheless done so from time to time. I am casually tinkering with a completely new design as time allows -- as I imagine various other people are also doing. You can see some past discussion on the topic in the CodeCompletion redesign subforum.
Title: Re: Structure code completion.
Post by: zsyddl on December 11, 2007, 02:04:25 am
the code completion plug looks work not nice. visual assitantX (one plug of visual studio ) work so nice. I suggest we can study it. (sorry for my poor english)
Title: Re: Structure code completion.
Post by: zsyddl on December 11, 2007, 10:47:02 am
other:
  visual assitant , set code source  or header for auto completion so easy: you can add the code path direct to path list, add take effect. but this completion plug, menu -> edit->code completion, I can't find any path list for c++ parser. I can find one in menu->project->*****,(c++ parser), but make poor effect。 
Title: Re: Structure code completion.
Post by: earthcrosser on February 15, 2008, 12:42:38 am
I'm still having this problem with svn build 4872. Sometimes code completion in C seems to work ramdomly, but mostly it doesn't.
Title: Re: Structure code completion.
Post by: XayC on February 19, 2008, 08:43:55 pm
What I've found is not actually random, but may look like random: if CB is opened because you double-clicked a project file, code completion won't work. If you open CB before and then open/drag/double-click a project everything works as expected.
XayC