Mark Miller
  • CodeRush for Roslyn 1.0.8 (preview) is Available

    Team CodeRush continues its 45-day sprint cycles with today’s release of CodeRush for Roslyn 1.0.8. We’ve fixed bugs, improved performance, and reduced memory consumption. New features include:

    Paste as XAML/SVG

    Starting with version 1.0.8, CodeRush for Roslyn enables you to easily to incorporate vector graphics into your applications, with the new "Paste as XAML" and "Paste as SVG" code providers. Simply copy a graphic selection from a vector editing tool (such as Microsoft Visio®, Microsoft PowerPoint®, or Adobe Illustrator®) and then paste that vector drawing inside your XAML, or inside an HTML file as SVG.

    PasteAsXaml2

    Code Coverage

    CodeRush for Roslyn can now collect coverage information for CoreCLR test cases in the DNX environment.

    Decompiler

    The CodeRush Decompiler can now search for symbols across multiple assemblies simultaneously. Search progress across for assembly is individually visualized.


    DecompilerSearch 
     

    We have also improved the decompilation logic to produce code that is even easier to read. The CodeRush Decompiler now understands and builds code for:

    • Members explicitly implementing an interface
    • Constructor initializers
    • Events
    • Custom event accessors
    • Indexers

    Quick File Navigation

    Quick File Navigation is now faster and uses less memory.

    Try CodeRush for Roslyn Now

    You can download the current preview version of CodeRush for Roslyn from the Visual Studio Gallery. Let us know what you think.

  • What’s New in CodeRush for Roslyn (preview) 1.0.7

    CodeRush for Roslyn (preview) v1.0.7 is now available on the Visual Studio gallery.

    Here’s an overview of new and improved functionality in CodeRush for Roslyn (CRR):

    Unit Test Runner

    The Unit Test Runner now detects and runs unit tests for the MSTest framework. The Test Runner also runs CoreCLR test cases in the DNX environment.

    Structural Highlighting

    This release includes Structural Highlighting support for C#, Visual Basic and XAML. Structural Highlighting helps you easily see the structure of your code.

    Navigation Tools

    The Quick Nav and Quick File Nav features have been ported to CodeRush for Roslyn, so you can quickly find symbols and files throughout your solution.

    Refactorings

    The Refactorings Catalog options page is now available. This options page lists all refactorings and enables you to control the availability of each refactoring.

    Code Cleanup

    The Make properties auto-implemented code cleanup rule is now available.

    Code Coverage

    Now you can export code coverage statistics to XML, HMTL, and an NDepend-compatible format. CodeRush for Roslyn also now collects and presents coverage information for MSTest unit tests.

    Decompiler

    Decompiled code structure now more closely matches the original structure of the code (before it was compiled), and the Decompiler now automatically names variables based on their usage or type.

    Additionally, the following code structures are now supported:

    • for and foreach loops
    • using statements
    • auto-implemented properties
    • null-coalescing operators

    Give it a Try

    As always, you are encouraged to download the CodeRush for Roslyn preview and give it a try.

    Side note: One of the new CodeRush 15.2 features, Paste as XAML/SVG, did not make it into the CodeRush for Roslyn v1.0.7 release due to tight development constraints. Our intention is to release this feature in the next CodeRush for Roslyn update, v1.0.8.

    Earlier blog posts on CodeRush for Roslyn:

  • What’s New in CodeRush Classic 15.2

    CodeRush Classic (CRC) gets two new features in 15.2.

    Note that most of our development effort is currently directed toward CodeRush for Roslyn (CRR) which is driven by 45-day sprints between releases. We’ll talk about new features in CodeRush for Roslyn as those releases become available.

    In CodeRush Classic, we’ve found clever ways to improve the speed of Quick Nav, making it significantly more responsive.

    Also, CodeRush Classic gets two new features in this release:

    Code Coverage

    CodeRush classic gets Code Coverage, which tells you how much of your application is covered by test cases, which can be one indicator of overall code quality. This feature is also useful when maintaining code – you can get a clear picture of how safe it is to change methods or even individual lines of code. If the code you want to change is covered by test cases, it is safer to change that code (because the test cases covering the code you want to change increase the chances you’ll know immediately if you unintentionally break something).

    To see Code Coverage, you need to first run your tests from the CodeRush Unit Test Runner using one of the two orange test tube icons at the top:

     UnitTestRunner

    These icons run your tests so CodeRush watches for coverage.

    The orange test tube button with only a single green triangle ( RunSelectedTests ) shows coverage provided by only the selected tests.

    The orange test tube button with two green triangles ( RunAllTests  ) shows coverage provided by all your tests.

    Regardless of which button you press, after the test run is complete, CodeRush reports the results in the Code Coverage window, which looks like this:

     image

    The Code Coverage window provides a hierarchical view of the projects in your solution, and shows the code coverage results for each member, type, namespace or project. Results are summarized in the percent graphs on the right, showing the lines of code covered over the total lines of code.

    The Code Coverage window optionally shows you a code preview in a separate pane, shown in the screenshot above. Code highlighted in green is covered – that means at least one of the test cases resulted in that line of code being executed. Code with a gray background is not covered by the tests that were run.

    You can bring a method of interest to focus inside the Visual Studio editor by right-clicking that node in the tree view and choosing “Go to Method”.

    Paste as Xaml/Svg

    This is one of the more interesting features we’ve introduced in some time, and it’s for developers who are creating applications and web sites that need scalable graphics. Up until now, creating vector graphics for your applications has been relatively painful, especially if your team lacks a dedicated graphic designer. Existing vector graphic editors are either functionally weak or they require a sequence of tedious export/import steps to get those vector graphics from the graphic editor into Visual Studio.

    CodeRush Classic 15.2 solves this challenge rather elegantly, with the new Paste as Xaml/Svg code providers. Just design or open the graphic in your vector editor of choice (Microsoft® Visio, Microsoft® PowerPoint, Adobe® Illustrator, etc.), copy it to the clipboard, and then paste the graphic inside Visual Studio (inside a XAML file or an HTML file using Ctrl+V or Shift+Insert). CodeRush will convert the vector data on the clipboard into XAML or SVG automatically. You can also press the CodeRush key to bring up the CodeRush menu and choose Paste as Xaml or Paste as SVG.

    To be clear, here are the steps:

    1. Create or open your vector shape in the vector editor of your choice: 
    VectorPowerPoint
    For example, I used PowerPoint to create the gear shown above by forming a union with four rounded rectangles and a circle, and then subtracting a circular hole from the center (you can create this custom shape in PowerPoint in about 45 seconds – it’s that easy).

    2. Copy your custom shape to the clipboard.

    3. Paste into the XAML code or into an HTML file inside Visual Studio:

    PasteAsXaml 

    Of course, you can adjust properties after the paste, such as height/width, fill, stroke, etc.

    Here’s the same gear that I created in PowerPoint pasted inside Visual Studio as SVG (and then copied and pasted here into this post):

    <svg height="352px" width="351px" viewBox="0 0 351 352">
     
    <defs>
        <
    linearGradient id="gradient0" y2="0%" x2="100%" y1="0%" x1="0%">
          <
    stop style="stop-color: #2e75b6; stop-opacity: 0.5" offset="0%" />
          <stop style="stop-color: #2e75b6; stop-opacity: 0.5" offset="100%" />
        </
    linearGradient>
      </
    defs>
      <
    path d="M173,85.0625C124.3125,85.0625,84.8125,124.6875,84.8125,173.5C84.8125,222.375,124.3125,262,173,262
        C221.75,262,261.25,222.375,261.25,173.5C261.25,124.6875,221.75,85.0625,173,85.0625z M153.6875,0L192.375,0
        C197.6875,0,202,4.375,202,9.75L202,33.5625 205.1875,34.0625C219.5,37,233.0625,42,245.5,48.8125
        L252.3125,52.9375 268,37.125C269.9375,35.25,272.375,34.3125,274.875,34.3125
        C277.3125,34.3125,279.8125,35.25,281.6875,37.125L309,64.5625C312.8125,68.3125,312.8125,74.5,309,
        78.25L294.75,92.5625 297.125,95.8125C305.0625,107.5625,311.3125,120.5,315.5625,134.25L318.1875,
        144.4375 336.375,144.4375C341.6875,144.4375,346,148.8125,346,154.125L346,192.9375C346,198.25,
        341.6875,202.625,336.375,202.625L319.9375,202.625 319.1875,207.5625C316.25,221.9375,311.25,235.5,
        304.5,248L298.375,258.125 309,268.8125C312.8125,272.5625,312.8125,278.75,309,282.5L281.6875,309.9375
        C277.9375,313.6875,271.8125,313.6875,268,309.9375L257.75,299.625 257.5625,299.75C242,310.3125,
        224.3125,317.9375,205.1875,321.875L202,322.375 202,337.3125C202,342.6875,197.6875,347,192.375,347
        L153.6875,347C148.375,347,144.0625,342.6875,144.0625,337.3125L144.0625,321.3125 132.125,318.25
        C118.375,313.9375,105.5,307.6875,93.8125,299.75L90.5625,297.3125 78.0625,309.9375C74.25,313.6875,
        68.125,313.6875,64.375,309.9375L37.0625,282.5C33.25,278.75,33.25,272.5625,37.0625,268.8125L51,254.75
        46.875,248C40.125,235.5,35.125,221.9375,32.1875,207.5625L31.4375,202.625 9.6875,202.625C4.375,
        202.625,0,198.25,0,192.9375L0,154.125C0,148.8125,4.375,144.4375,9.6875,144.4375L33.1875,144.4375 
        35.8125,134.25C40.0625,120.5,46.3125,107.5625,54.25,95.8125L54.375,95.625 37.0625,78.25C33.25,74.5,
        33.25,68.3125,37.0625,64.5625L64.375,37.125C66.25,35.25,68.75,34.3125,71.1875,34.3125C73.6875,
        34.3125,76.125,35.25,78.0625,37.125L95.8125,54.9375 105.875,48.8125C114.1875,44.25,122.9375,40.5,
        132.125,37.6875L144.0625,34.625 144.0625,9.75C144.0625,4.375,148.375,0,153.6875,0z"
     
        fill="url(#gradient0)" stroke-width="1" stroke="#1F4E79" />
    </
    svg>

    If you would like to see how this SVG renders in your browser (with an added animated spin), click here.

    So now it’s easy to create your own custom vector graphics and use them inside your XAML applications and web sites.

    As always, let us know what you think.

  • CodeRush for Roslyn, v1.0.6

    CodeRush for Roslyn v1.0.6 is ready for download. Here’s what’s new in this version:

    • The Decompiler is now included in CodeRush for Roslyn v1.0.6. Assembly structure, from namespace all the way down to class members, appears in the tree view on the left, while source code for the selected node appears in a pane on the right.

      DecompilerWindow.png

    • The Unit Test Runner shows test execution progress and summarizes test run results on Visual Studio’s status bar.
    • New test runner actions (which can be bound to shortcuts for fast invocation):

    Command Behavior Default Shortcut
    UnitTestsRunCurrentClass Executes all tests inside the active type (at the caret) Ctrl+T, C
    UnitTestsRunFile Executes all tests contained in the active file Ctrl+T, F
    ShowTestRunner Shows the Unit Test Runner window Ctrl+T, T

      • New Code Cleanup rules:
        • Collapse Accessors
        • Expand Accessors
        • Remove redundant ‘base’ qualifier
        • Remove redundant ‘this’ qualifier
        • Remove redundant type cast
        • Use explicit ‘this’ qualifier for field access
        • Use explicit/implicit visibility modifiers

      • Member Icons – select member scope.
        MemberIconMenu.png

      • Cycle Scope (member/type visibility) Up/Down with Alt+Up/Down
      • New Selection Embeddings wrap the selected expression inside parens when you press one of the paren keys. Enable these bindings if you want this feature:

        image 

        Also, if you work with a non-U.S. keyboard, check the bindings and redefine them if needed to correspond with the keys you press for the left and right parentheses, and the “!” character.

      • New for Refactorings and Code Providers:
        • Declare Constant - declares a constant for the primitive value at the caret.
        • Introduce Setter Guard Clause - introduces a value-changed check at the start of a property setter, exiting early if the assigned value matches what is already in the backing store.
        • Optimize Namespace References gets a new options page, letting you specify sorting options. You can also use this page to specify which references should be never removed even when they aren’t used.

          image
        • Rename File to Match Type - renames the file (and updates the project), so the file name matches the type name.
        • Remove Unused Member - removes empty and unused event handlers.
        • Now available for Visual Basic:
          • Improved support for code providers declaring classes and members.
          • Add Parameter
          • Declare Method
        • New refactorings for C#:
          • Collapse Property - collapses a property with backing store to a single line if its accessors are empty or contain a single one-line statement.
          • Collapse Accessor - Collapses an accessor to a single line if it is empty or contains a single one-line statement.
          • Collapse Method - collapses a method to a single line if its body is empty or contains a single one-line statement.
          • Expand Property - expands a property, placing its getter and setter on separate lines.
          • Expand Accessor - expands an accessor placing its content on a separate line.
          • Expand Method - expands a single-line method placing its content on a separate line.

       

      • Navigation Providers, accessible by pressing Ctrl+Alt+N:
        • Assignments
        • Base Types
        • Declaration
        • Derived Types
        • Implementations
        • Instantiations
        • Members
        • Overloads
        • Overridden Member
        • Overrides
        • Parent Type

      NavigationProviders.png

      The CodeRush for Roslyn preview is free, and updated every 45 days.

      As usual, please download, give it a try – and let us know how we can make it better (support@devexpress.com).

    • CodeRush for Roslyn, v1.0.5

      The CodeRush team, continuing its 45-day or less release pace, is ready to bring you the latest update to CodeRush for Roslyn, version 1.0.5.

      Our previous release, CodeRush for Roslyn v1.0.4, included new refactorings, code providers, text commands, and test runner and code coverage support. You can download the latest version of CodeRush for Roslyn from the Visual Studio Gallery.

      Zero Bug Policy

      The team has a zero-bug policy, which essentially means we resolve all reported issues before we write new features. And so in this release, v1.0.5, we’ve prioritized quality and performance over new/ported functionality, resolving over 200 issues, including:

      • Templates:
        • Expansions in split views
        • Corrected context to prevent unintended expansions inside XML doc comments and interpolated strings
        • Corrected a number of template expansion issues in Visual Basic
      • Exceptions when editing code
      • Performance issues:
        • Toggle Comment
        • Test Runner in large files with a huge number of test cases
      • An edge case out-of-memory exception
      • Edge case deadlocks on solution open/close and Test Runner build
      • Edge case crashes (when rename is invoked in navigation link, or when double-clicking tests in the Test Runner)

      Other feature areas receiving improvements in this release:

      • Code Cleanup
      • Code Coverage
      • Code Providers
      • IntelliRush
      • Linked Identifiers
      • Refactorings
      • References tool window
      • Shortcuts
      • Tab to Next Reference
      • Text Fields
      • Test Runner

      We also added hundreds of test cases to help ensure these issues never appear again.

      New in v1.0.5:

      We added the following new features in v1.0.5:

      • CodeRush now updates test run progress on the Windows taskbar.

        TestRunnerProgressOnTaskBar 
      • The Test Runner filter now shows the full path to each test, so you can easily find the test you are looking for even if you have tests with identical names in different test fixtures.
      • We added the "Add Else Statement" and “Declare Interface” code providers.
      • Smart Constructor, Declare Class, Declare Property, and Declare Property (with field) are now available for Visual Basic developers.

      Give it a Try

      Give the 1.0.5 version a try and let us know what you think. You can download CodeRush for Roslyn from the Visual Studio Gallery.

    • CodeRush for Roslyn v1.0.4

      CodeRush for Roslyn (CRR) v1.0.4 is now available. This free preview version expires on 4 September 2015.

      Here’s a list of what’s new in version 1.0.4.

      New TextCommands:

      • Smart Return, used in the r and lr templates.
      • Smart Constructor (C#), used in the cc template.
      • ForEach, used in the sw and asm templates.

      New Editor Features:

      New Refactorings and CodeProviders:

      VB Support added for:

      Unit Test Runner enhancements:

      • Performance improvements.
      • Ability to exclude selected categories when running all tests.

      Code Coverage enhancements:

      • Navigate from code to the corresponding Code Coverage tree node.

        ShowCoverage 
      • Active method highlighting inside the Code Coverage code view window.

      Download it, try it out, let us know what you think.

    • IntelliRush Hierarchical Filtering

      In CodeRush Classic 15.1 and in CodeRush for Roslyn we added the ability to filter Intellisense members by the class where they are declared.

      Here’s how it works. To show this in action, I created a new Windows Universal App, and opened the MainPage.xaml.cs file. Inside the constructor, I typed “this.”

      Here’s what I see:

      IntelliRush

      That’s about 165 entries. That’s a lot to wade through. I can reduce the list if I have an idea of where to look in the hierarchy.

      With IntelliRush’s new Hierarchical Filtering, this is easy. I tap the Ctrl key…

      IntelliRushCtrlKeyPressed

      On the right I see “Hierarchy”.

      So I press the letter “h” and I see the class hierarchy listed on the right, from MainPage (the type of the “this” reference) up to Object

      IntelliRushHierarchicalMenuUp

      Now, if I know the class I want to see members from, I can simply press the number associated with that class. For example, if I only want to see members from the FrameworkElement class shown in this list, I simply press the number 4 from the hint, and my list of 165 members drops to 34:

      IntelliRushFrameworkElementEntriesOnly

      If I want to slice the class hierarchy to include a range of classes, for example UIElement and up, I can do the following:

      1. Tap Ctrl
      2. Press h

        The Hierarchy hint displays:

        IntelliRushHierarchicalMenu

        UIElement is number 5. So if I want to see members declared in UIElement and all its ancestors, all I need to do is…
      3. Press Shift+5

      And with those three keystrokes IntelliRush shows only the entries declared in UIElement and up:

      IntelliRushShowingObjectToUIElement

      Shift + the class number shows members declared in the specified class and above.
      Ctrl + the class number shows members declared in the specified class and below.

      On most keyboards the Shift key is above the Ctrl key, so you may find their position (Shift above, Ctrl below) helpful in remembering which modifier key to hit.

      The active class is always numbered zero, which allows for some useful shortcuts to keep in mind:

      Member Scope To filter, tap Ctrl, press H, and then:
      Active class only 0
      Parent class only 1
      Active & parent classes only Ctrl+1
      Parent class and above Shift+1
      All classes (resets an active filter) Shift+0

      Combining Filters

      You can combine a hierarchical filter with a member kind filter. Only want to see events declared in the active class or its ancestor? Easy. First, apply a hierarchical filter to isolate members to only the ancestry you’re interested in. Next, apply the member kind filter you want (e.g., tap Ctrl, then press E, to only see events).

      Try it Out

      IntelliRush’s Hierarchical Filtering is available in both CodeRush Classic 15.1 and CodeRush for Roslyn 1.0.

    • CodeRush for Roslyn (preview)

      So the entire team has been working hard on CodeRush for Roslyn. This endeavor is huge: Hundreds, if not thousands of language-based features, replacing our core engine with Roslyn’s core engine, and porting tens of thousands of test cases.

      Based on what we’ve seen so far, the end results, extremely efficient use of memory, even faster performance, and more, appear to justify the effort.

      The Plan

      The DevExpress 15.1 release includes two CodeRush products:

      1. CodeRush Classic 15.1 (previously known as simply CodeRush). This is the same CodeRush we’ve shipped for years. It includes the full feature set, however 15.1 will not include support for C# 6 and VB 14 language features.
      2. CodeRush for Roslyn (CRR) 1.0 preview. CRR will not include the full CodeRush 14.2 feature set (more details below), however it will include full support for C# 6 and VB 14 language features (and beyond).

      The Future of CodeRush Classic

      At some point in the future, when we have ported the entire CodeRush Classic feature set to CRR, we intend to deprecate CodeRush Classic. We will continue to support and fix issues in CodeRush Classic for some time beyond this deprecation point, however CodeRush Classic is unlikely to ever get support for new language features (e.g., C# 6, VB 14, and beyond).

      Which CodeRush Should I Use?

      If you’re working in Visual Studio 2015 with the new language features in C# or VB, you should install CodeRush for Roslyn. If you rely on CodeRush Classic features that haven’t been ported yet, you’ll need CodeRush Classic. If you need both, you can install and use both (more on this in later posts).

      Benefits

      There are three significant benefits you can expect from CodeRush for Roslyn:

      Massive Reduction in Memory Consumption

      Refactoring tools need to understand the code. And to refactor and find references quickly, you need to parse the solution source. And that means memory. The bigger the solution, the more memory you need. In CodeRush Classic and in competing tools which have decided not to support Roslyn, the memory required is essentially doubled as the Visual Studio host is also parsing and storing similar results. Owners of huge solutions were hit hard when using tools like CodeRush Classic. With CodeRush for Roslyn, this doubling-up memory waste is a now thing of the past.

      To see this savings in action, we created two benchmarks using the following hardware and software:

      Machine: Intel® Core™ i7-363QM CPU, 2.40 GHz, 8GB RAM, SSD HD 
      OS: Windows 8.1 Enterprise 64-bit
      Software:

      • Visual Studio v14.0.22823.1 D14REL
      • CodeRush for Roslyn v0.9
      • Competing Product v9.1

      Solutions Tested:

      Benchmarks:

      1. Memory.

        Prep: Open solution. Build. Close all documents. Only Solution Explorer and Properties windows are active. Close solution. Close Visual Studio.

        Memory Test: Start Visual Studio, open solution, wait until devenv.exe process CPU usage falls to 0. Calculate managed memory using VSIX plug-in.

      2. Performance.

        Prep: Open Visual Studio with Start Page opened. Wait until all extensions are successfully loaded.

        Performance Test: Click the solution link the solution in the Recent tab and start the timer. Stop the timer when the solution loading progress bar is complete. For VS and CodeRush the progress bar appears in the Solution Explorer. Competing products may place a progress bar in the lower-left corner of the VS status bar.

      At DevExpress we have a policy of not mentioning competing products on our site, so I can’t reveal the name of the product we compared CodeRush to. However I can tell you the version number of the competing product we tested was 9.1, and I can tell you the competing product is one that has previously announced they would not exploit the Roslyn engine (which means you would expect their memory usage to be noticeably higher than Visual Studio’s).

      Results of the memory tests:

      MemoryUse

      For the small solution, DotNetOpenAuth, CodeRush uses only 6MB.

      For the medium-sized solution, Orchard, CodeRush uses 13MB.

      And for the large solution, opening the source code to Roslyn itself, CodeRush uses 55MB.

      Faster Performance

      Not only was CodeRush Classic storing essentially the same results as Visual Studio was, it was also parsing the same code a second time (just like some competing tools still do). That waste stops with CodeRush for Roslyn. Every feature works noticeably faster and feels snappier, while CRR adds only 0-2 seconds to solution-open times:

       SolutionOpenTimes

      Better Language Support

      Expect CodeRush for Roslyn to immediately understand and support new C# and VB language features as they are released by the Visual Studio team.

      Support for Languages Beyond C# and VB

      CodeRush for Roslyn will include parsers and code generators from the CodeRush Classic engine for any languages that Roslyn doesn’t support yet, including XAML, CSS, HTML, and XML. As Roslyn adds support for these languages, We’ll update CRR accordingly to exploit the new support, which should result in additional memory reduction and faster performance.

      What’s really exciting, is that as the Visual Studio team and third parties move new languages under the Roslyn engine, you can expect CodeRush for Roslyn to understand those as well. There may be some changes required on our side to support the new languages, however the effort is a small fraction of what it was before Roslyn.

      The Preview is Free

      Today we’re releasing an early preview of CodeRush for Roslyn on the Visual Studio Gallery. We intend to release updates every four weeks as we approach the final release. The install is VSIX-based, which means updates are quick and easy and can happen from inside Visual Studio.

      What’s New

      In addition to a port of CodeRush classic features (see below for details), CodeRush for Roslyn also includes two new features.

      IntelliRush Hierarchical Filtering

      In this release IntelliRush gets a great new feature, Hierarchical Filtering. This lets you slice up the Intellisense hierarchy to only see entries from specified classes in the ancestry.

      IntelliRushHierarchicalMenu

       

      Code Coverage

      The Code Coverage window shows which lines of code are covered by test cases and which are not.

       image

      Features Ported from CodeRush Classic

      Features included in the CodeRush for Roslyn (preview):

       image

       image

      We Need Your Feedback

      Let us know what you love, what you’re missing, and what you’d like changed. When CodeRush for Roslyn is published (awaiting final approval from the powers that be), it will be available here.

    • 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

       
    1 2
    3
    4 5 6 7 8 9 10
    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