Subscribe: Rory's Ramblings
http://rorybecker.blogspot.com/atom.xml
Added By: Feedage Forager Feedage Grade B rated
Language: Malay
Tags:
code  coderush  devexpress  find  it’s  i’m  menu  method  much  new  options  plugin  time  version  you’re   
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Rory's Ramblings

Rory's Ramblings



My little place on the web (sorry N4ixt ;) ) where I contemplate life, the universe... Visual Studio and DXCore



Updated: 2016-04-26T19:55:10.044+01:00

 



Let’s get ready to Kindle!!!!

2010-09-09T15:41:30.295+01:00

  I’ve got a new Kindle (3rd generation) Here are some pics. Review to follow later if when I can stop playing with it :) And here are some shots of the cover. I would have added a shot of my new Kindle situated in it’s new home, but the battery on my camera gave out at this point. [...]



Echo…. echo…. echo…..

2010-07-08T15:16:48.734+01:00

Just a very quick post in case you missed the updated link in my previous post.

There is the distinct possibility that this blog may go quiet for a while. It seems a little silly to cross-post to both here and My New DevExpress Blog.

So if you’re looking for CodeRush, CodeRush Xpress, RefactorPro or DXCore information, head on over to My New Blog and check out the rest of http://devexpress.com/ whilst you’re there.




New Beginnings…

2010-07-08T14:42:15.306+01:00

It’s true what they say… “As one door closes, another opens” …and who can tell what new opportunities the new door might reveal. Just recently I blogged there’s going to be “too much happening at work, for me to be able to juggle all my “Official” work, with my DX-Squad responsibilities.” …and this is technically true. If I had to do both one thing and the other without some sort of reconciliation, I’d probably go mad. However it wasn’t the *entire truth*. You see there is a very good reason that there’s going to be “too much happening at work”…. Big Announcement I’ve joined DevExpress Yup I’m going to join Mark and the gang in promoting the DevExpress IDE Tools. CodeRush Pro/Xpress, RefactorPro and DXCore Its worth noting that I’ve not actually given up my previous job. DX did ask, but honestly the family business couldn’t take the hit at this time. We’ll see what happens in the future… Who knows :) Instead I’ll be working part time on all manner of things CodeRush related. But rest assured… My existing employer is aware of the situation and is ok with this new arrangement. So what’s changed? Well that’s a good question….. The simple answer is … well … not much really :) I asked what my job title would be. The best we’ve come up with so far is “CodeRush Community Evangelist”. What do you think? Can you come up with anything better? In theory, I’m going to be more focused. After all I’m being paid to do this now. This also means that I’ll be forgiven more easily by my wife, for the amount of time I sometimes spend in the evenings on these things :) One way of looking at this, is that DevExpress thought it would be cool to be able to direct my efforts a little more than they do now. The way I see it, it’s not such a good idea to dig too deeply into this sort of thing… If I ask too many questions they might change their mind :) Community Plugin Site Don’t worry the community site is still a community site. It and the plugins on it (current and future) will continue to be owned by the community. Nothing is changing there. I’m going to continue all of my community stuff. I’ll still write plugins. I’ll still blog. Hey you never know they might even let me write on the official site :P. What will I do? The simple answer to this is ‘More of the same’. I’ll have greater access to the devs behind this wonderful set of products (You know, the crack squad of awesome guys that actually implement the stuff that Mark Miller comes up with) With this new level of access, I should be even better equipped to answer questions and writing plugins. So we all win. Hurrah! The biggest change from my perspective is that I can’t say “I don’t work for DevExpress” anymore. I’m going to have to work on that one :) Although it’s already recorded all over the place, so I hope you’ll forgive me if I don’t attempt to track down each and every instance. So what next? So I’m just off now for my ‘Kool-aid upgrade’. Instead of making regular visits to the Kool-Aid fountain, I’ve got this new Kool-Aid Patch which hydrates Kool-Aid directly from moisture in the air around me. :) Oh and while I’m on the topic of Kool-Aid, If anyone thinks for a minute that this will make me *more* Pro-CodeRush, I advise you to stop and think for a minute about that…. How exactly is that possible? Seriously? So after my Kool-Aid upgrade, I’ll be off to learn a few secret handshakes and will catch you all on the other side. I think things are about to get interesting :D [...]



All good things….

2010-07-06T08:04:19.242+01:00


I’ve been a member of DX-Squad since some time in April 2006.

After driving Mark Miller, Dustin Campbell and others round the bend asking questions, I finally started retaining enough of this information, that I was able to repeat it to others who came along asking similar questions.

A little while later Dustin suggested I be invited to join the DX-squad, and Mark Miller agreed. I am very grateful to them both for this.

DX-Squad is “A volunteer group of advanced users supporting our tools/component technologies and development community”

What this boils down to, is helping out on the DX forums answering questions on DX technology. It’s kind of like being a DevExpress MVP. And in exchange, DX grants the squad a gratis license to their stuff. It’s an arrangement which benefits both parties and I have found it to be very agreeable.

So I’ve been hanging out on the forums and more recently on twitter answering questions on CodeRush etc for the last 4 years or so. However I’m afraid the time has come to leave.

Unfortunately nothing is forever, and there’s just going to be too much happening at work, for me to be able to juggle all my “Official” work, with my DX-Squad responsibilities.

This being the case, I’m afraid something has to give… and realistically I’m afraid it’s membership of the DX-squad that is going have to loose out in this case.

So after a little over 4 years of helping to answer questions on CodeRush, the DXCore and related tech, I think it’s time to move on.

It’s been great working with my fellow DX-Squaders, who all do a great job supporting their respective areas of DevExpress goodness. I hope they’ll not shun me too much for this decision, and might even continue to provide the odd nugget of help in the future, if should I need it :)

I would like to say a huge thank you to everyone who’s ever used a plugin that I’ve written, and even more so to those who’ve suggested ideas (whether I’ve taken them up on the idea or not). I encourage everyone to go take a look at CodeRush, CodeRush Xpress, Refactor Pro and the DXCore.

IMO they are truly the most useful tools I’ve ever come across.

Unfortunately now (as has oft’ been said)…

…All good things must come to an end.




Template Driven Assembly References

2010-05-24T22:33:56.604+01:00


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)

(image)    

  • Then populate it with Assembly names and suitable mnemonics

(image) (image)

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

(image)

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

2010-05-24T14:01:34.242+01:00

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 – add new win form to your project.

anxf – add new xml file to your project.

andxp – 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:

(image)




CodeRush 10.1 hits RTM

2010-05-21T10:10:11.390+01:00


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




How much faster is CodeRush ?

2010-04-30T10:50:41.170+01:00

Recently DevExpress released a video which compared the rename functionality in CodeRush to that of in of it’s competitor products. There then followed some discussion on Twitter, about how valid the tests were. Questions were raised like “Why would anyone want undo like that ?” and comments were made like “He probably used a pre-release version of ‘Brand X’ productivity tool. They’re always slower than the RTM versions”. These are potentially fair points. Lets see if we can address them. “Why would anyone want to do that?” First up “Why would anyone want undo like that” . Now I must confess I’ve can’t now find the tweet in question in order to quote this properly, but the person who mentioned this appeared confused about why anyone would want to do an undo at that point in time. [To put this statement in context… the DevExpress Video shows a rename of a local symbol using the Brand X product, occurring at approx 0:30 of said video, and then shows the effect of trying to undo this at approx 0:40] Why should being able to undo something be unnecessarily restricted. I frequently get called away in the middle of something, come back, wonder what I was doing exactly. Sometimes undoing and redoing is a good way to remember. In any case I don’t think there is any point at which it should be suggested that undo is unreasonable. If your tool is telling making anything that you do this awkward and error prone, IMO you should re-evaluate if it’s helping you or not. Bottom line: This clearly works in CodeRush… It clearly doesn’t work in Brand X. “It was probably an unfair test using a pre release version of Brand X” Well I can see why some people might think this. DevExpress did this test, and they did it on a one of their own solutions. This does make it kind of hard to verify independently, since they’re hardly about to hand out the source of CodeRush :D …and so I decided to do my own test :) You might say that I am biased also. However the test I conducted is reproducible by anyone who cares to do so using their tool of choice. I started by selecting an open source project that anyone could get hold of. I chose Paint.Net version 3.5.5 I then downloaded the latest version of CodeRush 10.1 (This will soon be available to anyone as RTM is imminent) and the latest version of Brand X (Available from their main page. Can’t get less pre-release than that :D) Both tools were installed and in each case, whilst a test was being done, the opposing product was disabled. I restarted Studio for each test and allowed the CPU to settle after loading the solution before starting the test. I used a quad core machine with 2GB RAM (Yeah I know I need more RAM) running on Win7 x64 (My home machine) And so I looked around for something in the solution which would have a lot of references. After some fairly casual looking around, I couldn’t find anything with more than about 50 references. Then I had a brainwave…. I’d rename the main namespace. [Note:CodeRush took all of 4.1seconds to tell me that there were some 416 references to this in 197 files.] This seemed like it would be enough of a test. What followed was a fairly boring, so frankly I’ll skip straight to the results: [Note: If you’re interested in the details, they’re pretty much the same as the CodeRush Video at 01:53] Product Time to rename CodeRush 22 seconds Brand X 4 minutes and 28 seconds Conclusion So with the latest versions of each product, and a test you can reproduce yourself if you really want, to my conclusion is: Mark Miller is wrong. CodeRush is not 10x faster than Brand X….. It’s 12x faster :D With a difference this big… I couldn’t just have made myself a Coffee…. I co[...]



New ‘Color Swatch’ Feature in CodeRush 10.1

2010-05-04T11:11:53.368+01:00

Update: Mark Miller has since addressed this feature much more thoroughlyI’m sure you recognise at least one of these… #2387d4 &h23 &h87 &hd4 0x23 0x87 0xd4 Apparently, these are all representations of color. Did you ever think that, for something designed to represent color, that … well … They’re not very colorful are they? So how about something better? Something designed to give you a little more relevant information on the color you’re talking about: This little strip of color will also appear in C#, WPF and HTML code. If you click the bar itself… You are presented with…. “The most glorious color picking dialog known to Dev”. – Rory :P This first shot shows, an incredibly granular, ‘Picker’ tab. Next up.. Some well known ‘Web’ colors: Named Colors (Like Color.Red, Color.HotPink) Some colors taken from the local system: Colors found in your open document. This is very useful when designing web pages or css schemes. Essentially you are being shown a dynamic palette of colors that are already in use in your current document. And of course a ‘Favorites’ Tab. Each of the previous pages has a little star button which allows you to add the selected color to your favourites. Multiple palettes can be created and stored here. …And once you have chosen your preferred shade of “Hot Pink” or “Acid Yellow” … Simply click ok and CodeRush will replace your original code, with code representing your chosen color. As usual CodeRush understands the code you’re working with and will happily create C#, Vb.Net and others. [Note: In the beta, this feature is off by default. You’ll need to visit Editor\Painting\Show Color in the DevExpress Options (Ctrl+Shift+Alt+O) and enable this feature in order to use it.] So now you’ll be able to readily identify just what a color looks like, and be able to alter it in a simple and intuitive way :)[...]



My CodeRush Shortcuts

2010-04-19T15:57:26.822+01:00

After being asked to provide a post detailing on the additional shortcuts I configure for CodeRush after installation, I came up with the following.

I’ll try to keep this post up to date as I find

  • F2 – Refactor(Rename)
  • Alt+` - CodeRushTrainingWindowToggle
  • Alt+1 - Refactor
  • Alt+2 – Navigate
    • I disable some Navigations (DevExpress\Options ... Editor\Navigation\Catalog) which I personally never use via this Navigate menu:
      • [First/Last/Prev/Next] Enum Element
      • [First/Last/Prev/Next] Member
      • [First/Last/Prev/Next] Statement
      • Parent
      • Parent Member
      • Parent Type
      • [Next / Previous] Reference
  • Alt+Q - QuickNav
  • Ctrl+M – QuickNav(AllTypes, AllMembers, AllVisibilities, CurrentSolution) Explanation
  • Ctrl+T – QuickNav(AllTypes,, AllVisibilities, CurrentSolution) - Explanation
  • Alt+Up - MoveCodeUp [requires DX_MoveCode] **
  • Alt+Down - MoveCodeDown [requires DX_MoveCode] **
  • Alt+Left - MoveCodeLeft [requires DX_MoveCode] **
  • Alt+Right – MoveCodeRight [requires DX_MoveCode] **
  • F12 – NavigateToDefinition [requires CR_NavigateToDefinition]

In cases where indicated shortcut involves brackets, the content of the brackets is to be placed in the parameters box rather than in the command box.

** Note: I have, as yet, not been able to find a better set of keys that this. I realise that these keys are used by other CodeRush functionality. Therefore I recommend placing these bindings in a folder of their own and disabling this folder. You can then switch between the CodeRush set of functionality and that provided by the DX_MoveCode plugin.

It is my intention to develop a plugin to allow me to toggle between these 2 sets of functionality by enabling and disabling these folders on the fly. A keyboard scheme switcher or sorts. :)




New CodeRush Plugin: CR_RemoveRegions

2010-03-29T11:09:06.362+01:00


Not much to say here other than that this plugin was inspired, nay requested, by Mr @JayRWren

Place your caret on a region and invoke this like refactoring and *all* regions in the current file will be removed.

Personally I like regions. I feel that when used judiciously, they add to code in the same way as comments. Obviously they can be abused, but that’s the same with any feature.

In any case… Jay requested it so I felt it only reasonable to provide him with this little plugin. Especially since it only took me about 20 minutes including time to make some coffee. :)

So here you are… CR_RemoveRegions  Enjoy.




New CodeRush Plugin: DX_DirectOptions

2010-03-16T15:19:02.993+00:00


This is a very simple plugin that I developed, like most of (image) my plugins, to help me save some time. In this case it’s a very small amount of time.

In 90%+ of all cases when I’m loading the CodeRush options screen, I want to use either the “Templates” or the “Shortcuts” pages.

Therefore I have created a plugin which does nothing more than provide actions and menu options to launch each of these directly.

Simply install the plugin in the usual way and then restart either the DXCore or Visual studio.

When the restart is complete, you should have 2 additional menu options in your DevExpress menu.

[Note: The “Templates Options” menu item will only be present if you have the full CodeRush, or a trial of same, installed.]

Additionally these actions exist in their own right allowing you to bind a key to them if you want to. Their names are “ShowTemplateOptions” and “ShowShortcutOptions” respectively.

[As above: If you only have CodeRush Xpress installed, then the “ShowTemplateOptions” action will not have registered itself and will not be available.]

This plugin still loads the other options pages, but will ensure that the page you indicated is the one selected.

For more details, see the DX_DirectOptions’ wiki page

Update:
I'm considering placing these entries on their own submenu. I can envisage a scenario where other options pages get nominated for this and the list of entries on the DevExpress menu gets a bit overwhelming. I would supply an options page myself for picking which of these might show up in the menu.

Also It’s been suggested that these menu options should perhaps have their own Accelerator keys

Thoughts?




New Plugin: DX_GuidGen

2010-03-11T12:19:21.964+00:00


I couldn’t find a StringProvider in CodeRush that would output a new Guid. So I built one :)

It’s a pretty simple plugin but I put up a wiki page anyway and you can download it from here.

Yeah I know…. There are many ways to produce this same behaviour, but I liked the idea of writing another simple StringProvider, because it allowed me time to additionally create the ‘NewStringProvider’ CodeRush template I recently added to my plugin templates.

Enjoy :)

[Note: I firmly believe that having taken the time to create this, and post it up on the web in this way, that I will find out it actually duplicates some CodeRush functionality in about 2 minutes from now.]




Yet More Designer Free CodeRush Plugins

2010-03-11T12:09:26.315+00:00


Yup I have updated my Plugin Templates (Originally started here and continued here) to include a further 2 templates:

  • NewStringProvider
  • NewTextCommand

Again I have provided these in both C# and VB.Net so if you can find any flaws, or have ideas for improvements you’d like to see made. Just email me … RoryBecker@gmail.com and I’ll see what I can do :)

Plugin templates are available here.




More Designer Free CodeRush Plugins

2010-03-10T14:06:31.046+00:00


[Update: I am now receiving help (from @surekill) for my chronically poor VB.Net –> C# conversions :D (Personally I blame the late nights). These templates now suck less :)] 

A couple of days ago (Erm I think) I posted here on how to use these new templates ….

  • NewAction
  • NewRefactoring
  • NewCodeProvider
  • NewIssue

… to kickstart the building of new plugins for the DXCore.

Well since then I’ve added 2 additional templates to those already provided

Now you can also call upon…

  • NewNavigationProvider
  • NewSmartTagMenu

The first of these produces code which will create items for the CodeRush “Jump To” menu.

The second one gives you code to produce your own menus (Like ‘Refactor’, ‘Code’ and ‘Jump To’)

The zip file which contained my previously exported templates now includes these 2 new ones… So feel free to download again, import them and get cracking on some new plugins :)




New plugin: CR_NavigateToDefinition

2010-03-10T00:26:03.392+00:00

[CardsOnTable:I did not write this plugin. It was written by Jorge Rowies. Thanks so much Jorge. My life, at least, is now much easier] I know what you’re thinking…. You’re thinking “Why the **** do I need a plugin for that?”… You’re thinking “Studio already does that!!”. Please just bear with me… All will become clear[er] So for those who aren’t already at this point let’s spin back a bit first. What does this plugin do? Well this plugin will navigate from a type or member to the declaration of that type or member. Which is to say it will find the source code of that element and position your caret on it. Why do I need this plugin? Well you might not. this plugin is built to serve an edge case scenario that might not apply to you. Visual studio already has a function “Goto Definition” which appears to serve the same purpose as this plugin. Visual Studio Limitations Visual studio is capable of finding the source you are looking for if the source you are looking for is… …in the same project as that from which you start. …in a project referenced (only a project reference will do) from the project from which you start. If you use file references then you are normally out of luck. Why would I use File references if I have the source? Well your reasons may vary…  I myself have 3 reasons: Historically (VS2002, VS2003) had some file locking bugs which appeared to lock the produced binaries when intellisense accessed them which would prevent a rebuild until VS was restarted. (This was the reason we switched to File references only in the first place. It probably no longer applies.) For performance reasons it can be useful to be able to carve up your solution into multiple sub-solutions in order to work on a smaller section of the problem you are assigned to. Using File references allows you to do this quickly and easily as you are already referencing the binary versions of everything. (I have not had to do this in a while because CodeRush’s performance is really that good. But back in the day I had very poor hardware and CodeRush has not always been as performant (Damn it! It’s my blog and I say that ‘Performant’ is a perfectly valid word) as it is now. We have an external build process which builds reference versions of our dlls etc under known conditions. These are the files that ultimately go into out installers and therefore it makes sense that these are the versions of the files that are actually referenced by the various projects in a solution. Other uses So imagine that you’re coding against a 3rd party open source library. (Could be ASP.MVC. Could be Log4Net could be anything really.) You are referencing their binary because frankly you don’t see the value in trying to build their source as well as your own, but it’s comforting to  have it there in case you need it. Now suddenly you come across a need to understand something about it’s internals. You have 2 choices: Load the OS solution in a new copy of studio Add the OS solution’s project’s to your existing copy of studio The first of these is the simplest, but you now have to navigate through the OS solution as a separate entity which has no connection to your own project. Thee is no easy way to navigate between the OS solution and your own. Instead consider adding their solution’s projects to your own. In some cases this is madness as they will have 15 or more projects and things can get out of hand very quickly. However in some cases like ASP.MVC or Log4Net, there are few projects in the OS solution and these can be added very quickly. Normall[...]



RedGate – Conducting ‘ANTS 6’ UX Testing

2010-03-08T14:05:05.964+00:00


I have been asked by RedGate (Very clever people who bring your SQL Compare, Reflector and others) to see if any of you might be interested in helping out testing their upcoming Version 6 of ANTS Performance Profiler.

There are a few requirements:

  • You must be .NET Developers (who use either C# or Visual Basic .NET)
  • You must be using Windows Vista or Windows 7.
  • The application you are working on is either:
    • Reasonably File I/O bound (i.e. lots of reading and writing from disk) 
      • and/or
    • The .NET application makes use of SQL Server but it must NOT be SQL Server Express. You must also be using a local instance of SQL Server (i.e. the instance must be on the same computer as the process being profiled).
  • You are not using the Compact Framework (very unlikely but you never know)

The session is run remotely, only lasts 1hr and you only have to share your screen – RedGate wouldn’t have any control of your computer.

If this interests you in any way, email me (rorybecker@gmail.com) with a subject line of “ANTS 6 UX Testing”, and I’ll see it gets to the right people.




Designer Free CodeRush Plugins – The new CodeRush plugin Quick Start

2010-06-17T16:00:05.997+01:00

Explaining how to start a new CodeRush plugin can be a little complex. So I’ve knocked up a few CodeRush templates that should make it a lot easier :) Step 1 - Import these Plugin Templates into your copy of CodeRush. (DevExpress\Options … Editor\Templates … Right-click Templates … “Import Templates…”) Step 2 - Create a new DXCore Plugin project via the “New Project” dialog Step 3 - Activate any one of the following templates inside your plugin class. NewAction NewRefactoring NewCodeProvider NewIssue You should now have a “CreateMyX” method which…. Creates the relevant component Adds it to the components collection Sets up the minimal mandatory properties. Creates the relevant event handlers. Attaches said event handlers to the component in question. For example, one of the more simplistic things you might want to do is to create a new custom Action to Bind to a Key. Here is the Default DXCore plugin as written in CS… And here is what you get after executing “NewAction”  After a little customization…  The only think you need to do .. Is to call your new “CreateMyX” method from inside the “InitializePlugIn” method You have a completely functional Hello World action ready to be bound to the key of your choice Now you have to admit … That makes things a lot simpler… I’ve even linked a few sections of code together with some CodeRush «Field» and «TypeLink» tokens in order to make customizing of that default code a little easier. So if you’re interested in making plugins…. This should make things a little better. Feel free to leave me some feedback… I’ve done my best to convert the original VB.Net versions to C#…. So it’s possible there were some issues in translation… But that’s what you get for picking such a strange language (I mean C# people… VB.Net FTW! :D) [...]



Improve the Speed of CodeRush: EdgeCase Scenario

2010-02-25T15:34:18.617+00:00

I have *one* solution on *one* machine on which CodeRush runs slow.

Dog slow…

Lame-Dog slow

So slow it’s painful and I was forced to unload (not uninstall … don’t be daft) CodeRush.
This is also painful, but in my view there was simply no alternative.

Seriously I’ll happily explain if it’s really needed, but no… Resharper is not, for me, a valid alternative.

This has been the case for nearly 2 weeks. This problem as I say, affects only a single solution and not all files in it… But enough of them to cause me some serious headaches.

Yesterday I cured it. [Cue Choir of angels… lights from heaven … General merriment from all]

How did I do this.. Well to cut an already long story short…

I *un*installed StyleCop 4.3.3.0, restarted Studio and loaded my solution

The effect was immediate… like a bolt of lightning turning night into day. however unlike a bolt of lightning, the effect was permanent. This offending solution has now been made into CodeRush’s whipping boy and frankly my entire week is looking up :D

I have handed support all the information I can find which might help eliminate this issue and I’m sure they’ll soon find out what’s going on…

In the mean time I’m writing this post in the hopes that others who might have tried CodeRush and found it to be slow (I’m sure there aren’t that many :D) might find this or be pointed at it by colleagues and perhaps give it another spin with this in mind.




Enhance QuickNav (CodeRush or CodeRush Xpress)

2010-05-06T19:16:56.353+01:00

Update: DevExpress have removed the QuickNav feature from CodeRush Xpress 10.1 and higher (when used under VS2010) at the request of Microsoft. It is believed that this is because it overlaps in functionality with one of the VS2010's new features. Since Microsoft licensed CodeRush Xpress on behalf from DevExpress for all users of VS2008 and VS2010 (Pro and above), this is not completely unreasonable. This feature remains in the Pro version of CodeRushQuickNav (Ctrl+Shift+Q) is an often overlooked but useful tool in the CodeRush (and Xpress) box. With it you can search through your code pretty quickly… provided, that is, you configure it for the type of search you’re trying to do. I don’t know about you but I often go kinda snow blind looking at all those icons for “Public property”, “Friend Method”, “Private Class” However what very few people seem to know, is that you can preconfigure QuickNav to behave differently based on how you launch it. That’s right you can create your own shortcuts (keystrokes) to launch QuickNav preconfigured for a specific type of search. By adding just a couple of keystrokes, QuickNav can become IMHO a much more useful facility. The 2 shortcuts I’m going to suggest I’m going to call “Find Types in Solution” and “Find Types and Members in File”. These are more descriptions of what they will do, rather than the names they will be given. To add these shortcuts, follow the instructions in my previous post Binding a key in CodeRush and enter the information below in the appropriate boxes. At this point you will have added 2 very useful tools to your box o’ tricks Find Types in Solution Bind to : Suggest Ctrl+T Command: QuickNav Params: AllTypes, , AllVisibilities, CurrentSolution Find Types and Members in CurrentFile Bind to : Suggest Ctrl+M Command: QuickNav Params: AllTypes, AllMembers, AllVisibilities, CurrentFile These bindings should allow you to navigate your code even easier than before :) For reference, I will now quote from an early forum post by AlexS in which he details the possible parameters for the QuickNav command ------------------------------------------------------------- There are 4 parameters for the QuickNav action: TypeFilter -- defines default type filter for the Quick Navigation. Use the following values to setup default type filter: Classes, Interfaces, Structs, Enums, Delegates, AllTypes. Use "and" keyword to combine filters together like this: Classes and Structs MemberFilter -- defines default member filter for the Quick Navigation. Use the following values to setup default member filter: Methods, Properties, Events, Fields, LocalsAndParams, AllMembers. Use "and" keyword to combine filters together like this: Methods and Properties. AccessFilter -- defines default access filter for the Quick Navigation. Use the following values to setup default access filter: Private, Protected, Internal, ProtectedInternal, Public, AllVisibilities. Use "and" keyword to combine filters together like this: Private and Protected. LocationFilter -- defines default location filter for the Quick Navigation. Use the following values to setup default location filter: AllFiles, CurrentSolution, CurrentProject, CurrentNamespace, CurrentFile. You can not use "and" keyword here to combine filters together. Here are examples of parameters usage: AllTypes, AllMembers, AllVisibilities, CurrentFile AllTypes, AllMembers, AllVisibilities, AllFiles AllTypes, AllMembers, Public and Protect[...]



DXCore Docs

2009-12-16T13:21:06.742+00:00

People keep asking me where to start when learning to build plugins… specifically they ask me where the documentation is..

At this point I’m typically at a loss, because the docs (such as they are at this point) exist as collection of disparate articles, posts and references across a few locations:

So in an effort to centralize some answers to some of the more common DXCore related questions, I'm starting to put together some task based documentation at http://sites.google.com/site/dxcoredocs/

It is not intended that this will turn into an API reference ... That will ultimately be down
to DX.

However I'm being asked certain task based questions often enough, that it's
becoming worth my while to create some prebuilt answers of my own that I can point people at… and my blog isn’t the easiest place to browse through :)

Initially some of the content will redirect to relevant articles on my blog or posts in the Forums but with luck I will eventually find time to rewrite some of this content direct in DXCore Docs.

At the very least, new content will be presented via DXCore Docs in an effort to make it easier to browse and digest.

Also note that similar CodeRush based information is available at a similar site:http://sites.google.com/site/coderushdocs




CodeRush Scenarios

2009-11-04T00:50:04.582+00:00

This is a simple post to point out some scenarios in which a tool like CodeRush can be invaluable. Refactoring Bashing out a quick algorithm. I have no fear. I can hack out a working solution pretty quickly when I’m called upon to do so, but when done this way, it’s typically not very pretty. However, with a few keystrokes I can extract component parts of my ‘rough and ready’ algorithm to other methods, allowing me to sensibly reuse code which I might otherwise have copied and pasted and then had to maintain independently. Tidy that Code. The code I wrote last year is ugly. Hell, the code I wrote last week is ugly, when compared with what I wrote yesterday or today. All code can stand to be improved, but it’s rare that you want to go back and actually improve it because that code you wrote yesterday, is yesterday’s news. You don’t want to have to reconsider your old code because its time consuming and boring. Well some simple Refactorings, like ‘Rename’, ‘Extract Local’ and ‘Inline Temp’, really do help speed the process to the point where you can feel your code quality rising by the second, which can really enthuse you to do more. Spreken zie code? Ok… I don’t really speak any foreign languages but I do know what it’s like to have to interpret a foreign codebase. It’s hard. you rarely have the ear of someone whose uses the code, much less the moron who created it in the first place. With CodeRush, I can glide around the codebase renaming types, methods and variables as I see fit… Morphing the codebase ever closer to that illusive “Readable code”. I can do this completely safe in the knowledge that I am not altering the way the code works, just the way it reads. Efficient Code Review. Code-Reviews can take up a lot of time. The important part, is not tidying up the code, but imparting knowledge of why the suggestions are real improvements. You want to spend as much of your time “teaching the man to fish” rather than “throwing fish in the his general direction hoping he’ll catch one”. After all… if you “teach a man to code *well*” you wont have to “code well for him”. CodeRush helps you spend less of your time improving or correcting the code being reviewed, so that you can spend more of your time either explaining why the improvements are so good or simply get on with improving more code. Also, using CodeRush (even the Xpress version) has an added benefit that in addition to demonstrating good code, you are demonstrating the use of good coding tools. CodeProviders API-By-Example. API-By-Example (also known as consume-first development) is a process where in you call a non-existent method… in a way you imagine that you would like to be able to call it… passing parameters in a way you see as sensible to do … and using any return value it produced in a way you see as reasonable… all without ever having actually coded the signature, or indeed any of the implementation, of the method in question. It’s like a big ol’ game of ‘Let’s pretend’. except that when you’re finished doing all of that, you get to hit a single key and generate this method’s signature exactly according to it’s usage. You have just designed your first API-By-Example. Once generated, the method’s own signature can be used a partial spec against which a implementation can be built, safe in the knowledge that the call already makes sense in situé. This sort of technique is great for cre[...]



CodeRush … Take some Time to Tune.

2009-10-14T23:02:41.017+01:00

So you’ve just been handed a copy of CodeRush and told that it’s the future.. Whomever told you this, is very insightful and deserves much of your respect :D After installing, the first thing you should do, is to give CodeRush an idea of how you like things done. I have decided to compile this little list of the options that I change and why, in the hopes that this will help ease you into working with your new best friend. So options… where are they then? Access to the options screen is granted via the options entry on the DevExpress menu. If you see no DevExpress menu, then you either don’t have CodeRush installed, or you are running the Xpress version (I think MS asked that it not have the DevExpress menu) If this is the case, you have 2 options… Suck it up and hit Ctrl+Shift+Alt+O and your options should appear. Bust out RegEdit and go to town on your registry. (Note that the latest version is 9.2 not 9.1) Ok so now you’re into the options screen. Each page (on the left in the tree) is created and dynamically added to this tree by the plugin that it represents. This means that as a plugin developer I can seamlessly add pages to this tree for my own plugin. Additionally some of the options pages are considered Advanced or Expert rather than the default of New User. see the little Level dropdown in the bottom left of this screen to alter your current setting. Further, some pages are language specific, so you’ll need to set the Language dropdown (a little to the right of the level dropdown) to the language you’re looking to configure. So what settings do I alter? Code Style (Editing\Code Style\Identifiers) There are a few pages under Editing\Code Style which you should definitely browse through. I generally find the default to be more than satisfactory. However my own personal preferences differ slightly on the Identifiers page. I prefer Pascal Case for everything, but will prefix fields with an ‘m’ (for module level). This is purely a readability issue. Organization(Editor\Organization\Member Mover) This relates to the “Move to Region” function under the little icon to the left of each of your method signatures. If clicked, it presents you with a list of regions into which you might wish to move the method in question. This list contains regions that already exist with the current code file. The options page allows you to preconfigure an additional list of regions which will appear in this menu, regardless of whether or not they already exist in the code file. I tend to configure the following regions (each on a separate line) Fields Simple Properties Constructors UI Events Extraction and Generation There are several places in the options where CodeRush gives you the option to specify the location where generated code will appear, relative to your current position. I don’t like having to tell CodeRush where to place generated items each and every time. I’d far rather set up a default. Therefore: Create Method Stub (Editing\Refactorings\Create Method Stub) Insert Method: After source method property. Extract Method (Editing\Refactorings\Extract Method) Insert new methods: Below the source method or property. Extract Property(Editing\Refactorings\Extract Method) Insert new properties: Below the source method or property. Property To Method (Editing\Refactorings\Property To Method) Insert method(s): After the source propert[...]



Why do I find CodeRush so indispensable?

2009-08-25T16:22:56.864+01:00

  I recently said “CodeRush has become an integral part of my workflow.” …and was asked by Braden Powers … “Do you have a blog post or something that explains why??” I realized that I didn’t, and so here it is… It comes down to the fact that I use certain facilities provided by CodeRush so often and without even thinking, that without CodeRush present, I end up spending several seconds staring at the screen wondering why some series of keystrokes isn’t doing what I think it should be. Why should I ever be in such a situation. Well there are a couple of reasons. Some of my colleagues have PCs that frankly cannot cope with Studio, so their chances of being able to cope with *any* addin are nil :( Using such a PC is sometimes unavoidable. Sometimes I get caught on the hop. Between versions as it were. I have received a link to a beta or daily build of CodeRush and have been caught having already uninstalled my previous version and not yet having installed the new version. At this point it’s amazing how the universe almost always arranges a phone call to distract me… after which I forget that studio doesn’t currently have CodeRush. So which facilities do I find to be most useful? Which ones to I use so often that I honestly forget that they are not a part of studio? The answer is hard to define explicitly without currently being in one of the above scenarios but I will try. Essentially the most used functions for me are those that are accessible from the CodeRush SmartTag menu. The Refactorings and the Code Providers. Now between these 2 categories there are 225 separate functions. Obviously I don’t use all of these on a daily basis. If I were to be presented with the entire list every time I invoked the SmartTag, then I would go absolutely insane and dropkick CodeRush in a heartbeat. CodeRush manages to provide a wonderfully intuitive interface here. Each Refactoring and Code Provider is intelligent enough to know if it is suited to your current context. The Rename refactoring simply isn’t available if your caret is on a language keyword. The Declare Class Code Provider isn’t available, unless the element under the caret is not currently declared and could potentially be a class. This means that my one keystroke (I’ve rebound the CodeRush/Refactor key to ALT+1), I’m never presented with more than 5-8 options to pick from. Next add to that, the fact that CodeRush moves the available items up and down on the menu based on your usage of those items. Constantly re-evaluating how far each should sit from the top of the menu. Additionally, If CodeRush feels that there’s only 1 function which makes sense given the current context, then you can elect to have CodeRush not even show you the menu, but to move straight on to performing said function. So there’s even less for you to have to do. ok Enough fluff… Which items do I use so often as to make Studio unusable without them Note this is just my personal list.. CodeRush has much much more and these simply represent those facilities, whose absence actively slows me down. First there are the Refactorings: Rename Extract Local Extract Method Extract Property Inline Temp I cannot stress enough how useful the above 5 Refactorings are in writing any code. The ability to properly shape a solution as you go is phenomenal. I mean seriously… Wh[...]



What’s your Windows 7 “Virtual Machine” Strategy?

2009-08-10T14:31:49.979+01:00

I ask because it’s something I almost overlooked completely.

There are many Virtual PC style options on the market but up until now I have been using VPC 2007 SP1 because Its’ a Microsoft product and it’s free. Perhaps not the best strategy, but it worked … And I assumed that it was going to continue to work.

I was wrong.

I run several VMs under VPC at work and I need them to all continue to work.

But when I tried to run VPC2007 SP1 under Windows 7 (admittedly the RC) I was greeted with a dialog which suggested that VPC was not compatible with Win7.

“Ok” I thought, so where’s the version that is compatible. 

I found this … http://www.microsoft.com/windows/virtual-pc/download.aspx which is the Windows Virtual PC RC install. ( also the XP Mode RC install)

On the surface it looks good, but Microsoft seem to have player the same confusing trick they did with Messenger back in the day.

This is “Windows Virtual PC” (Win 7 Version) which is not the same as “Microsoft Virtual PC” (VPC 2007 SP1).

This *requires* AMD or Intel Chip level support (called VT Support on the Intel side) this is non- negotiable.

So it’s worth checking your chip to see if it provides VT support. The Intel side can use this utility.

However my work machine does not support this.

I am apparently stuck between the MVPC which runs on Vista and WVPC which runs on Windows 7 but only if you have VT support. At first looks this seems to mean No VM Support on Windows 7. This is not workable.

It seems that, at least for the moment, if you have an older (in some cases not that old) machine, and you require the ability to use a VM, that you’re up a certain creek without a paddle.

In my particular case I was lucky enough to have been introduced to VirtualBox (Yes I know you could use VMware, but AFAIK that’s not free and VirtualBox is just as free as Virtual PC. As indicated in the comments, VMWare Server is apparently Free.)

This is a wonderful app produced by Sun which seems to have little to no issues running VHDs created for use with VPC.

The one issue I encountered, was that I had to change the default network adapter from "PCnet-Fast III" to "PCnet-PCI II" before my guest OS would recognise the External network and the internet beyond.

That done though, everything seems fine, and the last of my Win7 worries have evaporated.

I will be installing Win7 RTM on both my home and work machines over the weekend :)