Monday, March 16, 2009

CodeRush Wish list

Everyone (in the Tech world) who knows me, knows I am a big fan of the DevExpress stack ( DXCore, Coderush, RefactorPro)

I will grant you that we could always do with more perf / stability. (Although I haven’t had issues with either of these in the DevExpress stack for some time)

However I thought I’d sit down for a few minutes and try to bash out  a short list of improvements I’d make to CodeRush if I were in charge :D (Hey we all know that’s never going to happen so this is the closest I’m gonna get :)

This is just a small list of things that I feel would make CodeRush that little bit better.

Multi file templates

Ok I lied… This feature wouldn’t make CodeRush a little bit better. For me at least this would add hugely to Coderush.
I’m quite sure that the possibilities for this go well beyond what I’ve thought of.

So what is a Multi-File template?

Well simply put, it is a template whose output results in text being injected into multiple (possibly not yet existing) files.

For example I could “Create New Form” using…
-------------------------------------------------------------
CNF<Space>
-------------------------------------------------------------

In Winforms Project, this would create a Form1.vb and Form1.designer.vb, links the 2 and creates suitable multi-file linked fields for phrases like Form1 throughout.

The same template should work inside an ASP.Net App, an MVC App and a WPF App, creating suitable forms in those circumstances

This could easily be extended to work for WebServices, UserControls and many other types.

With the right templates in place, you'd never need to visit the "File Add New" dialog again :)

[Update: So this turned out to be so easy I built it myself]

Enhance 'Go To Definition

I really like the ability to leap from one part of the code to another in a logical fashion but we have developed a in-house practice which makes this rather difficult.

We don't use project references.

Instead, every reference made in a solution built by us, is to a dll already built at an earlier stage of said build.

We use file references in order that large solutions may be broken down into smaller ones with a subset of the projects that exist in the whole. This may be done by copying the Solution (or using save as) and then any projects not being edited may be deleted.

The down side of this is that when I select 'Go To Definition' for an object in one of those other assemblies, I will invariably end up in the object browser.

I would really like CodeRush to look around the solution and recognise that there is a project in the solution which has the exact same namespace structure as the item I am attempting to locate the Definition of and redirect me to the source of that item.

 

Setting Schemes

Allow me to copy my settings to multiple named instances and allow me to switch between them. This does not need to be quick, but I could have a 'full' set, a 'slim line' set and an 'experimental' set.

Due to the recent inclusion of the Plugin Manager ToolWindow, we would be able to define schemes of plugins. so we could switch to a very minimal set of plugins in order to enhance speed.

 

Setting Export/Import

I would love to be able to create a “Selection Embedding”, “Shortcut”, “Template” or other setting and be able to export it to a file something like a .reg file.

I could then hand this file to a user or post it on my blog or attach it to a forum post.

CodeRush/Refactor/DXCore would have installed and associated a new utility with files of this type in order that a simple double-click would be treated as a request to absorb these settings into your current DXCore installation.

Naturally DXCore would detect if you had multiple sets of settings and ask you which ones you wished to affect with this file… Offering you the chance to backup these settings prior to this if needed.

 

Filterable Toolbox

There are so many items in the toolbox these days, especially with the DXperience controls, that it can be quite hard to find what you’re after.

This could be solved with the introduction of a search box at the top of the toolbox. This would probably just restrict the showing toolbox items based on an incremental contains search using the text currently in the search box. It would probably be fair to remove the tabs during such a search but this could be optional.

In simple terms, it would work like the Vista Start Menu

 

 

These are just a few things which I feel would make CodeRush even better.


11 comments:

Anonymous said...

Selective Setting Export/Import is great idea.

Malisa Ncube said...

I would need the following

1. A context menu on References, to copy references from a project. I saw that in powertools but in was very depressed when powertools messed my VS.

2. I don't know whether this is possible. I enjoyed right clicking on components and copying (visual or non-visual) in delphi and paste them on notepad change a few things from there and past them back in the designer. It would be nice to have this in VS maybe provided by CR.

Rory said...

Hey Malisa..

Not sure about item 2 but as far as item 1....

I have started a Writing a plugin for DXCore to replace the References Dialog.

It's still early stages, but one of the new tabs in this plugin provides a list of (File) references already present within other projects in the solution and allows you to add those to the current project.

I forget how complete the latest version of this is, but the project is called CR_QuickAddReference and it's source is located here with a binary available here and more detail here

Anonymous said...

Great post, Rory. Thanks.

- Mark Miller

Jorge Rowies said...

Hi Rory, I know this is an old post, but I would like to know if you find a solution for what you describe in the "Enhance 'Go To Definition" section of your post, because we are having the exact same problem and still cant find how to solve it. Thanks a lot!

Rory said...

Well there is an alternative now not a perfect one... But it's there.

Since this post I have learned about Ctrl+Click funtionaity which matches the gotoDefinition quite well and does appear to work across file references to other projects in the solution.

I would prefer that CodeRush was simply able to parse the same .pdb debugging file which allows studio to step through such references.

This would allow rename and other similar functionality to work through said references... although the pdb files would need to be regenerated by the compiler in order to have it catch up properly.

I posted this suggestion to the Support Center http://www.devexpress.com/Support/Center/p/S131637.aspx

Rory said...

Click Identifier (as it's actually known) may need to be enabled in order to be used:
-------------------------------------------------------------
Follow these steps to get to the Click Identifier options page:

1. From the DevExpress menu, select "Options...".
2. In the tree view on the left, navigate to this folder:

Editor\Navigation

3. Select the "Click Identifier" options page.
------------------------------------------------------------

Jorge Rowies said...

Thanks Rory, I tried Ctrl+Click and it works fine for classes and interfaces but not for methods or properties (it's showing me only the metadata), so I am trying to develop a DXCore plugin to do this (I am not reading pdb information, because I don't know how to do that, so the project must be loaded in the solution for this plugin to work).
The DXCore API is very good so this is going pretty smoothly, as soon as I have something more polished I'll let you know.
Thanks a lot (sorry for my english),
Jorge

Rory said...

I discovered as much myself recently and posted this suggestion to the support center -> http://www.devexpress.com/Support/Center/p/S134139.aspx

Jorge Rowies said...

Rory, I just finished the plugin, I believe it's pretty decent. How can I contribute to the community, is there any way to upload it to http://code.google.com/p/dxcorecommunityplugins/ ?
Thanks

Rory said...

If you mail me (rorybecker@gmail.com) I will link you through to details regarding that.