Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Doxygen plugin
Cryogen:
--- Quote from: codeur on April 03, 2010, 01:28:12 am ---Regarding the "settings template", it basically works, but I do not understand the purpose of the "Load settings template" entry.
--- End quote ---
It's very straightforward. You save a template from a project that has the settings you want. When you are in a project that you want to import those settings into, you load them.
Remember it's a fairly superficial first draught. :-)
--- Quote from: codeur on April 03, 2010, 01:28:12 am ---Isn't the settings template if it exists supposed to be loaded automatically on startup?
Unless you are planning on adding the possibility of choosing between multiple templates in the future (which would be great!), I do not see the use of "Load settings".
--- End quote ---
No, that won't happen. There are default settings loaded when you first open prefs. After that, the prefs saved in the project are loaded. What the template functionality will do is allow you to import a set of prefs to avoid having to set them manually, as you initially mentioned. Once they're imported, they're saved in the project and loaded from there on subsequent occasions. The only real question is where we're loading the template from. It sounds like the best option would be to have a file selection dialogue that defaults to the directory pointed to by %APPDATA%. You would then get the default location initially, wherever that might be in the circumstances, and can browse from there. How does that sound?
Cryogen:
--- Quote from: codeur on April 03, 2010, 06:26:33 am ---Testing the function banner comment generation:
The const parameter issue is fixed. Thanks.
A few other issues would really benefit if they are fixed before a release (like the first one and perhaps the second). Others we can live with for a while.
--- End quote ---
I have to deal with these one at a time as you find them, so leave them with me.
Thanks.
codeur:
--- Quote from: Cryogen on April 03, 2010, 07:51:50 pm ---There are default settings loaded when you first open prefs. After that, the prefs saved in the project are loaded. What the template functionality will do is allow you to import a set of prefs to avoid having to set them manually, as you initially mentioned. Once they're imported, they're saved in the project and loaded from there on subsequent occasions.
--- End quote ---
This needs to be thought out carefully. At the moment 3 different sets of prefs can be active at various points:
1 - The default prefs (active when no previously used project has been opened and no settings template loaded). All settings involved.
2 - The user prefs (active when the user has loaded a settings template or edited the defaults). All editable settings involved.
3 - A project prefs (active when the user has loaded a previously saved project). All except global settings involved.
Based on the current structure, this is how I imagine most users will expect the preferences to work in various cases:
** Case 1 - I have just installed CB, or just activated DoxyBlocks, no template has ever been saved:
- New project:
When I start a new project the default prefs (1) are active. They offer the most common choices and will work OK on most systems.
- Existing project:
When I load an existing project, the project DoxyBlocks settings (3) become active, overriding all except global settings.
** Case 2 - I have used DoxyBlocks for a while and saved my preferences into a template:
- New project:
When I start a new project the user prefs (2) from the template are active. They are my choices and I don't want to have to manually load them at each new project.
- Existing project:
When I load an existing project, the project DoxyBlocks settings (3) become active, overriding all except global settings.
With the "Load settings" option I can override the project settings with the template settings if I want.
** In all cases:
I can edit the preferences and save them to the user prefs template at any time. All current preferences except global preferences are saved to the project.
-------------------------------
In light of this:
- Load settings issue:
Note that in the above scenarios I have indeed found a usage for the "Load settings" option in Case 2, Existing project (if we keep the current structure with project prefs - see below.).
- No loading of user prefs on startup:
You seem to have a different scenario in mind for Case 2, new project, one that would force a user to manually load their chosen settings from template every time a new project is started.
Are you sure requiring this repetitive manual loading is needed? Is the automatic loading of user preferences on startup hard to do?
- Getting rid of project prefs:
Is the saving of DoxyBlocks project prefs in projects and loading of these preferences from projects really useful? What would be the cost of simply getting rid of project prefs? If the costs are not great, being able to simplify the prefs this way could be worth doing.
-------------------
For Later:
When we have discussed this, we will have to examine what happens when a new project is started after an existing one, or when several projects are concurrently in memory. These are issues that disappear if we get rid of project prefs.
codeur:
--- Quote from: Cryogen on April 03, 2010, 07:51:50 pm ---The only real question is where we're loading the template from. It sounds like the best option would be to have a file selection dialogue that defaults to the directory pointed to by %APPDATA%. You would then get the default location initially, wherever that might be in the circumstances, and can browse from there. How does that sound?
--- End quote ---
Offering saving directory choice is an added interface complexity. It would also make the automatic loading of user preferences that I am plugging for in my previous post impossible.
How about just saving into %APPDATA% or a preset subdirectory of %APPDATA% without giving the choice?
Cryogen:
Hi Codeur,
--- Quote from: codeur on April 04, 2010, 01:55:29 am ---This needs to be thought out carefully. At the moment 3 different sets of prefs can be active at various points:
--- End quote ---
You have obviously been thinking far too much about this. ;-)
Firstly, the whole %APPDATA% discussion has been smoke and mirrors. I am using the sdk function which, as expected, happily returns the correct value of that variable, wherever it may be pointing. I have done a lot of research and tested with biplab's script and the cbLauncher. The current code correctly returns the redirected directory in each case. Therefore, the current code should be doing what you want with the exception of automatically loading your template by default when you create a new project.
BTW, I presume this is you:
<secret URL> :mrgreen:
If so, it's good to see how it's being used.
--- Quote from: codeur on April 04, 2010, 01:55:29 am ---When I start a new project the user prefs (2) from the template are active. They are my choices and I don't want to have to manually load them at each new project.
--- End quote ---
Perhaps I underestimated the laziness of the average developer. :-)
I think the difference is probably that, in your educational scenario, you are probably in a position where you create small projects often, whereas I, and I suspect most users, would be much more likely to create new projects fairly rarely and spend most of our time revisiting existing projects. However, I'm all for automation and convenience so I don't see it as a bad thing. The question then becomes how best to implement it in the current framework.
--- Quote from: codeur on April 04, 2010, 01:55:29 am ---In light of this:
- Load settings issue:
Note that in the above scenarios I have indeed found a usage for the "Load settings" option in Case 2, Existing project (if we keep the current structure with project prefs - see below.).
--- End quote ---
Goodo.
--- Quote from: codeur on April 04, 2010, 01:55:29 am ---- No loading of user prefs on startup:
You seem to have a different scenario in mind for Case 2, new project, one that would force a user to manually load their chosen settings from template every time a new project is started.
Are you sure requiring this repetitive manual loading is needed? Is the automatic loading of user preferences on startup hard to do?
--- End quote ---
Yes, that was the idea. No, but possibly. Possibly not, I haven't looked at the details yet. Perhaps what we need is a way for the user to have their template prefs used as the default prefs? That's basically what you're seeking. Sounds reasonable.
--- Quote from: codeur on April 04, 2010, 01:55:29 am ---- Getting rid of project prefs:
Is the saving of DoxyBlocks project prefs in projects and loading of these preferences from projects really useful? What would be the cost of simply getting rid of project prefs? If the costs are not great, being able to simplify the prefs this way could be worth doing.
-------------------
For Later:
When we have discussed this, we will have to examine what happens when a new project is started after an existing one, or when several projects are concurrently in memory. These are issues that disappear if we get rid of project prefs.
--- End quote ---
You bet it's useful. The cost would be having to stick them elsewhere, which really gains nothing that I can see and loses a bunch of built-in functionality, or not having per-project prefs, which would render the whole thing far less useful and would be a very large step backwards.
It's very unlikely that I will be getting rid of project prefs. The only reason I don't say "won't" is because I prefer not to deal in absolutes. Things change. However, don't start holding your breath as I'd hate to see you expire. :lol:
I'm also extremely disinclined to unwind/undo/reverse weeks of work.
I think that what you're after can be provided by reworking how "default" prefs are managed. I'll look into that.
You've probably also noticed that I've slowed down the work rate a fair bit in the last week or so. That's probably going to continue so the releases will be a bit slower.
Cheers.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version