Archive

Author Archive

How to enumerate solution and source code items using DXCore

April 6th, 2011 Comments off

One of the trivial tasks when developing a DXCore plug-in is the enumeration of the active solution items, such as projects, source files, then interfaces, classes, methods, properties, statements, etc. A similar task is to get an active element (in other words, the element where the editor caret is located) inside the active source file to start working with one.

All of the items of the solution are represented by the DXCore classes, located in the “DevExpress.DXCore.Parser” assembly inside the “DevExpress.CodeRush.StructuralParser” namespace. Consider, we have a standard Visual Studio solution, DXCore uses the following classes to represent its hierarchy:

Read more…

Differences between CodeRush Pro and CodeRush Xpress

April 1st, 2011 Comments off

Let’s compare the feature sets of the free CodeRush Xpress version and full CodeRush Pro version bundled with Refactor! Pro. Remember, that CodeRush Xpress is completely free to all Visual Studio 2008 and 2010 C# and Visual Basic developers. Its features are listed on the appropriate page.

The table below is almost a full list of features these two products provide. The comparison is made in the following areas:

Read more…

IDE Tools trial period, expiration and registration processes

March 31st, 2011 Comments off

Full versions of CodeRush Pro and Refactor! Pro have a free trial period that lasts for 30 days. The trial period starts once these products are installed. The functionality of the standard products, when installed in trial mode, is not reduced during this period.

Unfortunately, there’s no place where you can see in what mode your IDE Tools are installed – trial or registered. However, there are a few options which may let you know when your tools will expire. These options are available on the Evaluation page in the Options Dialog:

Read more…

How do I know if I have the latest version of IDE Tools installed

March 28th, 2011 2 comments

First of all, you need to know what version of IDE Tools is currently installed on your machine. Sometimes it is not as obvious as it should be, especially for the free product versions like CodeRush Xpress, Refactor! for ASP.NET, Refactor for C++. If you have the DevExpress menu inside the Visual Studio environment, go to the DevExpress | About menu item:

DevExpress About menu item

Read more…

How to request a daily build of DevExpress IDE Tools

March 28th, 2011 Comments off

If you have registered a bug via the DevExpress Support Services, you are welcome to request a daily build, containing the fix for the issue, as soon as it is marked as fixed. Click on the “Request Fix” link on the issue’s page:

DevExpress Support Center - Request Fix button

Read more…

Refactorings – Flatten Conditional

March 22nd, 2011 Comments off

This is one of the most powerful refactorings for conditionals – it helps you to simplify conditional statements by unindenting all or a portion of the conditional statement which improves the clarity of the code. This refactoring includes several different refactorings mentioned in Martin Fowler‘s book, and a few others. These refactorings are applied, depending on the conditional blocks you have inside the source code. Here they are:

Read more…

Code Issues – Environment.NewLine can be used

March 19th, 2011 Comments off

Cause:

When working with strings that contain multiple lines of text, you have to add newline characters to your strings, so each line is separated with a line break. Line breaks are often added by inserting a carriage return line feed escape characters. This can cause cross-platform compatibility issues, because your code might end up being compiled under Mono in Unix, for example.

The “Environment.NewLine can be usedCodeRush code issue shows a suggestion to convert escape characters (“\r\n“) inside your code into the constant value defined in .NET Framework. Changing these strings to the Environment.NewLine constant will, firstly, improve the code clarity, so you don’t have to use escape characters, and, secondly, fix potential platforms portability issues – so, you don’t have to be concerned about such problems.

Read more…

Code Issues – Redundant else statement

March 19th, 2011 Comments off

Cause:

The else statement is redundant when it doesn’t contain any code, and can be safely removed to improve readability. The type of code issue is a dead code.

Sample:

CodeRush Redundant 'else' statement

How to fix:

CodeRush Redundant Else Statement Fix

—–
Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: any
Updated: Nov/12/2012
ID: C084