Quantcast
Channel: Developer Express Inc.
Viewing all articles
Browse latest Browse all 2370

CodeRush for Rosyln 16.2.8 is Available

$
0
0

Another sprint, another release of CodeRush for Roslyn. You might have noticed we’ve stepped up our update frequency, with sprint/release cycles occurring in 30 day intervals.

Here’s what’s new in this release:

This release introduces the Declare menu, a quick and easy way to add needed code to your types.

DeclareMenu

These declarations are now available:

  • Automatic Constructor generation (which also automatically initializes selected members).

    Constructor1
    Just select the type’s members that you want to initialize, and press Enter. Some of the Declare providers have additional options, which can be accessed by tapping the Ctrl key. For example, with the Constructor UI, tapping the Ctrl key will offer options for constructor visibility, as well as an option to generate properties.

    Constructor2

    So given this starting point:

    ConstructorCode1

    The generated code for this provider might look something like this:

    ConstructorCode2

  • Delegate Members is useful when you want to surface a field’s or property’s members up to the active type. This provider creates members that wrap around the contained field’s or property’s members. For example, if your type contains a generic List of strings (as a field or property), like this:

    NewListStr

    Delegate Members can wrap that List’s Count property in its own property, as well as its indexing methods in delegating methods, surfacing these members in your class, like this:

    DelegateMembers

    Which would generate code looking something like this:

    DelegateMembersCode2

    Delegate Members makes object composition easy.
  • IDisposable Implementation generates the Dispose pattern, disposing the specified fields and properties. For example, given this starting point:

    IDisposable1

    And these options:

    iDisposableUI

    The generated code would look something like this:

    IDisposable2
  • Equality Members generates two Equals methods and a GetHashCode override, and can optionally generate equality/inequality operator overloads.

    EqualityMembers
  • Override Members overrides virtual and abstract methods. For example, given the following code:

    OverrideCode1

    And with the caret inside the CellPos3D class, pressing Alt+Insert to bring up the Declare window, and then setting these options:

    OverrideMembers

    The following code is generated:

    Override2
  • Properties and Read-only Properties generate properties for the selected fields. For example, given the following code:

    ReadOnlyPropertiesCode1

    And these options:

    PropertiesUI

    The following code is generated:

    ReadOnlyPropertiesCode2
  • Comparison Members generates a CompareTo implementation, individually comparing the specified fields, and optionally implements the IComparable<T> and IComparable interfaces. For example, given this starting code:

    ReadOnlyPropertiesCode1

    And these options:

    ComparisonMembers

    The following code is generated:

    ComparisonMembersCode2
  • Missing Members implements any interface members missing from the active class. For example, given the following starting code:

    MissingMembersCode1

    And with the caret inside CellPos3D, applying the Missing Members provider with these options:

    MissingMembersUI

    will generate the following code:

    MissingMembersCode2

You get the idea. To try out the new Declare features, just position the caret inside the class you want to modify and press Alt+Insert.

Clipboard History

Version 16.2.8 introduces the Clipboard History list, providing complete visual access to your ten most-recent clipboard operations. Instantly paste with the Ctrl+number shortcut. Filter through the list just by entering the text you’re looking for. Ctrl+Shift+V brings up the Clipboard History list.

ClipboardHistory

Jasmine Test Runner (beta)

In this release, we’re introducing the beta version of the Jasmine Test Runner for JavaScript and TypeScript. This feature, in its current state, should be considered a technical preview, but you can already run Jasmine tests with it using the CodeRush Test Runner window. This beta works with the following restrictions:

  • Test discovery is not implemented yet. Every file with unit tests should reference the Jasmine framework (e.g., contain the following string at the beginning: “/// <reference path=‘path/to/jasmine.js’ />”).
  • Currently all of the project’s JS files will appear in the Test Runner. You can Ctrl+click to multi-select the test files you want to run, or you can right-click a file and add it to a new or existing Test Runner session, allowing you to easily run all tests in all files held by that session at once.
  • Test Debugging and Code Coverage are not yet implemented.

JasmineTestRunner

More C# 7 and VB 15 Syntax Support

The following features have gained new capabilities to more deeply support the latest language features, including:

  • Debug Visualizer now supports for the new switch language features.

    DebugVisualizerSwitch
  • Smart Duplicate Line now supports binary literals and digit separators.

    SDL_VB15
  • Expand Method, Expand Property, Expand Getter and Expand Setter refactorings all now support the new language features.

Other Improvements

  • Asynchronous extension loading, so CodeRush for Roslyn loads even faster.
  • Paste Replace Word (default shortcut is Ctrl+B) is now available in XAML markup.
  • Added support for directories and projects in the Jump To File window.
  • Implement IDisposable code provider implements the dispose pattern in your types.
  • Encapsulate Property wraps a field’s properties (declared by the field’s type) in new properties declared in the active class/struct.

You can get the latest what’s new list and a list of corrected issues here.

Give it a Try!

We encourage you to download CodeRush for Roslyn and give it a try.

As always, we thank you for your continued support and feedback. Let us know what we can do to make your coding experience even better.


Viewing all articles
Browse latest Browse all 2370

Trending Articles