Monday, May 24, 2010

Template Driven Assembly References


In comments on my previous post @BlackMael asked about doing something similar to DX_NewItem, only with assembly references instead of Project Items.

That sounds like a challenge to me :D

My answer to this is that there already exists an AddAssemblyReference TextCommand in CodeRush. But that ‘s only useful if you know what to do with it.

So here’s a quick guide on setting up a “Dynamic List” of Assemblies

  • First Create a new Dynamic list (DevExpress\Options  Core\Dynamic Lists)

DynamicList0   

  • Then populate it with Assembly names and suitable mnemonics

DynamicList3DynamicList1

  • Finally create a template that references the variable used in the list.

DynamicList2

You’re done!

You can now use ‘ar’ in combination with any Assembly added to the assembly list and CodeRush will add your assembly reference without ever needing to go near the dreaded “Add Reference” Dialog


New CodeRush plugin ‘DX_NewItem’ replaces ‘Add New Item’ dialog

Note:This plugin requires the full version of CodeRush (Or a trial of same). Xpress is not supported at this time.]

I’m sick of visual studio’s ‘Add New Item’ dialog.

It’s filled with way too many items I’ll never use and it’s slow to use.

So I’ve created a CodeRush plugin to replace it in > 90% of cases.

Now I’m sure you already use CodeRush templates to create classes, methods , Interfaces and the like, but what about when you need to create something more complicated.

Something with multiple files. Something which studio is already capable of creating and where creating a CodeRush template would take too long.

Wouldn’t it be nice if you could ask CodeRush to trigger a Visual Studio Item template without having to muck around in the “Add New Item” dialog trying to find it first?

Well now you can!

  • Locate DX_NewItem
  • Deploy the dll to your plugin folder
  • Extract the settings file to the correct location
  • Create a single CodeRush template

and you’re done (full instructions here)

Now you have the benefit of the ‘an’ template. ‘an’ is a mnemonic for ‘Add new

For example:

anwf<space> – add new win form to your project.

anxf<space> – add new xml file to your project.

andxp<space> – add new dxcore plugin to your project.

[Note: Other Templates are already catered to… See the ‘Templates’ list on the ‘Core\Dynamic Templates’ (advanced) option page – ]

How sweet is that?!!

I’ll be adding support for other items as time goes on, but you can already add your own via the instructions on the wiki page

And now for something more visual:

DX_NewItem


Friday, May 21, 2010

CodeRush 10.1 hits RTM


Yes I know I’m a bit late with this news but I was on twitter this morning and noticed that people were still under the impression that CodeRush 10.1 was still in beta.

So let me set the record straight… Here are the facts:

  • CodeRush 10.1 (along with DXperience) hit RTM at approx 21:40 BST on 19th May.
  • CodeRush is available to subscribers from the DevExpress Client Center
  • CodeRush Xpress (Still Completely Free!!!) is available from it’s own page
  • A trial of CodeRush (Full version) is available from this page
  • The current version is 10.1.4
  • CodeRush 10.1 works under VS2010, VS2008 and VS2005
  • CodeRush has a new Color Picker which absolutely rocks in *any* color related scenario (WPF, CSS, VB, CS)
  • The Graphical API has been rewritten to the account for the changes in VS2010
  • Microsoft have requested that some features be removed from CodeRush Xpress under VS2010
    • This is believed to be because they introduced ‘similar’ features in VS2010 that they wanted to promote.
    • Such features include QuickNav, QuickFileNav, Tab To Next Reference, Highlight References and several consume first Code Generators
    • These features all still work under VS2008 and VS2005
    • These features all still work in the Trial or Full versions of CodeRush
    • MS paid to license CodeRush Xpress to all users of VS Pro or higher, so frankly they have the right to say what they’re willing to pay for. It kinda sucks but this is actually not unreasonable.

So go out spread the word “CodeRush has come to VS2010” - Which means VS2010 is finally usable :D