Mark Miller

December 2014 - Posts

  • What’s New in CodeRush 14.2


    IntelliRush is the big feature in this release. IntelliRush enhances Visual Studio’s Intellisense, most importantly adding the ability to easily filter the list.

    You can filter to see extension methods only:


    You can filter to see regular methods only:


    You can filter to see properties only:


    You can filter to see only enums:


    You can filter to see only namespaces:


    You can filter to see only interfaces:


    To filter, just tap the Ctrl key. The filter hint will appear:


    Then simply press the letter of the filter you want to apply. For more on IntelliRush, see this post.

    Debug Visualizer

    We continue to invest in and polish the Debug Visualizer. New in 14.2:

    Dead Path De-emphasis has been moved out of beta and is now a first class feature. Code paths that will not be executed, determined as you step through the code, are rendered in a reduced contrast.

    For example, in the code below, the instruction pointer is on the switch statement, but it has not been evaluated yet. However DV gives you a peek into the future and shows you exactly which case statement execution will flow to:


    Syntax highlighting is still visible in the dead code path. Dead code paths are now detected in more scenarios, including dead if or else branches, dead case statements and dead catch statements.

    Exception Filters in Visual Basic are now supported, with the filter value and associated Boolean icon clearly visible.

    Exception Variable Preview in all catch statements, even when the exception variable is not declared.

    Smoother Animation, keeps important information right where you are already looking.

    Behind the scenes, we updated the DV engine. It is more performant, and we improved JavaScript analysis.

    Spell Checking Member Names

    You can optionally check member names. To turn the option on, go into the Editor\Spell Checker options page, and check the “Name of members” checkbox:


    Once enabled, member names are all checked for correct spelling. Spelling issues are highlighted:


    To correct or ignore the spelling anomaly, place the caret inside the misspelled portion, press the CodeRush key (e.g., Ctrl+` – Control plus the back tick key is the default.


    Correct the spelling mistake, and the member name is instantly updated everywhere.


    You can also add commonly used abbreviations to the dictionary. For example, in the code above, “ctx” is highlighted as not found. That’s an abbreviation I use for ContextProviders I drop on the design surface. So I can easily add that to the dictionary so I’ll never see that again.


    Other Improvements

    • We’ve also improved the Decompiler, Jump to Declaration (with Partial Classes), and we’ve added automatic updates for CodeRush if you download and install from the Visual Studio Gallery. Here’s your complete list of What’s New in CodeRush 14.2.

    If you’d like to see all this in action, watch my What’s New in CodeRush 14.2 webinar scheduled for 5 December 2014 at 10:00am.

  • Pressing F5 in Test Methods to Test

    Last night, as I was about to stop work to spend some time with the family, I noticed this tweet:


    And I thought: You can do this in CodeRush. Easily. CodeRush has a remarkably flexible shortcut-binding system that can associate a sophisticated context (that must be satisfied) with any key binding. So it’s relatively simple to bind F5 to a command to run the test when the caret is inside a test method. You just need a context that tells the key-binding engine whether you’re in a test method or not.

    CodeRush ships about 200 different contexts, that can do anything from tell you whether you are inside a property’s getter to whether the active project references a particular assembly. Contexts are used in shortcut bindings as well as other editor features.

    After seeing the tweet, I checked to see if we already shipped a context that was satisfied when the caret was inside a test method. We did not.

    This morning I noticed more discussion about this feature, including a suggestion to use another shortcut (which increases user burden and cognitive load – lots of good reasons NOT to do this), followed by this tweet from Caleb Jenkins:


    Time to get to work.

    Here’s how I built the feature, in about three minutes:

    1. CodeRush | New Plug-in.
    2. Dropped a ContextProvider control onto the design surface.
    3. Named it “Editor\Code\InTestMethod”.
    4. Double-clicked the ContextSatisfied event. Added this code:

      private void ctxInTestMethod_ContextSatisfied(ContextSatisfiedEventArgs ea)
      {   Method activeMethod = CodeRush.Source.ActiveMethod;   if (activeMethod != null && activeMethod.Attributes != null)     foreach (DevExpress.CodeRush.StructuralParser.Attribute attribute in activeMethod.Attributes)       if (attribute.Name != null && attribute.Name.StartsWith("Test"))       {         ea.Satisfied = true;         return;       }
    5. Pressed F5 to run (to test my plug-in).
    6. In the new instance of VS, added the following CodeRush shortcut binding:


    And that’s it.

    Now I can press F5 inside a test method and only that method test is run. If I press F5 outside of a test method, the startup project runs.



Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners