SubMain - CodeIt.Right The First Time!


Support Community for SubMain Products
 Home Products Services Download Purchase Support
in Search
Home Forums Blogs Tutorials/CIR Tutorials/GD Downloads
Welcome to SubMain Community Sign in | Join | Help

How To

  • How to Assign Visual Studio Shortcut for GhostDoc

    Sometimes you may reset default GhostDoc shortcut in Visual Studio or want to assign your own custom shortcut.

    Here is how you do that:


    1. In Visual Studio go to Tools -> Options, then select Environment -> Keyboard
    2. Filter commands by "GhostDoc" in the Show commands containing text box
    3. Select Tools.SubMain.GhostDoc.DocumentThis in the list
    4. Select "Text Editor" in the Use new shortcut in drop down
    5. Choose the hotkey you want to invoke the DocumentThis command (Ctrl+Shift+D in this example)
    6. Press Assign and OK to close the dialog and save. You are all set.

    While you are in the Options dialog you may want also assign shortcut to another less known but very useful GhostDoc command Rebuild Documentation. This command will rebuild your existing XML comment using the changed signature information. Be careful with this command though - it will reset your custom edited XML comment. In the example below we assigned command RebuildDocumentation to sequence Ctrl+Shift+D, Ctrl+Shift+R


  • How to Backup and Restore Visual Studio settings

    If you need to preserve your Visual Studio settings, there is a tool built into VS that allows to backup and restore the settings. In this tutorial we are assuming that you are saving a copy of ALL settings to use by you personally as a backup.

    Make a backup

    1. In Visual Studio use Tools / Import and Export Settings… menu to open  Import and Export Settings Wizard.

    2. Select Export selected environment settings and click Next.

    3. To include ALL settings make sure the All Settings box is checked. Then click Next.

    4. Choose the file name for the settings backup file.

    5. Then click Finish. The wizard will store settings in the file.

    Restore from a backup

    1. Use Tools / Import and Export Settings… menu to open  Import and Export Settings Wizard.

    2. Select Export selected environment settings and click Next.

    3. Choose whether you want to make backup current settings.

    4. Choose your backup and click Next.

    5. To include ALL settings make sure the All Settings box is checked. Then click Finish.

    6. The wizard will restore settings from the backup.

  • How to submit CodeIt.Right Log file to SubMain support

    CodeIt.Right Log file contains detailed debug information that allows us to troubleshoot most every issue on you experience with the product.

    These are the steps to email the log file to us:

    1. Open Visual Studio

    2. In the menu bar, click CodeIt.Right, then click Help & Support, and then click Email Log File

    3. Attach file from the location in the email body - in the screenshot above is "C:\Users\sergeb\Documents\SubMain\CodeIt.Right for VS2008\CodeIt.Right.log"

    4. Click Send to email the attached file to us.

  • How to add rule to User Profile

    Some of the rules included with CodeIt.Right are not part of the built-in profile as are not part of the Microsoft Guidelines and yet they often come very handy especially when you choose to use a standard other than recommended by Microsoft.

    This post covers step-by-step how to add a rule to custom user profile. In this walk-through we will add rule "Replace identifier prefix" (ReplaceIdentifierPrefix) [Naming] and configure it to replace the old style "m_" variable prefix with the new .NET style "_" (underscore). This is very convenient when move existing old style project to the .NET naming conventions.

    1. Open Profile Editor
    2. Make sure you are not using built-in profile -> see How to create own Profile
    3. Click the Add Rule toolbar button

    4. Find and select the "Replace identifier prefix" in the list and click OK

    5. Enter name for the new rule (we will use "Replace "m_" with "_" is"), set PrefixToCheck parameter to "m_" and PrefixToReplace to "_", choose Targets (using only the targets that are applicable to the rule allows for better analysis performance) and click Save

    6. New rule "Replace "m_" with "_" is" is part of your profile now.


  • How to create own Profile

    If you try to edit the built-in Profiles in CodeIt.Right you will get a message saying that the profile is read only. This is done to ensure the integrity of the default guidelines that ship with CodeIt.Right. These two profiles – the Microsoft Guidelines Profile and the SubMain Instant Review Profile - are included to give you examples of the kind of rules you might want to create and apply as your own team standards.

    You can configure the shipped rules so that they fit your specific needs or create new ones. You can rearrange the rule groups and you may even decide to group certain sets of rules into completely separate profiles.  For example you may decide to group all security related requirements into a security rules profile. You can run this profile as needed as part of the On Demand analysis.  Alternatively, you can use this - or any – profile as an Instant Review profile that runs in the background when working on a particular project.  The bottom line is that you can use the power of CodeIt.Right, in this case the Profiles feature, to have the product work in just the way you want.

    You can create your own customized CodeIt.Right profiles either by cloning an existing profile or creating your own from scratch.  This tutorial explains both ways of doing this.

    Cloning an Existing Profile

    1. Open the Profile Editor

    2. Click the Save As toolbar button

    3. Enter a name and (optional) description for your profile

    4. The newly created profile will be opened in the Profile Editor ready for you add, edit or delete items of your choice.

    Creating a New Profile from Scratch

    To create a new profile from scratch, do the following:

    1. Open the Profile Editor

    2. Click the New button on the toolbar

    3. Enter the name and (optional) description for your profile. Next, in the Base Profile combo box, select Blank. You can then add the rules you want in your custom profile.

Home |  Products |  Services |  Download |  Purchase |  Support |  Community |  About Us |