Author Topic: code completion work  (Read 11241 times)

Offline xakepp35

  • Single posting newcomer
  • *
  • Posts: 6
code completion work
« on: January 23, 2011, 08:27:49 pm »
i have following code:

Code
class st0
{
public:
 int y;
 int b;
};

class st1 : public st0
{
 int z;
 int a;
};

void foo()
{
    st1 b;
    b.

1) code completion or code sense do not show member's types after typing "b." in example.
how to make them shown? "int st1::a" instead of just "a".
This is VERY important feature, especially if you see sources first time.

2) after typing "b." in code completion box members are sorted alphabetically "a, b, y, z".
how to make them sorted as they appears in source code, inherited classes first, base classes - last?
int st1::a, int st1::z, int st0::y, int st0::b
This is important too, Visual studio lacks this, but Borland studio (RAD studio) has such functionality.

3) how to eliminate time delay between hovering mouse on "foo" and hint appearing "int foo()" in example???

Offline xakepp35

  • Single posting newcomer
  • *
  • Posts: 6
Re: code completion work
« Reply #1 on: January 23, 2011, 08:53:53 pm »
PS. code completion plugin version: 0.7
currently i am trying code::blocks 10.05 (built May 27 2010) as alternative for visual studio 2010
but code completion situation is worth sticking with VS2010..  :(

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: code completion work
« Reply #2 on: January 23, 2011, 09:25:12 pm »
Try latest nightlies, they are better in CC, but not perfect...
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code completion work
« Reply #3 on: January 24, 2011, 02:01:14 am »
2) after typing "b." in code completion box members are sorted alphabetically "a, b, y, z".
how to make them sorted as they appears in source code, inherited classes first, base classes - last?
int st1::a, int st1::z, int st0::y, int st0::b
This is important too, Visual studio lacks this, but Borland studio (RAD studio) has such functionality.
This should be a feature request.... Need some work. :D

3) how to eliminate time delay between hovering mouse on "foo" and hint appearing "int foo()" in example???
There is an option in CC which can set the time delay.
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 xakepp35

  • Single posting newcomer
  • *
  • Posts: 6
Re: code completion work
« Reply #4 on: January 24, 2011, 12:51:44 pm »
Quote
Quote
Quote from: xakepp35 on Yesterday at 08:27:49 pm
3) how to eliminate time delay between hovering mouse on "foo" and hint appearing "int foo()" in example???
There is an option in CC which can set the time delay.

this option(in CC settings) applies only to "CC box" (box with member names and color squares - green square for public members, etc) appearing timeout.
but not on "item hint" appearing timeout.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code completion work
« Reply #5 on: January 24, 2011, 01:42:01 pm »
Quote
Quote
Quote from: xakepp35 on Yesterday at 08:27:49 pm
3) how to eliminate time delay between hovering mouse on "foo" and hint appearing "int foo()" in example???
There is an option in CC which can set the time delay.

this option(in CC settings) applies only to "CC box" (box with member names and color squares - green square for public members, etc) appearing timeout.
but not on "item hint" appearing timeout.
Oh, You are right, I will check the source, it seems it can be configured in wxScintilla. :D
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 xakepp35

  • Single posting newcomer
  • *
  • Posts: 6
Re: code completion work
« Reply #6 on: January 25, 2011, 02:21:39 pm »
i can, but do not like to build from source. there is way to wait for official build (with installer). are there another ways???

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: code completion work
« Reply #7 on: January 25, 2011, 02:39:06 pm »
Quote
Quote
Quote from: xakepp35 on Yesterday at 08:27:49 pm
3) how to eliminate time delay between hovering mouse on "foo" and hint appearing "int foo()" in example???
There is an option in CC which can set the time delay.

this option(in CC settings) applies only to "CC box" (box with member names and color squares - green square for public members, etc) appearing timeout.
but not on "item hint" appearing timeout.
Oh, You are right, I will check the source, it seems it can be configured in wxScintilla. :D
Dwell time for editors is hardcoded to 1000 ms in cbEditor at the moment, but can of course be made configurable.
But it would affect all editor tooltips, not only cc's.

Offline xakepp35

  • Single posting newcomer
  • *
  • Posts: 6
Re: code completion work
« Reply #8 on: January 27, 2011, 09:12:37 pm »
Dwell time for editors is hardcoded to 1000 ms in cbEditor at the moment, but can of course be made configurable.
But it would affect all editor tooltips, not only cc's.

1 second * 1000 times you want tooltip in a day / 8 hours in seconds = loosing 4% of your work day's time, just sitting and waiting for tooltips?
WHO MADE THIS!?)) i do not like waiting till doomsday =)

it's good idea - to eliminate such delays everywhere. how can one do that?)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: code completion work
« Reply #9 on: January 28, 2011, 01:25:00 am »
The delay is there to prevent accidental showing of tooltips, especially the debugger tooltips...


p.s. it is not polite to shout, when you're new and you're not at home...
p.p.s. the code is out there in the wild, fix the problem rebuild and you'll be happy...
« Last Edit: January 28, 2011, 01:26:42 am by oBFusCATed »
(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 wolfcry

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: code completion work
« Reply #10 on: February 03, 2011, 11:56:37 am »
Quote
1 second * 1000 times you want tooltip in a day / 8 hours in seconds = loosing 4% of your work day's time, just sitting and waiting for tooltips?

I personally don't see what the big deal is. Tool tip is exactly what its name implies. It helps you by providing tips. You shouldn't rely on it to the extend you're wasting that much work time. I'm absolutely in love with C::B. It's fast, it's clean and whatever quirks it does have are easily compensated by other rich and useful features. Not to mention it's 100% free and top of the line in my book.

In my opinion, if you're coding a program and have to stop coding just to tool tip to see what you just coded over 1000 times a day and doing that wastes over 4% of your work day, then I'd have to suggest that you A) re-learn C++ supplied functions etc., so you don't have to rely on tool tip so often or B) you get into a different line of work because you're costing, rather than making money, for the business and you'll soon be fired anyways lol.
« Last Edit: February 03, 2011, 11:59:32 am by wolfcry »
C::B Version = 10.5
OS = Microsquish XP