CodeBlocks Plugin

The CodeBlocks functionalities can be extended by “Plugins”. As the CodeBlocks distributed with JumpStart C++ for Cortex is a special build using a forked version of CodeBlocks, users cannot add arbitrary CodeBlocks plugins. If there is a plugin that you may be interested in adding, email us, and we may add it to a future release.

 

The currently provided plugins are:

 

     AStyle Source Code Formatter

     Browse Tracker

     Drag Scroll

     Key Binder

     Doxy Blocks

     Auto Versioning

     Code Stat

     Hex Editor

     Smart Indent

 

CodeBlocks plugins are sometimes documented in the CodeBlocks document wiki http://wiki.codeblocks.org/index.php/. Try to do a web search if you need more information.

Enabling Plugins

Only some plugins (e.g. AStyle source code formatter and Hex Editor)  are active by default. To enable the other plugins, invoke Plugins->Manage plugins, and click on Install New, then browse to <install root>\bin\ImageCraftCB\optional\, and select the .cbplugin file corresponding to the plugin name.

 

NOTE: if you upgrade to a later version of the product, you will need to redo the plugins activation.

AStyle Source Code Formatter

AStyle formats the source file(s) in a project using the open source AStyle (Artistic Style) formatting program. Note that it is not a “format as you type” process. So, while you can control whether to auto-indent, and other indenting options (see Smart Indent below), the AStyle formatting options are applied only when you invoke the command.

 

Invoke Plugins->Source code formatter (AStyle) or right-click in the editor or the file name in the project file list, and select the Format using AStyle option formats the single file.

 

To format all the files in a project, right-click on the project name in the project file list and select the Format this project (AStyle) option.

 

You can select the style via Settings->Editor…->Source formatter. You can further modify formatting options under different tabs.

 

image

Browse Tracker

Browse Tracker enhances the basic bookmark functions. In addition to the enhanced functions described below, bookmarks are saved and restored across editing sessions.

 

By default, Browse Tracker is not enabled; you must enable it in Settings->Editor…->BrowseTracker: You may also configure various options in the same dialog.

 

image

 

To set a bookmark, hold down the left mouse key on a line for ¼ second or more, then release the mouse button, and a bookmark will be added to the line.

 

 

 

Further actions are available when you right-click on the editor under the Browse Tracker… popup menu. All commands are under View->Browse tracker… menu.

 

Commonly-used actions are also available on the toolbar.

 

image

Mouse Actions

Mouse actions are configurable through the option settings dialog.

 

Ctrl-Left clears all bookmarks in the current editor.

 

To browse the recently visited editors, uses the Alt-Left and Alt-Right keys.

 

To browse recently marked editor positions, uses the Alt-Up and Alt-Down keys..

Browse Tracker Toolbar Icons

The left and right green arrows perform the same functions as Alt-Left and Alt-Right keys and jump among the recently visited editors.

 

The red flag toggles the bookmark.

 

The next three icons jump to the previous bookmark, jump to next bookmark, and clear all the bookmarks in the current editor respectively.

 

 

Drag Scroll

The DragScroll (or Mouse Drag Scrolling) plugin enables scrolling of text areas such as the editor and the application / debug log by dragging the mouse Right or Middle key. This is especially useful when there is no scroll wheel in the system (e.g. a laptop with built-in trackpad).

Drag Scroll options can be changed via Settings->Editor…->Mouse Drag Scrolling.

In an editor window, Mouse Drag Scrolling allows the user to drag (scroll) the text with the designated key (RightMouseDown or MiddleMouseDown).

Ctrl-Mouse Wheel zooming in the Drag Scroll plugin only applies to non-editor windows. It allows the user to zoom the other windows (StartHerePage, logs, Manager, Open Files List, etc).

Key Binder

Key Binder lets you to assign keyboard shortcuts to menu items. It can be accessed via Settings->Editor…->Keyboard shortcuts.

 

Keys can be added to and removed from any menu. Note that some keys are built into Windows, e.g. ^C for copy, ^X for cut, and ^V for paste, and cannot be removed.

image

Doxy Blocks

DoxyBlocks integrates Doxygen to the CodeBlocks IDE. Official Doxygen site is here: http://www.stack.nl/~dimitri/doxygen/index.html.

 

We like DoxyBlocks and Doxygen so much that we use them to document JSAPI V9 and other ImageCraft products.

 

You can add Doxy Blocks action icons to the toolbar by enabling View->Toolbars->DoxyBlocks. You will have to save the perspective by View->Perspectives->Save Current for it to take effect in subsequent runs.

Auto Versioning

The Auto Versioning plugin automatically updates the version and build numbers of a project. It is most useful for quick-and-dirty versioning, prior to alpha, beta or production releases before a proper source code management system is used.

 

This plugin is well documented here: http://wiki.codeblocks.org/index.php/AutoVersioning_plugin

Code Stat

Code Statistics gives the statistics for a project or entire workspace. Once installed, invoke it via Plugins->Code statistics:

 

image

Hex Editor

The Hex Editor plugin opens a binary file and allows you to edit the contents in hexadecimal mode. You must use File->Open with hex editor to open the file. You may also need to change the file mask to “All files (*.*)” to see the files.

 

 

 

 

 

image

Once you open the file, click on the “Hex” button and select “Hex” for the proper display:

 

image

Smart Indent

Smart Indent automatically moves the cursor as you hit the ENTER key. Its operations are part of the Settings->Editor…->General settings option dialog.