Mark Miller

December 2014 - Posts

  • What’s New in CodeRush 14.2

    IntelliRush

    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:

    FilteringByExtensionMethods

    You can filter to see regular methods only:

    MethodsOnly

    You can filter to see properties only:

    FilterPropertiesOnly

    You can filter to see only enums:

    FilterOnlyEnums

    You can filter to see only namespaces:

    O'nlyNamespaces

    You can filter to see only interfaces:

    InterfacesOnly

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

    FilterHint

    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:

    DeadPathDeemphasis2

    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:

    SpellCheckerMemberNames

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

    InsideTeztMethod

    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.

    SpellChecker

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

    InsideTestMethod

    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.

    AddToDictionary

    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:

    F5Run

    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:

    AllCodeRushLike

    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:

      ShortcutBinding

    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.

    F5ToRunTestCases

     
LIVE CHAT

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 info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. 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-2017 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners