Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Alpha on November 04, 2014, 12:58:28 am

Title: CCManager settings dialogue plan
Post by: Alpha on November 04, 2014, 12:58:28 am
I will be trying to draft up a settings page for CCManager as soon as I am able.  Before then, I wanted to ask some opinions.
Settings belong in different categories; program interface choices should be in CCManager, language specific choices should be in the relevant plugin.  My current thoughts (restricting to items that are not implemented) are:

CCManager/sdk side:

Plugin side:

Is there anything I am missing?  Items you think should be in a different category?
Title: Re: CCManager settings dialogue plan
Post by: oBFusCATed on November 04, 2014, 09:48:25 am
You've forgotten to mention the c++ parser settings and the settings for the symbol browser.

Do you plan to make a separate dialog or you'll keep the one in the Settings -> Editor?
Title: Re: CCManager settings dialogue plan
Post by: ollydbg on November 04, 2014, 02:37:59 pm
You've forgotten to mention the c++ parser settings and the settings for the symbol browser.
These options are language specific, right?
So, they should be in plugin's configure panel.
Title: Re: CCManager settings dialogue plan
Post by: oBFusCATed on November 04, 2014, 07:11:38 pm
These options are language specific, right?
So, they should be in plugin's configure panel.
Probably.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on November 04, 2014, 07:50:06 pm
Yes, those were my thoughts as well.  (I did not bother mentioning since those settings are already implemented.)

  • timer delay for autolaunch after trigger character (generally scope/member type operators)
How many people would actually make use of such an option?  I think the interface looks cleaner without this, and maybe a reasonable default is good enough for everyone?

Since there is extra room under general settings, I think we can fit the options there:
(http://www.pasteall.org/pic/show.php?id=79329)
(The combo box contains "disable", "enable", "force single page".)
Title: Re: CCManager settings dialogue plan
Post by: oBFusCATed on November 04, 2014, 09:11:18 pm
How do you plan to handle the per-plugin panels?
Are they going to be a part of the CC settings or every plugin will register a separate item in the list in the dialog?
Title: Re: CCManager settings dialogue plan
Post by: Alpha on November 06, 2014, 08:01:29 pm
Plugin settings pages I plan to leave as is.  They are still their own plugin, so I see no reason not to.

As for panels (such as scope and symbol tree), I hope to create a generic interface that plugins can share someday.. but that will have to wait.
Title: Re: CCManager settings dialogue plan
Post by: oBFusCATed on November 06, 2014, 08:44:12 pm
Plugin settings pages I plan to leave as is.  They are still their own plugin, so I see no reason not to.
This will be quite messy from the user friendliness point of view, but I guess it is OK as first step.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on December 07, 2014, 08:41:46 pm
Has anyone timed how expensive (or cheap) ConfigManager::ReadXXX() calls are?  Should I avoid using them during CC operations (caching settings instead)?
Title: Re: CCManager settings dialogue plan
Post by: oBFusCATed on December 07, 2014, 09:25:54 pm
It depends how often they are called. If it is million times per second, I suppose it will make a difference, otherwise I doubt it.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 05, 2015, 10:08:20 pm
Committed.

@ollydbg: Are you still working on remove unused variables in CC, they are mostly in CCManager(SDK) (http://forums.codeblocks.org/index.php/topic,19839.0.html)?  The other part of these settings is to remove the redundancy from CC, but I do not want to duplicate your work.
Title: Re: CCManager settings dialogue plan
Post by: ollydbg on January 06, 2015, 09:36:16 am
Committed.
Good job.

Quote
@ollydbg: Are you still working on remove unused variables in CC, they are mostly in CCManager(SDK) (http://forums.codeblocks.org/index.php/topic,19839.0.html)?  The other part of these settings is to remove the redundancy from CC, but I do not want to duplicate your work.
I will work on it. But there are some extra code changes. If you look at the option of "case sensitive", each parser instance has such option, and if we have many cbps opened by CC, we can set them differently for each parser instance. But now it becomes a global option. Maybe, there are other options we need to handle, so it will take some time to handle those issues.

I will post a patch when I finish the work in one or two days in that thread. :)
Title: Re: CCManager settings dialogue plan
Post by: scarphin on January 06, 2015, 04:02:24 pm
May I suggest a 4th option under 'settings -> editor -> general settings -> editor settings -> code completion -> tooltips' called 'enable on keypress only'? The reason being is my autohotkey shortcuts for navigation doesn't play nice when the mouse pointer unintentionally comes over a piece of code when scrolling by keyboard and shows a tooltip automatically which screws up the navigation completely. It would be nice to have an option to activate both tooltips and calltips (I think they are different as calltips can only be activated on function names) only by shortcuts.

Btw if someone can point me to the piece of code where popup window colours are handled, I'd like to submit a patch to register them in 'settings -> environment -> colours'. Thanks.
Title: Re: CCManager settings dialogue plan
Post by: afc888ny on January 16, 2015, 01:49:25 pm
May I suggest a 4th option under 'settings -> editor -> general settings -> editor settings -> code completion -> tooltips' called 'enable on keypress only'? The reason being is my autohotkey shortcuts for navigation doesn't play nice when the mouse pointer unintentionally comes over a piece of code when scrolling by keyboard and shows a tooltip automatically which screws up the navigation completely. It would be nice to have an option to activate both tooltips and calltips (I think they are different as calltips can only be activated on function names) only by shortcuts.

I hereby support the above motion! 
The option to activate both tooltips and calltips must be included, this truly is a regression!
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 16, 2015, 06:28:10 pm
Apologies for not being able to respond earlier.  I will look into this over the weekend, and see what is possible.
Title: Re: CCManager settings dialogue plan
Post by: ollydbg on January 18, 2015, 10:24:22 am
Tooltip and calltip are different. The former is generated when mouse dwells. The later is shown when you are entering functions. So, do we need two options?
Title: Re: CCManager settings dialogue plan
Post by: scarphin on January 18, 2015, 11:23:15 am
I don't think 2 separate options are needed. Only one 'enable on keypress only' for both of them would be enough imo. But I think it would be better if tooltips had a shortcut to launch them like debugger's 'Evaluate expression' tooltips.

Btw tooltips and calltips are displayed with a color (black on white background) which is not compatible with my theme colors (white on black background). But debugger's tooltips are displayed in compatible colors with my theme. Can this be applied to cc's tooltips and calltips too?
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 18, 2015, 06:34:38 pm
Btw tooltips and calltips are displayed with a color (black on white background) which is not compatible with my theme colors (white on black background). But debugger's tooltips are displayed in compatible colors with my theme. Can this be applied to cc's tooltips and calltips too?
I believe the relevant API is wxScintilla::CallTipSetBackground(), CallTipSetForeground(), and CallTipSetForegroundHighlight().  If you want to write up a quick, that would be nice.  Otherwise I should hopefully get to it soon.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 19, 2015, 04:41:51 pm
Committed initial option.  Please report if it functions as expected.
Title: Re: CCManager settings dialogue plan
Post by: scarphin on January 19, 2015, 07:36:31 pm
I thought the tooltip shortcut would activate the tooltip for the expression under the mouse not the cursor but it will do, one extra click won't do much harm imo. ;) Thanks.

However there is an issue. When a function with arguments is completed, calltip kicks in automatically. Can this also be tied to the 'keybound only' setting like not launching automatically?

And for the color preferences will it be okay if I manage to submit a patch to tie the back, fore and highlight color settings to the color manager as the documentation popup settings are already there?
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 19, 2015, 08:16:29 pm
My thoughts had been that the logical expectation of a keyboard shortcut would be to activate on the keyboard's focus point (the caret/cursor), similar to how show calltips shortcut works.

When a function with arguments is completed, calltip kicks in automatically. Can this also be tied to the 'keybound only' setting like not launching automatically?
Yes, will do.

Tying to those settings sounds fine, in my opinion.
Title: Re: CCManager settings dialogue plan
Post by: scarphin on January 20, 2015, 12:47:19 am
Attached a patch for the color configuration of tooltips. I'm not sure where to load the colors for tooltips though. I opted to load them in 'OnEditorOpen' but would it be better to load them in 'DoUpdateCallTips'?
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 20, 2015, 08:49:59 pm
When a function with arguments is completed, calltip kicks in automatically. Can this also be tied to the 'keybound only' setting like not launching automatically?
Yes, will do.
Committed.
Title: Re: CCManager settings dialogue plan
Post by: scarphin on January 21, 2015, 12:48:52 pm
Works fine thanks. However I never could and still don't understand the purpose of the red closing parenthesis.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 22, 2015, 03:26:02 am
Attached a patch for the color configuration of tooltips. I'm not sure where to load the colors for tooltips though. I opted to load them in 'OnEditorOpen' but would it be better to load them in 'DoUpdateCallTips'?
Committed, thanks (I did swap your values with default colours that better match previous settings).  I think that loading them once per editor should be fine.  No need for extra overhead.

However I never could and still don't understand the purpose of the red closing parenthesis.
Assuming we are talking about the same thing, that is "smart tab jump".  Press tab to jump the caret past closing parenthesis and quotes (one step at a time) for the remainder of the line.  Can be useful when inserting more code at the beginning of a pre-existing line.
Title: Re: CCManager settings dialogue plan
Post by: scarphin on January 22, 2015, 09:31:42 am
Assuming we are talking about the same thing, that is "smart tab jump".  Press tab to jump the caret past closing parenthesis and quotes (one step at a time) for the remainder of the line.  Can be useful when inserting more code at the beginning of a pre-existing line.
I now know what it is, thanks. I guess it's an editor feature that I can't disable?
Title: Re: CCManager settings dialogue plan
Post by: ollydbg on January 22, 2015, 04:06:30 pm
Smart tab jump is a feature added by Loaden in our editor control several years ago. But he is inactive now. Not sure there is an option to disable it.
Title: Re: CCManager settings dialogue plan
Post by: ollydbg on January 24, 2015, 03:28:15 pm
Smart tab jump is a feature added by Loaden in our editor control several years ago. But he is inactive now. Not sure there is an option to disable it.

@scarphin, the related code is in sdk\cbstyledtextctrl.cpp, and you can search the keyword by "m_tabSmartJump".
Title: Re: CCManager settings dialogue plan
Post by: dmoore on January 24, 2015, 10:12:59 pm
Think you should seriously consider splitting the CodeCompletion settings out into their own dialog(ue). The way the debugger manager handles this is a good model IMHO.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 31, 2015, 12:07:18 am
Think you should seriously consider splitting the CodeCompletion settings out into their own dialog(ue).
I put the global ones where they are now since that rectangle was just awkward empty space before.  I agree that a dedicated dialogue (dialog? ... I never figured this one out either) would make it more clear, but I myself do not have time to build one anytime soon.

(Sorry for the delay.)
Title: Re: CCManager settings dialogue plan
Post by: oBFusCATed on January 31, 2015, 12:43:30 am
So, to clarify where are the global settings at the current moment? I'm not sure I can find them.
Title: Re: CCManager settings dialogue plan
Post by: Alpha on January 31, 2015, 12:49:21 am
First page of general editor settings.  See screenshot near the beginning of this thread.