Author Topic: Structure code completion.  (Read 14569 times)

Offline cjbailey1

  • Single posting newcomer
  • *
  • Posts: 4
Structure code completion.
« 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?

Offline cjbailey1

  • Single posting newcomer
  • *
  • Posts: 4
Re: Structure code completion.
« Reply #1 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.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Structure code completion.
« Reply #2 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!

Offline cjbailey1

  • Single posting newcomer
  • *
  • Posts: 4
Re: Structure code completion.
« Reply #3 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!

Latent Force

  • Guest
Re: Structure code completion.
« Reply #4 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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Structure code completion.
« Reply #5 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.

Offline cjbailey1

  • Single posting newcomer
  • *
  • Posts: 4
Re: Structure code completion.
« Reply #6 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!

Offline EnterTheNameHere

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Structure code completion.
« Reply #7 on: December 05, 2007, 03:55:07 pm »
And is there actually anybody working on code completion?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Structure code completion.
« Reply #8 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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline zsyddl

  • Single posting newcomer
  • *
  • Posts: 4
Re: Structure code completion.
« Reply #9 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)

Offline zsyddl

  • Single posting newcomer
  • *
  • Posts: 4
Re: Structure code completion.
« Reply #10 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。 

Offline earthcrosser

  • Single posting newcomer
  • *
  • Posts: 4
Re: Structure code completion.
« Reply #11 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.

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: Structure code completion.
« Reply #12 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