Archive

Posts Tagged ‘Snippets’

CodeRush Dynamic templates and dynamic lists

October 23rd, 2012 Comments off

Template dynamic lists make a single code template universal and dynamic. For instance, a template for a variable declaration can be configurable on the fly by specifying its type. In other words, a template can be expanded differently depending on the selected dynamic list. A dynamic list contains a list of possible template alternative expansions (types when used with a variable template) for a single template.

Read more…

CodeRush Templates option page

October 2nd, 2012 Comments off

The Templates option page is required to control your collection of built-in and custom CodeRush code templates. When you open the Templates option page, CodeRush will locate the last template you used by default. This is an excellent way to explore and learn how templates are built. When a template expands, if you want to see how it is built, just bring up the Template options page and the last template expanded will be displayed. Here is what it looks like:

Read more…

Creating simple templates step by step

April 26th, 2012 Comments off

Once you know recommendations for creating new templates and have the Templates options page open, you can start writing a template expansion starting from plain text. Any plain text typed or pasted into the Expansion area will be expanded as is, for example:

Read more…

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…