Author Topic: Code Hinting but not Completion  (Read 16888 times)

Offline pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Code Hinting but not Completion
« on: April 04, 2014, 04:17:41 pm »
I first learned to program using a tool known as Game Maker. :D

Rather than the popular 'code completion' model I'll find in most IDE's, Game Maker's built-in code editor (Game Maker 5 and 6) had a panel below which was similar to code completion behavior, but integrated into a symbol-browsing format. It would instantly adapt its filtering towards the current symbol at the user's textual cursor. This was nice because I could click on a function (or 'script') call within the textual code editor and see whether it has remained valid over the course of a project's needs (and so on). If I wanted to use an extended function, it'd be easy to see the arguments once again and begin elaborating on whatever parameters I initially needed. I prefer this because it can operate in instantaneity (without any delay) and it's not intrusive. I think traditional code completion really breaks my flow. If you already know a symbol's name, it can be annoying to see random crap flicker around and sometimes replace whatever you were typing if you don't type it fast enough. Maybe I'm stupid, but that's what happens to me; I find it intrusive and annoying. I don't mind the overlay itself too much, but is there an option to disable the completion aspect (i.e. it won't replace whatever you're typing) and keep the useful hint to confirm whether I identified a symbol correctly (the popup overlay)? Also, I really prefer static interface elements over dynamic rubbish.

Now, I think it'd be nice to have a Game Maker-like symbols option which integrates the symbols browser into a tab on the logs pane and immediately adapts its filtering to where-ever the textual cursor is at.

Example:

Code
float radiusBase;
float radiusMiddle;
float radiusTip;
float radiusMidRatio;
float radiusVariation;

float tropismA1;
float tropismB1;
float tropismA2;
float tropismB2;

If I type 'tropis' in text insertion mode, the textual cursor will be at the end of 'tropis|' and so the logs-integrated adaptive symbols pane will show:

Code
float tropismA1;
float tropismA2;
float tropismB1;
float tropismB2;

If I continue to type, 'tropismA', then it will adapt to:

Code
float tropismA1;
float tropismA2;

It won't become intrusive, so I'll just be able to glance down to ensure I typed it correctly. It may also help remind me how to complete whatever I'm typing.

Now consider a function like this: 'void Cheese(int a, int b = 0)'

If I've only used the first parameter, then if ever I come to need the second, I can simply notch my text-cursor anywhere within/adjacent to the function call, like 'Che|ese(25)', 'Cheese(2|5)', 'Cheese(25|)' or 'Cheese(25)|' and the heads-up-display-type symbols browser will hint:

'void Cheese(int a, int b = 0)'

That's just a small suggestion. I hope you consider providing it as an optional feature. ;D
« Last Edit: April 04, 2014, 04:37:21 pm by pieman »
I like pie.

Offline pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #1 on: April 06, 2014, 01:15:28 am »
bump

Unworthy of reply? Well, my core question was:

Quote
is there an option to disable the completion aspect (i.e. it won't replace whatever you're typing) and keep the useful hint to confirm whether I identified a symbol correctly (the popup overlay)?

Please at least answer that question. I'm not sure if this option exists, though there's a possibility it may and I haven't found it.

Thank you! :)
I like pie.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code Hinting but not Completion
« Reply #2 on: April 06, 2014, 03:15:26 am »
i personally need more the space without the log window instead of a other window what suggest things, that can be showed in a little window, which disappear when it is not needed, in a big clumsy window.... (strange sentence, i should go to bed...) . But if you can provide a patch (or better a plugin (it should be a lot easier to use the cc sdk after the integration of alphas patches)) i would take a look on it.

You can disable code completion: Settings->Editor->Code completion->Disable code completion

good night (morning)



Offline pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #3 on: April 06, 2014, 04:10:19 am »
I'd prefer a "Symbols list" tab embedded into the logs frame. I switch between log-tabs frequently and use F2 to hide it whenever it's entirely too cumbersome. I've decided I'm not going to develop any plugins for Code::Blocks. Sorry. I'm practicing a personal paradigm and -- until I've established it in a lucid way (after a year or two's time) -- I don't want to mush it with other nasty horrendous substrates which will inescapably develop in my mind's corners after working with other programmer's 'make-a-class-for-everything' jizz. (OCD thing)

If someone like my ideas, they may implement them; but if nobody else does -- they won't get implemented.
« Last Edit: April 06, 2014, 04:11:51 am by pieman »
I like pie.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Code Hinting but not Completion
« Reply #4 on: April 06, 2014, 04:48:04 am »
There is a 'symbol list' tab in the 'project manager' I think if that's what you are looking for. ;/

Offline pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #5 on: April 06, 2014, 06:54:36 pm »
From my experience so far it doesn't seem to update its filter given the location of the textual cursor. It's also inconvenient as a tab in pair with the Project Manager; I navigate with the project manager and want to use symbols for reminding-purposes rather than navigation. I was looking towards something integrated with the logs panel.
I like pie.

Offline pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #6 on: April 06, 2014, 07:25:29 pm »
Here's a screenshot to show how it looked:

I like pie.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code Hinting but not Completion
« Reply #7 on: April 06, 2014, 07:41:56 pm »
Image is not accessible...  ???
(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 pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #8 on: April 07, 2014, 12:07:58 am »
Hmm, I can see it. >:(
I like pie.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code Hinting but not Completion
« Reply #9 on: April 07, 2014, 08:50:04 pm »
Hmm, I can see it. >:(
Doesn't work here either.
Some days ago you posted an image in another thread (but removed it later). That image was also not accessible.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code Hinting but not Completion
« Reply #10 on: April 07, 2014, 11:46:01 pm »
i can see it...

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Hinting but not Completion
« Reply #11 on: April 08, 2014, 02:53:11 am »
Image is not accessible...  ???
Me too.

EDIT: It looks like the OP want to show the tooltip information(and suggest list) in an window embedded in the logs panel.
EDIT2: I can see the image now.
« Last Edit: April 08, 2014, 02:58:27 am by ollydbg »
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 pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #12 on: April 08, 2014, 11:42:12 pm »
My server must suck or something. It's just a friend's who's letting me run my domain on it.
I like pie.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Code Hinting but not Completion
« Reply #13 on: April 09, 2014, 01:21:57 am »
I thought we went through this with doc popups. Frankly, it's just a waste of screen real estate to have a window permanently open to display contextual info like this. It's an open source project so whoever likes this should by all means go ahead, but don't expect that this will replace default behavior. (I don't speak for other devs of course)

Offline pieman

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Hinting but not Completion
« Reply #14 on: April 11, 2014, 08:15:20 am »
I was requesting it as an option.
I like pie.