Rory Becker - DevExpress CodeRush Blog
  • CodeRush: ‘Friction Free’ mode and Setting Schemes

    So in 12.1 we shipped a new feature. Well we shipped quite a few really, but I want to talk to you about one of the more subtle features, which might well change the way you use CodeRush.

    Setting schemes are conceptually quite simple, but have far reaching implications.


    Everyone has their own opinion on how any given feature should work. It can be very hard, some would say impossible, to keep everyone happy. So we try to make our product as configurable as possible. The idea being, that if our default configuration isn’t quite to your liking, you should be able to tweak it so that it is.

    The up side of this, is that there are lots of options you can tweak to make sure our product works exactly how you want it to. Of course the down side of this, is that there are lots of options you might have to tweak to get our product working just the way you want it to.

    Obviously we try to come up with sensible defaults so that as few people as possible will need to tweak the settings, and can use the product straight ‘out of the box’ so to speak :)

    However one man’s default can be another man’s disaster.

    Enter Setting Schemes

    A setting scheme is a named set of settings which has been customized for a specific purpose.

    CodeRush ships with 2 such schemes which you may switch between using the new drop down on the DXCore Visualize toolbar:

    The ‘Default’ scheme


    The first scheme (‘Default’) is derived from the classic CodeRush settings as they have been up until 12.1. This set will also include any customizations you have made using previous versions of CodeRush. If such settings exist when CodeRush 12.1 installs, then it is these which will be selected by default.

    The ‘Friction Free’ scheme


    The second scheme (‘Friction Free’) is a new set which is designed to remove as much friction as possible for a New User of CodeRush as they seek to go about their daily tasks. It does this by disabling or altering any CodeRush features which might otherwise clash with base Visual studio functionality.

    Alterations include:

  • Auto Complete for Brackets and Parenthesis is disabled.
  • Smart Enter is disabled.
  • Intelli Assist is disabled.
  • The Default Template Expansion shortcut is changed from Space to Tab.
  • Several Code Issues are disabled.
  • Most visual glyphs are turned off (Including SpellcheckMember IconsFlow break indicators and the Metrics icon)
  • Structural Highlighting, Region Painting and Current Line Highlighting are also disabled.

    If the CodeRush installer detects no previous settings, then it is this scheme which will be selected by default.

    Create your own schemes

    In addition to the inclusion of the ‘Default’ and new ‘Friction Free’ schemes, you are also able to create new schemes of your own. These schemes will be stored in parallel with the 2 that ship ‘out of the box’ and can be switched between at any time.

    To create or alter the high level components of a scheme, open the options screen and locate the ‘Settings schemes’ page: 


    Once on this page you may create a new scheme, by copying it from an existing scheme.


    Select the preferred source scheme from the drop down, and then click ‘Add New Scheme’. 


    Choose a suitable name for your proposed scheme and click ok.

    Your scheme is created and added to the dropdown list. You can switch to it and immediately start customizing it to your liking.


    You can also perform high level customization of your scheme from this page. Simply check or uncheck features as you see fit and save then with the Ok \ Apply buttons as usual.

    If you need to tweak the detail of a section, you can click it’s ellipsis button and you will be taken to an appropriate options page.


    Your newly created scheme will exist as an alternate named set, alongside the ‘Default’ and ‘Friction Free’ schemes. Customize this scheme as you see fit and then switch between any of them at will.

    Other Potential Schemes

    Schemes are a powerful feature which you might choose.

    You might create schemes for different purposes, moods or even people. :)

    So what other schemes could you create? Here are some ideas.

  • ‘Teach me’  - I need every prompt I can get. I’m a beginner and I’m happy to admit it.
  • ’Refactor Pro’ – Hide all but the refactoring functionality.
  • ‘The Generator’ - Templates and Code Gen Refactorings only please.
  • ‘The Minimalist’ - Hide all shortcut prompts and graphics. I know exactly what I’m doing already
  • ‘Clean Up Duty’ - Full on CodeIssues and Refactorings, but nothing else.
  • ‘Compiler Plus’ – Hide CodeIssues which pertain to style or readability and just show me things about my code which might be broken.
  • ‘Style Ninja’ – Inverse of ‘Compiler Plus’. Show me only style or readability Code Issues. I’ll fix stuff later.

    ProTip: Name one or more setting schemes after yourself, and copy them to your co-worker’s machines for when you have to pair with them.

    Feel free to suggest more. Tell us how you think this feature should evolve?

    The Future

    So what would you like to see us do in this space for the future?

    • Should we add some more schemes out of the box? Which ones?
    • Should we alter the ‘Friction Free’ scheme further?
    • Should we prevent any alteration of our ‘out of the box’ schemes and force you to copy them first. This would allow you a really quick method of restoring to any of our defaults.
    • Should we provide a “Copy page from Scheme…” button for slicing and dicing schemes?

    So take ‘Setting Schemes’ (including ‘Friction Free’) for a spin, tell us what you think and then let’s see what develops.

  • TO UPPER CASE or not to upper case.

    One of the more controversial points of VS2012 has been its UI.

    Originally put out without any colour and with ALL CAPS on every tool window, it caused a backlash of comments pleading for these decisions to be reversed. Microsoft listened and indeed removed the tool window ALL CAPS and returned some colour to the IDE. I’ve heard it suggested by some that there may even be more colour in the final release.

    However when the RC came out it became apparent that while one set of ALL CAPS had been removed, another seemed set to take its place. As those of us with the RC installed are very much aware, the main menu of VS2012 is currently ALL CAPS across the board.


    There has been some wailing and gnashing of teeth over this and, as before, there have been parties on both sides of this argument.

    Enter DevExpress with a CodeRush plugin to help return the choice. *Insert gratuitous fanfare here*

    CR_UpperCaseMenuControl provides an additional options page which allows you to return your VS2012 RC menus to their former Mixed Case style (below)


    For full details on the download, installation and configuration of this plugin please see its community plugin page

    Here’s a sneak peak at the plugin’s options page. As you can tell, it’s a really complex and involved bit of UI.


    Once again, this plugin can be downloaded from this page

    So let’s calm down our IDE of choice, and see what develops.

  • TDD with CodeRush


    TDD stands for Test Driven Development. For the purposes of this post, it refers to the practice of first writing a Test, and then finding the simplest way to make it pass. Typically this involves writing some code.

    To demonstrate the use of TDD with CodeRush, we’ll have to do some TDD. In this case I’ll lead you through the start of a code kata.

    “A code kata is an exercise in programming which helps a
    programmer hone their skills through practice and repetition” – Wikipedia

    The particular kata we’re going to use is the Calculator Kata detailed by Roy Osherove. This Kata is a little involved for the purposes of a single blog post so we’ll concentrate on just the first part of it:

    • Create a simple String calculator with a method int Add(string numbers)
    • Start with the simplest test case of an empty string which should return 0.

    So how do we go from “File | New” to “Test Passes” using CodeRush and TDD?

    First Steps:

    • File | New | (C#|VB) \ Class Library
    • Add reference to your Testing framework of choice.
      • I’m going to use NUnit and therefore have added a reference to NUnit.Framework.dll

    Once your project references a supported testing framework, CodeRush will see this connection and adjust its help to suit. This means you can use the same techniques shown here, whether you’re using XUnit, MbUnit, NUnit or any other supported framework.

    Let’s write a test

    The full text of a basic NUnit test is:
    public class Tests
        public void Test()
    There are 73 characters in that text including spaces, tabs and newlines. If you add the shift keys necessary to create those parentheses, square brackets, curly brackets and capital letters, then that’s another 14 characters. A total of 87 characters to write some stub code which, names aside, will never really change.

    That seems like a lot of typing. I’m sure we can do better than that...

    How about t<space>?



    87 keys vs. 2. That’s a 97.7% saving, which is a bargain in anyone’s book.

    See how CodeRush provides augmented output from its template. The important parts, the ones you’ll want to adjust, are highlighted. The first of these is also selected, so that you can immediately begin adding the final touches without having to navigate anywhere.

    • Enter a name for your Test Class. I’m going with the simple but elegant ‘Calculator_Tests’

    Next name the test itself. Use something simple and to the point.

    Note: The naming scheme for tests is sometimes quite hotly debated. You should discuss this with your team and arrive at a scheme that suits as many as possible. The one thing everyone seems to agree on, is that the name of your test should reflect its purpose (as with any other method). It should help someone who has seen the test fail, to understand what exactly has failed.

    Note: At this point I haven’t even got a Calculator class

    According to the spec, the Calculator class has an Add function whose purpose is to parse a list of numbers and return the sum of their values.

    According to our spec, the simplest possible case is where the string to be parsed is an empty string. In this case the function is to return a zero (0).

    Therefore I will name my test Add_EmptyString_ReturnsZero(). Many will argue that there are better names out there, but IMHO this specifies exactly what our expectations are of this test.


    Now let's write the body of the test.

    We want to assert that passing String.Empty to our calculator will cause it to return zero.

    The NUnit way of expressing this is by calling Assert.Equals, passing in your expectation and result:

    Assert.Equals(0, Calculator.Add(""));

    In CodeRush the ae<space> template with create the majority of this leaving you to fill out the expectation and actual parameters.

    If, as in this case, you know the expectation is going to be zero, you can reduce the effort a little more through the use of the ae0<space> template.

    (Excellent, that’s another 16 characters saved.)

    The second parameter of this method call is the value we are testing. In this case it’s a call to the Add method described in the spec.

    Once we’ve added this we should have:


    This is all very well, but we don't yet have an 'Add' method. Come to think of it, we still don't have a Calculator class.

    Ok let's fix that.

    • Place your caret on the reference to Calculator.
    • Hit the CodeRush Refactor key (defaults to Ctrl+`) or use the SmartTag.
    • Choose 'Declare Class' from the list of possible options.


    CodeRush builds you a new Calculator class complete with Add Method which takes a String and returns a decimal.


    Awesome that's 133 characters created with just a couple of clicks.

    Note: If you don't want a default constructor, you can remove it very quickly by placing your caret within it, and choosing the 'Remove Redundant Constructor' from the 'Refactor' SmartTag menu

    We can quickly fix up our parameter name and then we can run our test.

    Test Runner Shortcuts

    Some CodeRush Test Runner Shortcuts (defaults):

    Ctrl+T, S (Run tests in the current Solution.) Ctrl+T, P (Run tests in the current Project.) Ctrl+T, C (Run tests in the current Class.) Ctrl+T, F (Run tests in the current File.) Ctrl+T, T (Show the Test Runner Tool Window)

    Since for the moment our tests and class are in the same file, Ctrl+T, F will suit us because we will be able to run the tests from anywhere in the file.

    So let's run our test and see what happens.

    Ctrl+T, F

    Well the first thing to note is that our test failed.

    This is a good thing. No really, it is. If your test doesn’t fail at first, then either your test is bad, or your code already works for the given scenario. In either case you should not mess with your class under test, until you have a better understanding of the situation.

    In should be noted that CodeRush has several ways of telling us that our test failed:

    • Inline: We have a red cross to show exactly which test failed and we highlight the failing assertion with a red bar.


    Note: By hovering your mouse over the red cross, you can see a popup which containing details of the failure.


    • Our output window shows the results of the test run, the reason for the test failing and a call stack of the run itself.


    • Finally we can bring up the CodeRush Test Runner Tool Window (Ctrl+T, T) to show us the complete list of Tests and their current results.


    Obviously this view is a little sparse at the moment, because we only have 1 test, but you can see how this would be useful for viewing the state of all of your tests at a glance.

    Let's fix our calculator so that the test passes.

    Place your caret on the call to Calculator.Add and press F12. CodeRush drops a marker in your current location and moves your caret to the declaration of the Add method.

    Have the method return 0; and then hit Esc to return to the calling test.

    CalculatorFixed run our test again. (Ctrl+T, F)



    … and we have a Passing Test! Wonderful!

    Note that we have done the bare minimum to get the test to pass. The idea here is to use tests to drive out new functionality. So although this implementation is ultimately flawed, it serves the purpose of the existing test.

    Naturally we want to improve this implementation, but before we do this TDD dictates that we should construct an additional test which will specify the behaviour we are after. This test should also be implemented in the simplest way possible.

    Through repetition of this procedure, we will drive out a new set of requirements and tests to cover those cases and develop a comprehensive and robust test suite which will give us a great deal of confidence in our code.

    Well I think that about wraps it up for an initial view of TDD with CodeRush.

    I think you'll agree that we have help in spades during the creation of the tests, the creation of the class under test (and its methods) and of course the running of tests.

    This has been a very quick tour from “File | New” to “Test Passes”.

    In the future I'll give a more in-depth tour of the Unit testing facilities of CodeRush and perhaps we'll even run through a complete Kata from start to finish. :)

    So go forth and Test using CodeRush and let’s see what develops.

  • New CodeRush Plugin – CR_ImportNamespace

    Problem 1: Have you ever started writing code, and then realised you were using a Type directly, without importing it’s namespace?

    You could fix this by either fully qualifying the Type in place, or moving to the top of the file, adding an imports or using statement (referencing the appropriate namespace) and then finally working out where you were before you moved, and returning there.

    This takes you away from your code, and context switches you away from the problem you were trying to solve. This costs you time and therefore money (and often sanity)

    Note: With CodeRush, dropping a Marker [Alt+Home] before you move to the top of the file, will greatly ease the return journey [Esc].

    Problem 2: Have you ever gone a stage further, and used a Type without even referencing it’s assembly?

    This time it’s even worse… You have to switch your focus out of the editor entirely, and use … *gulp* … the “Add Reference” dialog.


    The Add Reference dialog

    I don’t know anyone who likes to use the ‘Add Reference’ dialog. I’ve heard it referred to as perhaps the most annoying part of visual studio. Others claim it’s the 2nd most annoying. beaten in this case to the top position, by “Accidentally hitting F1. both of these are seen in this light, because of the ridiculous amount of time that they can eat up.

    The Add Reference dialog is slow and awkward and it takes you away from your code. It has several tabs that might help you in various situations, but 99% of the time these tabs are just not useful to me.

    The Project Tab: Is very quick to load but is limited to the projects in your solution. This can be handy, but most of the time the references I need are not a part of my solution.

    The Browse Tab: Works well also, but really it’s something of a last resort. Navigating directory structures looking for the assembly you want can be long and drawn out, and the fact that often you are returning to the same 2-3 locations makes it feel very repetitive.

    The Recent Tab: Is comparable to the Projects tab. It is quick to load, but does not appear to list enough assemblies to be particularly useful. I work with a fair breadth of assemblies, which means that they cycle through the Recent Tab quite fast. I can’t honestly say that I visit the recent Tab with any real hope of finding the assembly I need.

    The .Net Tab: Is the tab I find myself using more than every other, and it’s what makes me dread this dialog. The first time I choose to pick a reference from this tab in any given session, it takes around 30 seconds to fill and become responsive again. 30 seconds? Are you kidding me? Seriously?

    Hmmmm … if only there was a way to avoid the Add Reference dialog……

    Oh Wait..

    Introducing CR_ImportNamespace

    CR_ImportNamespace is designed to allow you to add namespace and assembly references without ever leaving the editor. It functions as a CodeProvider. Which is to say that the functionality is accessed through the Code menu on the CodeRush smart Tag.


    The “Import Namespace…” code provider is made available when your caret is on an undeclared type.

    For example:


    The first time you trigger the “Import Namespace…” CodeProvider, the plugin will create a cache of all the types in the version of the .Net framework, which your current project targets. This cache will be referred to during subsequent invocations.


    Once this cache is built, you will be presented with a list of namespaces which contain a matching type:


    If only one namespace contains such a type, then this namespace will be automatically chosen after the cache is completed.

    On subsequent invocations, if only a single namespace is applicable, then it will be offered as a top level menu item:


    If more than one namespace is suited to the task, then each of these will be presented as a submenu:


    However no matter how the namespaces are presented to you, the selection of one will produce the same effect.

    • - The namespace is imported.
    • - Any required Assembly is referenced.
    • … and you never move away from your existing code.
    • Finally unlike other implementations, CR_ImportNamespace is not limited to finding and referencing projects within your solution, or even to assemblies referenced by them. It covers the entire framework versions 2.0, 3.0, 3.5 and 4.0 . It understands different framework profiles (client and full) and will only offer up namespaces suited to your current project.

    So where can you get this glorious new plugin? Do you have to wait for the next release of CodeRush? Do you have to wait for 2012? No, as ever, we’re committed to accelerating your productivity whenever we can. In this case… Now

    Yes that’s right no. This plugin and it’s accompanying source has been generously donated to our favourite community project. You can find the relevant links and details here

    • So let’s stop messing around, manually adding namespace and assembly references. Let’s get on with the business of writing code to solve business problems, and see what develops.
  • New Plugin: CR_MultiSelect

    We’re all familiar with how text selection works in windows.

    You click and drag, from one end of some Text, to the other. Typically this text is highlighted by inverting the foreground and background colours to give you an easy way to see what is ‘selected’. Alternatively you may use the shift key in conjunction with one or more of several navigation keys (left, right, up, down etc)

    Of course using CodeRush you have even more options for defining your selection.

    Once text is selected, you choose what you’d like to do with that text:

    • You can click elsewhere to cancel the selection.
    • You can select some alternate text.
    • You can use the selection as a part of some operation.
    • Replace the selected text by simply typing over it.
    • Cut or Copy the selection to the clipboard

    CodeRush Post-Selection Operations

    CodeRush naturally gives you more options for using any text you may have on the clipboard.

    And many others.

    SideNote: A little known CodeRush clipboard feature, is the use of the \ character when a CodeRush template requires a type mnemonic. This will check the clipboard for a type and use that in lieu of a more explicitly specified type mnemonic. For example ps<space> yields a property of type string. However p\<space> yields a property who’s type is the same as that held on the clipboard.

    So now let’s consider what life might be like if we could have “multiple” concurrent selections.

    Let that sink in for a minute.

    Multiple. Concurrent. Selections

    So what would that be like? Well you could select some text, and then select some other text elsewhere without loosing the first selection. This process could continue indefinitely adding as many selections to the list as we like. If many selections are to be involved, it would probably be prudent to have a function to remove the most recent selection (an MultiSelectUndo of sorts). This would allow you to correct a poorly added selection in case a mistake was made, allowing you to add a different selection. A corresponding MultiSelectRedo would not seem unreasonable. Once a multiselection was established, the clipboard operations could be used to cut, copy and paste this text like any other text.

    How might you use such a feature?

    Imagine that you have a class (OldCalculator) that you’re not very happy with. You’re pretty sure you can do better. You think it’d be a good idea to start from scratch. Perhaps you’re going to channel Mark Miller and create UltraMegaAwesomeCalculator Winking smile

    You create a new class (c<space> and type your new classname).

    Your next thought might be, that while some of the old code was appalling, there were parts of it that weren’t so bad. Given a simple way to do so, you’d love to grab a copy of the right pieces and deposit them into UltraMegaAwesomeCalculator. However the good parts are spread about in different parts of OldCalculator.

    If you’re going to go and get them and copy them into this class, it’s going to take a lot of context switching and a lot of keystrokes to get the job done.

    With multiple selection, you could select a couple of private members, a method or 2 and a subclass which you found to be of good quality. You could then copy those with a single keystroke and paste them into your new class.

    Well that’s exactly what CR_MultiSelect does.

    …and that’s just the tip of the proverbial iceberg.

    The basic version of CR_MultiSelect includes functions for MultiSelectAdd and MultiSelectClear as well as overridden versions of Cut, Copy and Paste and the suggested MultiSelectUndo and MultiSelectRedo

    If you have a full keyboard I suggest using Ctrl+NumEnter and Ctrl+NumDel on your numeric keypad. Likewise if you’d like to use either MultiSelectUndo or MultiSelectRedo, I suggest assigning these to Ctrl+NumMinus and Ctrl+NumPlus

    Details on assigning shortcuts may be found here


    Imagine the simple scenario of copying 2 fields and a method from Class1 to Class2, let’s compare workflows:

    Single Selection

    Multi Selection

    • Move to Class1
    • Click start of Field1
    • Drag to end of Field1
    • Copy
    • Move to Class2
    • Paste
    • Move to Class1
    • Click start of Field2
    • Drag to end of Field2
    • Copy
    • Move To Class2
    • Paste
    • Move to Class1
    • Click start of Method1
    • Drag to end of Method1
    • Copy
    • Move to Class2
    • Paste


    • Move to Class1
    • Click start of Field1
    • Add Selection (Autoexpands selection to Field1)
    • Click start of Field2
    • Add Selection  (Autoexpands selection to Field2)
    • Click start of Method1
    • Add Selection (Autoexpands selection to Method1)
    • Move to Class2
    • Paste (All items pasted at once)

    18 operations

    9 operations

    That’s 50% less operations and a whole lot less context switching and visual disorientation.


    Here is a simpler and more visual version of the same:

    Note: I recorded this demo on laptop without a Numeric keypad, so I bound MultiSelectAdd to Alt+A (I did not need the Data Keyboard) and MultiSelectClear to Alt+C


    Note: In the above demo, there wasn’t even a need for me to drag and select the fields. CodeRush automatically expanded the selection around the logical member (Using Selection Increase and Decrease in a similar way to SmartCut and SmartCopy) as a part of the MultiSelectAdd operation.

    Integrated Paste

    Just to ice the cake, and also give an idea of where we can take this sort of feature in the future, we decided to implement MultiSelectIntegratedPaste.

    Since we are the ones placing information on the clipboard, we can also store some of the DXCore metadata with it, and then make use of that information later. So when you use MultiSelectIntegratedPaste instead of normal paste, and assuming that you’re pasting class members  into a class, we’ll sort those members by type and emit them in that order instead (Method, Property, Event, Variable, Other)

    The Future…

    We think that this functionality is so useful, that we’re going to push Multi Selection down into the DXCore. Once this is done, the MultiSelect service will be available to any plugin that sits on the DXCore, allowing anyone writing plugins to use this functionality. We can begin building on it in the main CodeRush feature set, and so can you.

    In the mean time, feel free to download this plugin and have a play.

    Note: The plugin mentioned in this post was created during a CodeRush Feature Workshop (Part1, Part2).

  • Community Callout: CodePlugIn_INotifyPropertyChanged

    Yes, that ‘s right we’ve got another community plugin to shine a light on.

    Brian Noyes has created CodePlugIn_INotifyPropertyChanged

    The idea is to take a plain ordinary property, and augment it with additional code to support the INotifyPropertyChanged interface.

    This is done by providing 2 additional CodeProviders (Convert to INPC Property and Convert to INPC Property Base Class Call) which are available from the Code menu when your caret is on a property.

    Convert to INPC Property will happily change this…


    …into this…


    If your class already inherits from NotificationObject then you’ll be able to use Convert to INPC Property Base Class Call to upgrade it from this…


    …into this…


    For full details see The Wiki Page.

  • New Plugin: CR_ProjectReferenceDefaults

    This week’s CodeRush Feature Workshop saw the creation of a plugin to manage the values given to properties of a reference, when it is first added to your project.


    When you add a new reference to a project…

    For Non GAC assemblies, Copy Local typically defaults to true with Specific Version defaulting to false.
    For GAC Assemblies, Copy Local typically defaults to false with Specific Version defaulting to true.

    However this is not always the effect you’re looking for.
    For example. I mostly code plugins on my Laptop and would prefer…

    For Non GAC assemblies, Copy Local should default to true with Specific Version defaulting to true.
    For GAC Assemblies, Copy Local should default to false with Specific Version defaulting to false.

    These are clearly personal preferences and everyone will have their opinions.

    CR_ProjectReferenceDefaults allows you to change the default values of these properties, so that all new references take on the values you decide.


    Note: This version does not provide for differences between GAC and NonGAC assemblies and chooses to treat them the same way. However the code is relatively simply and should be very easy to extend.


    Configuration is simple.

    • Visit the Options Screen (DevExpress\Options or Ctrl+Shift+Alt+O)
    • Locate the Project\Default Reference Properties page.
    • Adjust options to suit and click Ok.

    Note that each of the 2 options, can be set to any of 3 values. The default value of these is indeterminate, which means that no action will be taken for this property when the reference is added. The other values (checked and cleared) represent the true and false states that will otherwise be assigned to the property in question.



    Usage is automatic. Once the plugin is installed and configured, adding a reference will trigger a post add operation, which will alter the properties as configured.

    So what are you waiting for? Go download CR_ProjectReferenceDefaults now.

  • Super Sibling Nav for CodeRush

    Another CodeRush Feature Workshop means another feature.

    CR_SuperSiblingNav provides 2 additional NavigationProviders for navigating between sibling Methods and Properties.

    Ok so what’s so special about that then? Can’t we just locate the sibling’s next (or previous) sibling and move the caret to the first character of that?

    Well yes … we could … but this isn’t SiblingNav, this is SuperSiblingNav (Note: We had to talk Mark down from SuperMegaAwesomeWonderSiblingNav)

    SuperSiblingNav doesn’t just move the focus to the next (or previous) member. It also refocuses the caret at the same relative location on that sibling.

    Download this plugin and I’ll show you what I mean after some brief setup information.


    Having installed the plugin correctly, you’ll need to bind some keys to the Navigate(Member Next) and Navigate(Member Previous) commands with an appropriate context.


    We suggest Ctrl+Alt+PgDn and Ctrl+Alt+PgUp. In each case you should bind the shortcut to the Editor\Code\InMethod and Editor\Code\InProperty contexts.


    So once you’re setup, usage is pretty simple. Just position your caret within a method or property and invoke one of the navigation commands.

    Name Tracking

    If the name of your starting member is selected, the name of your destination member will be is selected after navigation.


    Parameter Tracking

    If a parameter was selected before navigation, then a similar parameter will be selected in the destination member upon completion of the navigation.

    This works intelligently, which means that if you move from the 3rd parameter of Method1 (and method2 only has 2 parameters), we will select the second parameter of method2. If you further move on from there to method3 (which does have 3 methods) then we will again select the 3rd parameter for you.


    Almost any other tracking

    In truth, Super Sibling Nav will track just about any sibling relationship.

    In this last example, you can see it tracking the selection as you move through several variable initializations. It will track the variable name, and can even track the assigned value.


    So CR_SuperSiblingNav can help you navigate amongst sibling items, whilst maintaining the relative selection of text or positioning of the caret.

  • New Plugin: CR_StringFormatter

    Another CodeRush Feature Workshop (Part 1 and Part 2) has yielded a plugin, and this one is truly awesome.

    String Formatter works in 3 separate ways to increase your productivity:

    Tab to Next Reference Extension

    Tab among references to a string token and variable/expression whose value will replace it at runtime.

    Simply place the caret on a String.Format token (ie {0}) and then press the Tab key.

    The Tab to Next Reference engine is engaged, and the user may now tab between references to the token, and the argument which will be used to fill it at run-time.

    Note: For now, this new Tab To Next Reference functionality will require the presence of our previous CR_PrimitiveTab plugin and it’s required configuration. We hope to address this in a future version of CodeRush.

    CodeIssue - Format Item Index Too Large

    Wouldn’t it be useful, if studio could let you know when you reference a token inside a String.Format, but then fail to supply a corresponding argument to fill it. The ���Format Item Index Too Large” CodeIssue, highlights when the index of a token in a String.Format string references an argument which is not present.

    In this example, note how the string contains references to 3 distinct tokens, {0}, {1} and {2}. However there are only 2 further arguments.


    This will crash at runtime and Studio does nothing to warn you of this. CR_StringFormatter to the rescue…

    See below, how CR_StringFormatter’s CodeIssue highlights the offending token as an error, and provides a message to help you understand what is wrong..


    The ‘Format String’ Builder

    Do you have all the FormatString notations memorized? You do ? … Really? … Wow.. Well good for you.

    I don’t… Sad smile 

    …but then l I don’t need to. I have CR_StringFormatter Open-mouthed smile

    [Are you ready? This is even more awesome than the first 2 bits.]

    The 3rd piece of awesome productivity that CR_StringFormatter provides you with, is a Format String Builder. This is a context sensitive FormatString Builder dialog.

    It’s like our Color swatch dialog, only for format strings and is is available when the your caret is within a String.Format token. (ie {0})

    Simply choose "Format Item..." from the Code SmartTagMenu. 



    When “Format Item…” is chosen, the user is presented with a dialog designed to aid them in the building of a Format String suitable for their needs.

    This dialog works with String, Ints, Real (floating point) numbers , Dates and Times. Depending on the type of data being dealt with, you can expect to be given help with alignment, leading or trailing zeros, decimal places, currency, hex conversion and more.

    Go on, drink it in…


    Upon acceptance, this carefully crafted string will replace the original token in the string from which the dialog was requested.

    Isn’t that awesome. Yet more information that you don’t have to remember (or go look up) every time you need it.

    Now download from the community site, and be sure to keep an eye out for more CodeRush Feature Workshops

  • Tab through Primitives for CodeRush

    Introducing CR_PrimitiveTab. The result of another CodeRush Feature Workshop

    This plugin extends Tab to Next Reference, allow you to navigate among references to primitives, of the same value, in the same file.

    For example: If you place your caret on the number 10 within a code file, and then hit the Tab key, you will immediately begin tabbing through all the other instances of the number 10 within that file.


    The same will also works for strings, dates, floats and other primitive values.

    This is a great way to get a feel for how many instances of a given literal are referenced, and under what circumstances. It’s a useful scouting tool. Useful just prior to the introduction of a constant or just as a way to navigate to something similar in the same file.

    A Small Reconfiguration
    Due to the way the current version of Tab to Next Reference works internally, it will be necessary to perform some small reconfiguration of the settings, in order for this plugin to work.
    You will need to add the Editor\Code\InPrimitive context to the Shift+Tab, Tab, and Shift+Alt+U. These bindings can be found in the Navigation\References\Nav Fields folder of the Shortcuts Options Page.

    We are hoping to address the need for this tweak in a future version of CodeRush.

    So what are you waiting for? Go grab this amazing new feature from the Community Site.

    Be sure to keep an eye out for more CodeRush Feature Workshops

1 2 3 4 5
7 8 9 10

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 or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. 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-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners