Mark Miller

March 2011 - Posts

  • 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:

    AddNamespaceReference

    Here’s the link to the feature on the CodeRush community plug-ins site: http://code.google.com/p/dxcorecommunityplugins/wiki/CR_ExtensionMethodsHelper

    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.

  • Creating CodeRush Plug-ins: Actions and Tool Windows

    Today Rory and I presented a webinar called Creating CodeRush Plug-ins: Actions and Tool Windows. In it, we created a tool window that displays all Markers dropped throughout all open files. To see how we built this, watch the webinar here, which should be published in the next 24 hours if it isn’t available already.

    MarkersToolWindowScreenShot

    The source to this plug-in can be found on the CodeRush community plug-in site, located here.

  • High-speed MVC Development in Visual Studio with CodeRush and DevExpress MVC Extensions

    If you saw our Using CodeRush with MVC webinar, Rory and I introduced new templates that make it easy to exploit the MVC Extensions from DevExpress. These templates will likely be integrated into CodeRush 11.1, however you can install and start using them right now (installation instructions appear below).

    Templates

    Controls

    Template        Control                     
    xb Button
    xc Calendar
    xcb ComboBox
    xde DateEdit
    xgv GridView
    xhe HtmlEditor
    xhl HyperLink
    xi Image
    xl Label
    xlb ListBox
    xm Menu
    xmo Memo
    xnb NavBar
    xp PopupControl
    xpg PageControl
    xrb RadioButton
    xrbl RadioButtonList
    xrp RoundPanel
    xs Splitter
    xse SpinEdit
    xtb TextBox
    xte TimeEdit
    xtv TreeView
    xu UploadControl

    Items, Nodes, Groups, Panes, and Tab Pages

    These templates make it easier to create elements inside the MVC controls. Copy the reference that will own these elements (e.g., “settings”, “settings.Properties”,  “firstMenu”,  etc.) to the clipboard before expanding.

    Template    Calls Use Inside              
    ga Groups.Add() NavBar
    ia Items.Add() ComboBox, ListBox, Menu, RadioButtonList
    na Nodes.Add() TreeView
    pa Panes.Add() Splitter
    tpa TabPages.Add()    PageControl

    Other Templates

    Template    Expansion
    xrs RenderScripts
    xrss RenderStyleSheets

    Installation

    To install, follow these steps:

    1. Right-click and save each of the templates below.

    HTML_MVC_DevEx Extensions.xml
    CSharp_ASP.NET_MVC_DevEx Extensions.xml

    IMPORTANT:  For VB developers, we have two sets of templates to choose from.

    2. Start Visual Studio if it’s not running already.

    3. From the DevExpress menu, select Options.

    4. Navigate to the Editor\Templates options page.

    5. IMPORTANT: Change the Language combo box at the bottom of the Options dialog to HTML.

    LanguageHtml

    6. Right-click the template TreeView and choose Import Templates….

    7. Select the HTML_MVC_DevEx Extensions xml file downloaded in step one, and click Open.

    8. If you see a Category Exists warning message, click OK.

    CategoryExists

    Next, we need to install the templates for adding items, groups, nodes, panes, and tab pages. These templates must be imported into the appropriate language group of templates.

     

    If You Work in Visual Basic…

    1. IMPORTANT: Change the Language combo box at the bottom of the Options dialog to Basic.

    LanguageBasic

    2. Right-click the template TreeView and choose Import Templates….

    3. Select the Basic_ASP.NET_MVC_DevEx Extensions xml file downloaded in step one, and click Open.

    4. If you see a Category Exists warning message, click OK.

     

    If You Work in C#…

    1. IMPORTANT: Change the Language combo box at the bottom of the Options dialog to CSharp.

    LanguageCSharp

    2. Right-click the template TreeView and choose Import Templates….

    3. Select the CSharp_ASP.NET_MVC_DevEx Extensions xml file downloaded in step one, and click Open.

    4. If you see a Category Exists warning message, click OK.

     

    Testing

    After importing the MVC Extension templates as shown above, click OK to close the Options dialog. Inside an MVC application, open an aspx file, go to an empty line, and expand one or more of the templates on this page.

    MVC TreeView expansion

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