Jindent - Visual Studio/Express Integration
Read instructions how to install Jindent into the Visual Express/Studio IDE.
(Please note the following description and screenshots base on the Visual Express C++ 2010 IDE.)
-
Download the Windows Jindent installer from our website:
http://www.jindent.com/downloads and install Jindent on your system.
In this example we assume the software package is installed at:C:\Program Files (x86)\Jindent\
. We will need this path later for our external tool configuration in Visual Express/Studio. -
Start Jindent Customizer on your deskop to create an initial Jindent settings file you would like to use in your Visual
Express/Studio integration. After starting the Customizer you can edit and configure your formatting style as you need and finally
save it to a fixed position on your hard disc, let's say to:
C:\JindentSettings\MySettings.xjs
. Remember this location, we will need it later. -
Start your Visual Express/Studio IDE and navigate in the main menu to
Tools
and select menu itemExternal tools...
. -
Now add a new external tool command to format a single file with Jindent.
Click on buttonAdd
and insert a new menu content entry as described on the screenshot. (Please be aware of all control settings in the screenshot - even the checkbox settings!)Please note: Our external tool entry is
External Tool 4
. If you have already defined other external tool configurations than number4
can of course differ from our description. This is important because we will later refer to this external tool number. -
After defining the first command we add a second one to format a complete directory including all its subfolders with Jindent.
Click on buttonAdd
and insert another new menu content entry as described on the screenshot.Please note: Our external tool entry is
External Tool 5
. If you have already defined other external tool configurations than number5
can of course differ from our description. This is important because we will later refer to this external tool number.Click on the
OK
button to apply all new changes. -
Now all necessary external tool commands are available in the system. The next step is to bind them to new context menu entries to be able to access them directly from our IDE.
For this select main menu
Tools
again and choose menu itemCustomize...
to open the Customize dialog. There select tabCommands
and choose radio buttonContext menu
and select combo box entryEditor Context Menu | Code Window
.Add Command...
and a new dialog pops up. There chooseTools
forCategories
and then selectExternal Command 4
forCommands
. This is the 'Format file with Jindent' command you would like to bind to the editor's context menu. Finally click buttonOK
. -
To bind the second external tool command select
Project and Solutions Context Menus | Project
.Add Command...
and choose againTools
forCategories
and then selectExternal Command 5
forCommands
. This is the 'Format directory with Jindent' command you would like to bind to the project context menu. Finally click buttonOK
. -
Now all menu entries are declared and connected to our external tool commands so you can click on
Close
button to finally close theCustomize...
dialog.
To verify open a sample C/C++ file in your text editor and right click in the editor panel to open the editor's context menu. The very first entry should be now 'Format File with Jindent'.Execute it and Jindent will start formatting the code editor's content. Jindent's output will be printed in a console window below. After formatting the IDE will ask to reload the editor's content because it was modified from outside the IDE. Agree and the new formatted content shows up in your editor window.
To finish your verification right click on the project node in the
Solution Explorer
and here again the context menu pops up and the first entry should beFormat Folder with Jindent
. Invoke this new menu entry and Jindent will format all C/C++ and header source files found in the selected project. - If your verification passed then Jindent is installed properly and you are done.
- Tags: Visual Express, Visual Studio
Comments (0)