Home > Options/Settings, Upcoming > New option for positioning newly declared types

New option for positioning newly declared types

March 23rd, 2012

An options page for type declarations positioning has been introduced. You can change the target position for classes, structures and interfaces created by CodeRush code generation code providers:

CodeRush Type Declarations options page

The following code providers are effected on this setting:

Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: 2008 and up
Updated: Mar/24/2012
ID: U004

Similar Posts:

  1. March 28th, 2012 at 13:10 | #1

    Awesome! When is it available? During TDD, I create the class under test in the same file (I move it out later) for expediency. It defaults to creating above, which is fine, but below would be better since I wouldn’t have to scroll more and more as I added tests.

  2. March 28th, 2012 at 23:28 | #2

    @Erik, All new features are going to the next major release – 2012 vol. 1. Please take note of the Versions field at the bottom of the post – there is a version of the product for which the content is applied.

  3. March 28th, 2012 at 23:28 | #3

    @Erik, By the way, I’m curious why you have to scroll when declaring types. When a type is created, you can simply press Esc to go back to the initial location, so no scrolling is required.

  4. March 29th, 2012 at 20:54 | #4

    Oh, I figured it was in the next release. I was wondering when that was due out (I suppose I could probably look it up somewhere).

    As for the types, I don’t have to scroll to declare them. Basically, what happens is that I have a test class and I write a test in it, which forces me to declare the new class under test. I do that, and CodeRush puts it above my test class. Then I work, writing more and more tests, and as I do this, my test class gets bigger and bigger, and I have to scroll up more and more to get to the class under test.

    With this option you’re talking about here, I could set the class under test to be declared under the test class and then I’d always be looking at the method I was writing and the class under test right below it. (I suppose I could also ‘push’ tests down as I wrote them like a stack, but meh, I like this better :) )

  5. March 30th, 2012 at 03:04 | #5

    @Erik, Oh I see, there’s no exact date set yet for the 12.1 release – it is not a secret, but no one knows it at the moment.

    As for navigation between types, it seems logical to add several navigation providers like Jump to Next/Previous Type. Having such navigation provider will move you to the next type without scrolling at all. What do you think? Would you use navigation provider which might be bound to a specific shortcut in this case?

  6. March 31st, 2012 at 12:10 | #6

    I would certainly use type navigating in the usage scenario I’ve mentioned above. That could also be handy for a recent thing I’ve started doing with nesting unit test classes for a BDD-style of naming.

  7. April 2nd, 2012 at 00:18 | #7

    OK, thank you for your feedback, Erik!

  8. April 9th, 2012 at 07:49 | #8

    Should I be seeing this in the version released April 6?

  9. April 9th, 2012 at 08:10 | #9

    @Erik, The released version is a minor update for the 2011.2 release. The option will be available in the next major update – 2012.1.