Importing Namespace References for Extension Methods in CodeRush for Visual Studio

From feature request to binary delivery in less than four hours. Here’s the timeline:

At 10:06 this morning, Apeoholic tweets the following question:

Is there a way to get #CodeRush to suggest namespace usages for extension methods?

Which led to the following discussion with one of our CodeRush devs on IM:

[10:08] Mark: Hey Alex, I have this question in a tweet -- "Is there a way to get #CodeRush to suggest namespace usages for extension methods?"
[10:09] Alex: Hi Mark, I'm not sure what he means…
[10:10] Mark: I think he's talking about adding namespace imports when an extension method is at the caret.
[10:10] Mark: I'm wondering if VS fails to do this.
[10:10] Alex: I suppose VS does it, doesn’t it?
[10:10] Mark: Check it for me.
[10:12] Alex: OK, VS fails to do this.
[10:13] Alex: And we don't have such feature
[10:13] Mark: Can we write this as a plug-in?
[10:13] Alex: Of course, but this will take time.
[10:14] Mark: What's the challenging part of this?
[10:14] Alex: Find and resolve all the extension methods
[10:15] Mark: Create a spike -- work on this for an hour and see what you get.
[10:15] Mark: Then send me that source and I can finish it up
[10:15] Alex: ok
[10:15] Mark: Then I'll have Rory put it on the community site.
[10:15] Alex: k

Which led to the development of the feature, testing, a few changes, and then this IM with Rory Becker:

[13:06] Mark: I had Alex create a plug-in spike for a feature request to add missing namespace references for extension methods (something VS does not do)
[13:06] Rory: cool
[13:06] Mark: I'm going to send this to you. Can you get this on the community plug-in site today?
[13:06] Rory: yeah sure, no problem

At 14:05, we published the feature on the community site.

Here’s the feature in action:


Here’s the link to the feature on the CodeRush community plug-ins site:

We are likely to roll this functionality into a future version of CodeRush. If you have a CodeRush question or feature request, we want to hear from you. Post a comment below or include “#CodeRush” in your tweets and we’ll respond in a timely manner.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.