CodeRush for Roslyn 1.0.11 (preview) is Available

Mark Miller
19 April 2016

As we’re in the final stretch for the first official CodeRush for Roslyn release, today we offer what may be our final pre-release for you to test-drive. Here’s what’s new and improved in this version:

Code Analysis

In this version we introduce code analysis through the Code Issues window, showing potential logic errors and code smells found in the code. Just open your solution, bring up the Code Issues window, and click Refresh to analyze your code.

CodeIssues

Code Style

Code Style gets an update with new options for:

  • Implicit/explicit declaration of local variables
  • Visibility modifiers (always specify or remove if possible)
  • Prefer CLR type name or language-specific keywords (e.g., int, string, bool)
  • Use this/me qualifier for members

Styles are applied automatically when executing refactorings or expanding CodeRush templates. We have also linked the following code cleanup providers to the code style rules:

  • Apply variable declaration style
  • Apply built-in type style
  • Apply ‘this’ qualifier style
  • Apply visibility style

And we’ve added new naming conventions for newly-declared identifiers.

XAML Navigation

Two new XAML navigation providers:

  • Go to Source – Opens the resource dictionary for the active reference when you press F12.
  • Find Usages – Helps you quickly navigate to a particular resource reference.

JumpToXamlReference

JumpToXamlLocations 

Settings Import/Export

In this version you can import/export your CodeRush for Roslyn settings.

Test Sessions

The Test Runner now supports multiple test sessions:

Test Sessions

This is a convenient way to group collections of related tests and run them independently. Just right-click on one of the test or fixture icons in the tree list and choose “Add to session”.

 

Standalone Decompiler

The Decompiler is now its own standalone executable, which means you can use the Decompiler outside of Visual Studio. The executable is located in the "Decompiler" folder inside the CodeRush for Roslyn Extension folder (which typically has a uniquely generated folder name). To find this folder quickly, from Visual Studio use the CodeRush | Support | Extension Folder... menu item.

Decompiler

Navigation

Symbol and File navigation windows are more responsive. When they appear start typing for what you are looking for and they’ll populate with entries matching your filter.

The navigation windows also include a few minor visual tweaks to improve clarity.

CollectingItems

Refactorings and Code Providers

We have added the following refactorings and code providers:

  • Convert to Constant – convers a variable or field into a constant.
  • Create Backing Store – converts an auto-implemented property to a property that encapsulates a private field (the field backing store is created automatically).

Organize Members now allows you to configure the amount of line breaks between groups and between members. In this release it is also possible to configure Organize Members so that it removes existing line breaks.

Debug Visualizer

The Expression Map has been ported from CodeRush Classic:

 ExpressionTree
Also, strings containing long file paths are now trimmed so that the beginning and end of the path are always visible.

IntelliRush

  • Argument insertion can now be disabled for method calls created by IntelliRush.
  • Optional parameters are no longer inserted into method calls.
  • Constructor overloads are now listed in the IntelliRush overloads menu:

ConstructorOverloads

Smart Semi-colon

It’s finally here. The feature that gives C# developers the smallest gain, hundreds of times a day. With this C# feature enabled, CodeRush for Roslyn automatically places a semi-colon at the end of the expression when a semi-colon is manually typed inside an expression.

Other Improvements

  • Code view sections in both the Decompiler and Code Coverage windows include line numbers.
  • Selection Embedding is now available from the “light bulb” menu, which can be invoked using the Ctrl+~ or Ctrl+. hotkeys.
  • The languages supported by Code Templates and Selection Embeddings has been extended. You can now define custom code templates and embeddings for XAML, XML, HTML, JavaScript, CSS and F# languages.
  • The CodeRush menu gains the following items:
    • Support
      • CodeRush Logs (used to quickly open the logs folder in Windows Explorer)
      • Extension Folder (used to quickly open the root extension folder in Windows Explorer)
    • Shortcuts (opens the shortcuts options page)
    • Code Templates (opens the code templates options page)

Give it a Try

Download the latest CodeRush for Roslyn preview from the Visual Studio Gallery. Try it out and let us know what you think.

Neal
Neal

I'm giving this another try now that it's further along.

1) Please consider using supertips or something to explain options such as I have no idea what "Show Color" means in the Quick Setup or in the Painting area.  Show me an example of what is being colored or is this the color picker such as in HTML markup or CSS?

2) In code I don't see any a refactor ellipses when clicking on a method name for example.  I have to press CTRL + ~ to bring up a refactor dialog.  Is there supposed to be some sort of smart tag to show CR/RF available actions?

Still investigating...hard to part with the monster of its predecessor...

19 April, 2016
Neal
Neal

Another question I have even with using CRC was the ability to create auto implemented properties.  In CRC I type ps for property string but I prefer an option that creates:

string Foo { get; set; }

Is there a shortcut to do this?

19 April, 2016
Neal
Neal

I did find if I highlight the complete method signature line the yellow bulb icon appears.  One feedback item is you have the CR icon left of all of the items which is distracting.  Maybe if the icon was less overpowering for example I'm using the dark theme and it would probably look better if it was just a white wireframe icon with the letters CR in the middle vs. a solid icon which is quite frankly hard to decipher in the dark theme as it's white with blue text.

19 April, 2016
Neal
Neal

Still looking for the "b" template: select lines of code, press b and those lines are bracketed with braces.

19 April, 2016
Christian Ista
Christian Ista

Again and again no trace of refactoring. Mark you won't be ready for identical features CRC/CRR by July.

19 April, 2016
Rory Becker (DevExpress)
Rory Becker (DevExpress)

@Neal

>>string Foo { get; set; }

>>Is there a shortcut to do this?

You can use the 'as<space>' template for this. the A stands for auto-property.

this should be the same in CRC and CRR

20 April, 2016
Rory Becker (DevExpress)
Rory Becker (DevExpress)

@Neal

>>Still looking for the "b" template

>>Select lines of code, press b and those lines are bracketed with braces.

Possibly 2 different features.

The first (creating a block in empty space) has had it's template altered to respond to the secondary expansion key (shift-<Space>). This helps prevent confusion for newer users.

The second feature exists but is disabled by default for similar reasons. If you'd like to enabled it visit the options (Ctrl+Shift+Alt+O) IDE\Shortcuts ... Selection\Embedding ... Choose the 'B' entry and tick the enabled checkbox.

I suspect that you'll want to re-enable several more selection embedding keystrokes also found int his folder.

20 April, 2016
Rory Becker (DevExpress)
Rory Becker (DevExpress)

@Christian Ista

>> Again and again no trace of refactoring.

Refactorings have been in for several releases Christian.

You can trigger them via the Ctrl+Period or Ctrl+Comma.

20 April, 2016
Neal
Neal

Discoverability has always been a tough point in Coderush, learning how to really use it.  I think from what I've seen so far in CRR this has kind of taken a step back.  Hopefully improvements can be made on making the Coderush/Refactor helpers more discoverable.  I preferred how/where the helper showed in CRC such as making the smarttag show near the mouse vs. far left where I'm not looking.  Also depending on where I click, i.e. what if I want to reorder params, not sure how to really do that in CRR, but if I clicked on a param in a method signature I should see a smarttag to offer me that option.

21 April, 2016
Mark Miller (DevExpress)
Mark Miller (DevExpress)

Hi Neal,

> I have no idea what "Show Color" means in the

> Quick Setup or in the Painting area.  Show me

> an example of what is being colored or is this

> the color picker such as in HTML markup or CSS?

Totally agreed about the Show Color options page. It should read "Show color swatches for color references appearing in source files (C#, VB, XAML, HTML, CSS, etc.). You can click on the color swatches to change the color."

We'll fix that text before the release.

> 2) In code I don't see any a refactor ellipses

> when clicking on a method name for example.  

> I have to press CTRL + ~ to bring up a refactor

> dialog.  Is there supposed to be some sort of

> smart tag to show CR/RF available actions?

No, we are blending our refactorings and code providers into the Visual Studio smart tag menu, which means we are also using the Visual Studio light bulb in the left column to indicate when a refactoring or code provider is available.

>  the ability to create auto implemented properties....

Use "a?Type?" templates. So for example, use "as", "ai", "ab", etc. to create auto-implemented properties of type string, integer, and boolean, respectively.

> ...you have the CR icon left of all of the items which

> is distracting...

We have redesigned icons for the final release that are not as bright and with less saturation.

> Still looking for the "b" template: select lines of

> code, press b and those lines are bracketed with

> braces.

I think you're looking for the "b" shortcut binding to the Selection Embedding that embeds in braces (FYI, there is also a "b" template that expands on an empty line and adds braces). On the CodeRush options page, go into Shortcuts | Selection | Embedding folder and make sure your "b" shortcut is enabled. In the final release we'll have a setup wizard that makes it easy to enable or disable these.

> Mark you won't be ready for identical features CRC/CRR by July.

Let us know what refactorings you are missing. Reorder Parameters is unlikely to ship with 16.1, but is expected in an update after we ship 16.1.

Thanks Neal for all your other comments. I agree with you about discoverability. We're working on it and it's important to us to improve it.

25 April, 2016
randy haehnel 1
randy haehnel 1

CRC allowed me to pass in parameters to QuickNav(eg "Classes and Interfaces, null, AllVisibilities, CurrentSolution" or ", Methods and Fields, AllVisibilities, CurrentFile") to provide a context aware QN depending on the shortcut pressed.  Will this feature be implemented in CRR?

27 April, 2016
Mark Miller (DevExpress)
Mark Miller (DevExpress)

Hi Randy,

Quick Nav parameters are expected to be in CRR soon after the 16.1 release.

28 April, 2016
Gustavo Marzioni
Gustavo Marzioni

Hi, it is not clear to me, Are plugins supported in CodeRush for Roslyn?

Thanks

10 May, 2016
Mark Miller (DevExpress)
Mark Miller (DevExpress)

Hi Gustavo,

Plugins are possible, but we the architecture has not been finalized, and there are no wizards to get you up to speed. If you are interested in developing a plug-in, you can email me at markm at the devexpress.com domain and I can send you sample files to help you get started.

11 May, 2016
Grant Argy
Grant Argy

Hi Mark

Is the dispose refactor in this release. That is refactor form level disposable variables added to the dispose method

16 June, 2016
Mark Miller (DevExpress)
Mark Miller (DevExpress)

Hi Grant,

Implement IDisposable for IDisposable fields has not been ported to CRR yet. I'll talk to the devs about this today and see if we can squeeze it into the final release.

16 June, 2016
Grant Argy
Grant Argy

That would be great. When I review code I tend to find some devs miss this key area and it makes my life easier.

16 June, 2016
Pavel A (DevExpress)
Pavel A (DevExpress)

Hello Grant,

We have just released Code Rush for Roslyn v16.2.8 where we implemented the Implement IDisposable code provider. You are welcome to try it: marketplace.visualstudio.com/items

28 April, 2017

Please login or register to post comments.