Author Topic: Code Complete not completing declared variables.  (Read 4595 times)

Offline sparkiyo

  • Single posting newcomer
  • *
  • Posts: 4
Code Complete not completing declared variables.
« on: April 04, 2010, 11:34:12 am »
Hi when I first began using C::B the code complete plugin happily auto completed my custom declared variables, but it recently stopped doing so and I have no idea why.

For example, before the problem, when I did this:

Code
   int hyphenated;
 
   hyph
it will then show the auto complete list with the variable I just declared on it, and all I needed to do was to press tab and it will be completed.

but now nothing shows when I type it.

I've looked at the plugin settings and nothing seems to be helping.
Does anyone else have this problem?

OS: Windows 7 Ultimate
Version: C::B 8.02
Code Complete Plugin Version: 0.7


Cheers.
« Last Edit: April 06, 2010, 03:45:42 pm by sparkiyo »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code Complete not completing declared variables.
« Reply #1 on: April 05, 2010, 08:06:49 pm »
OS, CB's versions, please?
We are not magicians here....  :lol: :roll: :wink:
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sparkiyo

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code Complete not completing declared variables.
« Reply #2 on: April 06, 2010, 03:46:09 pm »
Thank you for your help, I've added the information in my original post.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code Complete not completing declared variables.
« Reply #3 on: April 06, 2010, 04:00:26 pm »
Can you try a recent nightly, the code completion was vastly improved lately.
If the problems is still there it will be best to provide a simple test project and steps to reproduce.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sparkiyo

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code Complete not completing declared variables.
« Reply #4 on: April 07, 2010, 05:04:21 am »
Hi, I am now using nightly build 6181 (The latest).
The Code Complete is still 0.7 however.

I've included a simple project that shows how the declared variable does not appear to be auto complete by the code complete.

Thanks


[attachment deleted by admin]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Complete not completing declared variables.
« Reply #5 on: April 07, 2010, 05:19:47 am »
@sparkiyo
I have do the test:

Code
int hyphenated;
hyphe
works!!

Code
int main() {
   //Declaring the variable
   int hyphenation = 1;


   //printing the variable, notice how it doesn't auto complete
   printf("Hello World! %d", hyphena ); //Left it incomplete intentionally

}
failed. So, it seems the codecompletion in the function argument( between the parentheses ) has some minor bug.
I think this can be fixed :D, but I'm pretty busy these days.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline sparkiyo

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code Complete not completing declared variables.
« Reply #6 on: April 07, 2010, 06:00:26 am »
@sparkiyo
I have do the test:

Code
int hyphenated;
hyphe
works!!



Thank you for the feedback!
but even that does not work for me, Here's the settings for my Code Complete:


Cheers