Transcript for old geezers like me

ctodx
16 June 2008

I see that Ray uploaded the video that Mark and I did a couple of weeks ago on Selection Embedding in CodeRush. It's a good video, I think (and not just because I'm in it Smile), with lots of good content, but it shows that we were still finding the best way to blend the video and screencast. This one, for example, has the text in the screencast a little too small for old guys like me (heck, I'm even wearing my glasses for the video).

So to quickly recap the main points:

  • CodeRush training window helps you learn the keystrokes for CodeRush as you type. DevExpress | Tool Windows | CodeRush.
  • The Keys window is an extra plugin for DXCore, available from support. It's good for demos.
  • If you have a selection in the editor, CodeRush provides some functionality, accessed by a single key, that will embed the selection. Examples given included F for try/finally, C for try/catch, T for try/catch/finally, L for lock(), U for using(), W for wait cursor, B for a block in braces.
  • Some other embeddings are available in the context menu (right- click menu). Examples given: while(), do while() and Comment Box.
  • In discussing selections, we mentioned that Ctrl+W widens a selection by logical, syntactic block, Ctrl+Shift+W shrinks it. (The Numpad + and - do the same.)
  • There are some features that modify the code instead of embed it, example given was Inversion (Ctrl+Shift+I) that inverts the meaning of code. Examples given were changing the setting of a bool variable (from "boolVar = true;" to "boolVar = false;", for example) or for swapping over the LHS and RHS of simple assignments (from "intVar = otherIntVar;" to "otherIntVar = intVar;", for example).
  • To write your own embedding: DevExpress | Options, search for "Selection" to get to the Embedding page of the Options dialog.
  • In writing your own Selection Embeddings, there are four styles you can use: Surround (like the Comment Box example), Top/Bottom (inserting lines above and below the selection), Left/Right (each line gets something added to the left and/or right of the selection, the example being to comment out each line), Top/Middle/Bottom (the top and bottom lines get special treatment form the middle lines of a selection), Before/After (some text inserted just before and after the selection).
  • String providers are functions that return a string. Examples given were UserName (for the current user's name) and Date (for the current date).
  • Binding to a keystroke: DevExpress | Options, search for "shortcuts".
  • The easiest way to create a new shortcut is to find one that works roughly the way you want yours to work, right-click the shortcut, choose Duplicate Shortcut and then edit the duplicate. The context in which the shortcut is active comes along as well (although you can copy/paste a context from another shortcut if you want).

I hope that helps a little.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
No Comments

Please login or register to post comments.