Difference between revisions of "Personalities"

From Code::Blocks
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Code::Blocks features]]
+
[[Category:User Documentation]]
In Code::Blocks context, personalities are different sets of settings each tailored for a different workflow. Let me explain.
+
In Code::Blocks context, '''personalities''' are different sets of settings each tailored for a different workflow.
  
The "default" personality is, well, Code::Blocks as you know it :)
+
== Creating a new personality ==
  
By default, all available plugins are loaded and all the manager panes are open (project manager, message manager, etc).
+
Let's assume that you want a more lightweight Code::Blocks to quickly work on testing single-source files. Most plugins are not needed for this kind of job so it would be wise to remove them from the loading process. You would also like the manager panes to be hidden by default.
Now, let's assume that you want a more lightweight Code::Blocks to quickly work on testing single-source files. Most plugins are not needed for this kind of job so it would be wise to remove them from the loading process. You would also like the manager panes to be hidden by default.
 
  
 
To accomplish the above task, a new Code::Blocks personality should be created. Here is how:
 
To accomplish the above task, a new Code::Blocks personality should be created. Here is how:
  
*Find the shortcut to Code::Blocks on your desktop. If there isn't any, create one.
+
# Find the shortcut to Code::Blocks on your desktop. If there isn't any, create one.
*Make a copy of this shortcut and rename it to "Code::Blocks Lite" (for example). You should now have two shortcuts to Code::Blocks on your desktop.
+
# Make a copy of this shortcut and rename it to "Code::Blocks Lite" (for example). You should now have two shortcuts to Code::Blocks on your desktop.
*Right-click on the "Code::Blocks Lite" shortcut and choose "Properties". In the "Target" box, append the following magic words:
+
# Right-click on the "Code::Blocks Lite" shortcut and choose "Properties". In the "Target" box, append the following magic words: <code>--personality="Lite"</code>
*<code>--personality="Lite"</code>
 
  
:'''''Tip''''': ''if you want to see a list of all defined personalities and select which one to use, replace the above with the following'':
 
:<tt>--personality=ask</tt>
 
  
This will cause Code::Blocks to use the "Lite" personality when it starts-up.
+
:'''''Tip''''': ''if you want to see a list of all defined personalities and select which one to use, replace the above with the following'': <code>--personality=ask</code>
"But we haven't defined "Lite" anywhere yet!", I hear you cry out. Fear not! Code::Blocks is smart enough to create a new personality for you, if the one you entered does not exist.
+
The currently used personality is displayed as last entry in the status bar.
  
After you 've done the above changes to the "Lite" shortcut and saved it, launch Code::Blocks.
+
This will cause Code::Blocks to use the "Lite" personality when it starts-up. But because we haven't defined the "Lite" personality, Code::Blocks will create a new personality for us.
Although you may see no changes, Code::Blocks will be operating under the personality "Lite". This means, effectively, that any personalities-aware configuration changes you make will be done on the "Lite" personality.
 
  
To see this in action, let's return to our example scenario and turn the "Lite" personality into really light ;)
+
After you've done the above changes to the "Lite" shortcut and saved it, launch Code::Blocks.
 +
Although you may see no changes, Code::Blocks will be operating under the personality "Lite". This means, that any personalities-aware configuration changes you make will be done on the "Lite" personality.
  
*Go to "Plugins->Manage plugins" and disable (uncheck) all plugins except the compiler.
+
Next we make a light version of Code::Blocks by disabling plugins and hiding the manager panes:
*Now hide the "Manager" (Shift-F2) and "Messages" (F2) panes (in the "View" menu).
 
*Exit Code::Blocks.
 
*Launch Code::Blocks again, by clicking on the "Lite" shortcut. Everything should be as configured: no manager panes showing and just one plugin loaded. Congratulations!
 
  
But an astute reader shouts: "Hey, Code::Blocks always remembered my changes and started like it was last closed. What's the difference? Are you kidding us?"
+
# Go to "Plugins->Manage plugins" and disable (uncheck) all plugins except the Compiler.
Here's where the power of personalities comes in :)
+
# Now hide the "Manager" (Shift-F2) and "Messages" (F2) panes (in the "View" menu).
 +
# Exit Code::Blocks.
 +
# Launch Code::Blocks again, by clicking on the "Lite" shortcut. Everything should be as configured: no manager panes showing and just one plugin loaded.
  
*Close Code::Blocks.
+
To use Code::Blocks at full capacity again, use the shortcut that doesn't have the <code>--personality="Lite"</code> switch:
*Now launch Code::Blocks by clicking on the standard shortcut (no "--personality" command-line option). Tadaa! Code::Blocks in its full capacity!
 
  
 
+
# Close Code::Blocks.
As an overview, to define and use a new personality you just have to launch Code::Blocks with the command-line option "<tt>--personality=<name></tt>", where <tt><name></tt> is the personality's name or "<tt>ask</tt>" if you want to be asked which personality to use (of the existing ones). After that, Code::Blocks will work under the selected personality for this session.
+
# Launch Code::Blocks by clicking on the standard shortcut (no "--personality" command-line option).

Latest revision as of 21:52, 8 December 2007

In Code::Blocks context, personalities are different sets of settings each tailored for a different workflow.

Creating a new personality

Let's assume that you want a more lightweight Code::Blocks to quickly work on testing single-source files. Most plugins are not needed for this kind of job so it would be wise to remove them from the loading process. You would also like the manager panes to be hidden by default.

To accomplish the above task, a new Code::Blocks personality should be created. Here is how:

  1. Find the shortcut to Code::Blocks on your desktop. If there isn't any, create one.
  2. Make a copy of this shortcut and rename it to "Code::Blocks Lite" (for example). You should now have two shortcuts to Code::Blocks on your desktop.
  3. Right-click on the "Code::Blocks Lite" shortcut and choose "Properties". In the "Target" box, append the following magic words: --personality="Lite"


Tip: if you want to see a list of all defined personalities and select which one to use, replace the above with the following: --personality=ask

The currently used personality is displayed as last entry in the status bar.

This will cause Code::Blocks to use the "Lite" personality when it starts-up. But because we haven't defined the "Lite" personality, Code::Blocks will create a new personality for us.

After you've done the above changes to the "Lite" shortcut and saved it, launch Code::Blocks. Although you may see no changes, Code::Blocks will be operating under the personality "Lite". This means, that any personalities-aware configuration changes you make will be done on the "Lite" personality.

Next we make a light version of Code::Blocks by disabling plugins and hiding the manager panes:

  1. Go to "Plugins->Manage plugins" and disable (uncheck) all plugins except the Compiler.
  2. Now hide the "Manager" (Shift-F2) and "Messages" (F2) panes (in the "View" menu).
  3. Exit Code::Blocks.
  4. Launch Code::Blocks again, by clicking on the "Lite" shortcut. Everything should be as configured: no manager panes showing and just one plugin loaded.

To use Code::Blocks at full capacity again, use the shortcut that doesn't have the --personality="Lite" switch:

  1. Close Code::Blocks.
  2. Launch Code::Blocks by clicking on the standard shortcut (no "--personality" command-line option).