How to add support for dropping markers into CodeRush Xpress
CodeRush Pro has great Markers support, but, unfortunately, CodeRush Xpress lacks it – you can’t drop them manually using the Alt+Home shortcut. Here’s an example of how you can work around this limitation.
1. Create a new DXCore plug-in via the File -> New -> Project… -> Visual C# -> DXCore -> Standard Plug-in item. Enter a name of the plug-in if necessary and click OK:
2. On the next “DXCore Project Settings” accept the defaults (click OK):
3. Drop an Action component (DXCore section) from the Toolbox on the PlugIn1 design surface:
4. Select the Action component and fill the “ActionName” property, e.g. “MyDropMarker“:
5. Create an event handler for the “Execute” event of this Action component:
6. Inside this handler type this code line: “CodeRush.Markers.DropSelection();” (no quotes):
7. Build the plug-in project.
You’re almost done…
1. Start a new instance of Visual Studio IDE.
2. Press the CTRL+ALT+SHIFT+O to open the Options Dialog.
3. In the tree view on the left, navigate to this folder: “IDE“.
4. Select the “Shortcuts” options page.
5. Click on the “New Keyboard Shortcut” button:
6. Press the key you would like to bind to the “MyDropMarker” action, e.g. ALT+Home.
7. Select the “MyDropMarker” action in the Command combo box.
8. Modify the context of the shortcut if necessary (e.g. “Focus\Documents\Code Editor” (so it has a green tick)):
9. Save the options – click OK.
Now you have your own feature similar to the CodeRush “Drop Marker” feature.—– Products: CodeRush Xpress Versions: all VS IDEs: any Updated: Aug/30/2011 ID: C020