Archive

Archive for the ‘Shared Source’ Category

Organizing source code and sorting class members using CodeRush

April 14th, 2011 2 comments

Reorganization of the code is a great practice to improve code readability. If you prefer to sort your type members like this:

class {
private fields
constructors
public properties
public methods
private methods
}

or any other order, you can use the Member Organizer CodeRush plug-in for this purpose.

Read more…

Visualization – Comment Highlighter

March 10th, 2011 Comments off

Occasionally you may need to note a place in a source file that needs to be revisited later for correction or improvements. There are three standard codes used to designate such places: TODO, HACK and UNDONE. Visual Studio has the built-in Task List tool window, which shows the list of such comments. To open the list, go to View menu -> Task List:

Visual Studio Task List

Read more…

Coding Helpers – Move to Region

February 3rd, 2011 Comments off

The Move to Region (also known as Member MoverCodeRush feature extends the Member drop down menu with a menu item that allows you to move the active member to a region according to your preference:

CodeRush Member Icons and Move to Region preview

Read more…

Unbound Actions – Google Active Word

January 11th, 2011 Comments off

The “Google Active Word” action is one of the simplest, open source sample features, useful for beginners learning CSharp .NET language in Visual Studio. It performs a search in Google for the word at the editor caret, using the following link:

http://www.google.com/search?hl=en&lr=&ie=UTF-8&edition=us&q=C%23+.NET+ActiveWord

where “ActiveWord” is a word at the editor caret.

Read more…

CodeRush Clipboard History

December 21st, 2010 Comments off

Clipboard History is a visual multi-clipboard viewer and manager, which makes copying and pasting of data a little easier. It allows you to extend the facility of Windows system’s clipboard, beyond its default capability and the disadvantage that you can only copy once before pasting. The next time you copy or cut another snippet, you overwrite the existing clipboard contents. CodeRush helps to keep the clipboard history that you can use to paste any selected fragment again. You can have up to 64 independent fragments and work with each of them separately, persisting these fragments across Visual Studio sessions for future use. If you copy a code fragment, Clipboard History will maintain its syntax highlighting as well:

Read more…

Unbound Actions – Reopen last closed document

December 20th, 2010 Comments off

Have you ever accidentally closed a document in Visual Studio? To reopen the file, you have to browse it in the Solution Explorer or any other file explorers. Like most browsers, which have the ability to reopen accidentally closed tabs, CodeRush has the same feature. The action providing this feature is not bound to any key. So, if you’d like to use it, you have to create a new shortcut (e.g. Ctrl+Shift+T) and bind it to the ReopenLastClosedDocument action. This feature restores up to 10 of the most recently closed documents.

Read more…

Shared Source – Right Margin Line

September 24th, 2010 Comments off

Good code style suggests limiting the length of a code line to 80 characters, and only 70 characters for indented code examples to be used in documentation. The Right Margin Line helps you to visually indicate the specified line length. It doesn’t prevent typing to the right of it, but lets you to identify and break long expressions over multiple lines.

Read more…

Shared Source – Drop Marker Before Jump

September 22nd, 2010 Comments off

The “Drop Marker Before Jump” feature is intended to help you easily navigate back at the source location after the “Go to Definition” Visual Studio command is performed. It drops a marker at the text caret location, before you jump to the definition. After you finish navigation to the definitions, pressing the Esc key will move you back to each location you have visited.

Read more…