Archive

Author Archive

Creating CodeRush code templates overview

April 26th, 2012 Comments off

Creating CodeRush code templates is easy. They are being created on the Templates options page in the Options Dialog. The Templates options page is an excellent way to explore and learn how templates are built. When a template expands, and you want to see how it is built, just bring up the Template options page and the last template expanded will be displayed. I recommend maximizing the Options dialog and collapse the options tree view on the left by clicking those tiny blue rectangles that appear when you hover over the area between the tree view and options page area:

Read more…

CodeRush Templates language and learning basics

April 25th, 2012 Comments off

CodeRush code templates are easy to understand and learn. One of the easiest ways is to dock the CodeRush Training window inside the Visual Studio IDE. This window shows you the available templates for the current context. For example, if the editor caret is inside a namespace, the window will show you the following templates suggestion:

Read more…

CodeRush Code Templates overview

April 24th, 2012 Comments off

CodeRush code templates allow you to generate large code blocks on the fly with just a few keystrokes. The use of code templates dramatically decreases the code writing time, because it’s not necessary to type the entire block of code manually. The Templates library shipped with CodeRush contain lots of code templates for most code blocks and regular coding structures including regions and comments.

Read more…

Three CodeRush Unit Test Runner improvements

April 23rd, 2012 Comments off

The CodeRush Unit Test Runner has several improvements in the upcoming major update.

Read more…

Code fixes for code issues for switch (select) statements

April 23rd, 2012 Comments off

You might have already learned that CodeRush suggests several code issues that highlight the switch (Select in VB) statement with hints and warnings when it has suspicious code. For example, when the switch statement handles only a subset of the possible enumeration values it is checking for, this may be a sign of incomplete code.

Until recently, there were no code fixes of those code issues. Now, they appear:

Read more…

Added two actions to repeat the last operations (refactoring or navigation)

April 19th, 2012 Comments off

There are two actions added to repeat the last operations:

  1. SmartTagExecuteLast – executes the last code or refactoring provider performed. This one is useful is you’d like to apply a specific refactoring several times in a row. The default shortcut for this action is Ctrl+Alt+Y (inspired by the Redo operation shortcut – Ctrl+Y).
  2. NavigateLast – executes the last navigation provider. Useful for navigating forward and backward using the specific navigation provider. For this action, there’s no default shortcut yet – if you have any ideas, please share them in the Comments section to this post.
—–
Products: DXCore, CodeRush Pro
Versions: 12.1 and up
VS IDEs: 2008 and up
Updated: Apr/19/2012
ID: U012

How to add assembly and project references to a specific project using DXCore

April 19th, 2012 Comments off

To add an assembly reference, you first require a reference to the target project. To get one, you can use the Source Model DXCore service, for example:

ProjectElement projectElement = CodeRush.Source.ActiveProject;

Read more…

How to add new projects to a solution programmatically using DXCore

April 19th, 2012 Comments off

You can add new projects from the Visual Studio built-in project templates to the current solution using the DXCore Solution service:

CodeRush.Solution.AddProject("ProjectTemplateName", "UniqueProjectName");

Read more…