CodeRush and Visual Studio bookmarks

May 30th, 2012 Comments off

When you work on large projects you may need to revisit several areas of your code on a regular basis. CodeRush allows you to store such important locations in the code and move back to them in the future by using bookmarks. Visual Studio provides a similar bookmarks feature, which allows you to mark places in your code that you would want to come back to. Let’s see what differences between the CodeRush and Visual Studio bookmarks are.

Read more…

Troubleshooting the DXCore/CodeRush plug-in loading

May 15th, 2012 2 comments

Sometimes CodeRush/DXCore plug-ins may not be loaded correctly. Here is a brief instruction if you’d like to investigate and fix the loading of the plug-in in question.

Read more…

How to speed up the issue investigation time and help to eliminate complex problems

May 15th, 2012 Comments off

If you ran into an unusual problem, you may greatly help the DevExpress Support Team in investigating the issue by providing as much information as possible. Having this information will increase the chances and the speed that the issue will be fixed. Once the issue is fixed, you are always welcome to request a daily build containing the fix from the Support Team.

Read more…

Changing global identifiers style in CodeRush

May 14th, 2012 Comments off

Identifiers are names of various program elements in the code that uniquely identify a code element like namespace, class, interface, method, variable and others.

There are numerous identifiers style conventions which include usge of the Pascal or camel casing, use of underscore as a prefix, etc. That is why CodeRush allows you to configure the identifier style that will be globally applied for all features that create or generate new code: refactorings, code providers, code templates and others.

Read more…

Refactoring using statements with CodeRush/Refactor!

May 9th, 2012 Comments off

As many of you know, the using statement is a good tool for managing types which will be accessing unmanaged resources. The using statement provides a simple and convenient syntax that ensures that objects that implement the IDisposable interface are correctly disposed.

If the object is not disposed, CodeRush highlights the undisposed variables with the “Undisposed local” code issue:

Read more…

Generating the Switch/Select statement for enumeration variables

April 30th, 2012 Comments off

CodeRush with Refactor! Pro provides a code provider that allows you to easily generate a switch (C#) or Select (VB) statement for all elements of the enumeration of the active identifier of the enumeration type. The Create Case Blocks from Enum code provider shows a part of the resulting code before applying it. It is possible to apply the code provider on a local variable or a parameter:

Read more…

Refactoring multi-conditional statements: the switch statement and the “if-else-if” ladder

April 30th, 2012 Comments off

There are two methods for multi-conditional processing: the “if-else-if” ladder and the switch statement. The If-Else-If ladder is a combination of ‘if’ and ‘else’ statements that is used to test a series of conditions. If the condition of the first ‘if’ statement is met, the code within the ‘if’ executes. Otherwise, the program flow is passed to the neighborhood ‘else’ statement, in which the next ‘if’ statement is located. This continues as a series of ‘if’ statements nested within the previous ‘else’ statements until all conditions have been checked. A default branch or a code block may be executed in a final ‘else’ statement if no condition is previously met.

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…