Archive

Author Archive

Duplicate Real-time detection in Visual Studio

December 20th, 2011 Comments off

CodeRush Duplicate detection runs automatically inside Visual Studio IDE in a background thread. To enable it, go to the Duplicate Code options page in the Options Dialog and toggle its availability. Note that you should also have the Code Issues Analysis feature enabled. Once you enable detection, it starts scanning your solution for code duplication. You will see an animated icon in the lower right corner visually indicating the progress of duplicate code analysis:

CodeRush Duplicate Code editor icon

Read more…

Duplicate Detection and Consolidation overview

December 20th, 2011 Comments off

This is a blog series overview of the Duplicate Detection and Consolidation (DDC) feature shipped in DevExpress CodeRush Pro productivity tool for the Visual Studio IDE.

Background

Duplicate code, or sometimes referred to as a clone, is a program source code fragment that is very similar to another code fragment. A code clone may occur more than twice, either within a single program or across different programs owned or maintained by the same group of developers. Code duplication is considered an expensive practice that should be avoided because it complicates the maintenance and evolution of the software.

Read more…

Declaring fields using CodeRush consume-first declaration features

December 16th, 2011 Comments off

Unlike the local variable declarations, fields are simply variables that are declared directly within the code block of a class or a structure. Fields are declared in the type block by specifying the access level of the field, the type of the field and the name of the field. A field may also include a readonly modifier. This type of field can only have its value set directly in its declaration or from within a constructor of its containing class.

Read more…

Declaring locals using CodeRush consume-first declaration features

December 16th, 2011 Comments off

Local variable declarations are the most often used types of declarations in code. A local variable is a type of variable declared by local variable declaration inside a block the variable is intended to be local to. The local variable declaration explicitly defines the type of the variable that has been declared along with the identifier that names the variable. You can also declare implicitly typed local variables, whose type is inferred by the compiler from the expression.

Read more…

DXCore Services – Hints

December 14th, 2011 Comments off

The Hints DXCore service provides access to hinting services for showing/hiding Shortcut hints, BigFeedback hints, and other discoverability services.

Read more…

DXCore Services – Windows

December 14th, 2011 Comments off

The Windows DXCore service provides methods for Visual Studio windows manipulation.

Read more…

DXCore Services – Visual Studio Settings

December 14th, 2011 Comments off

The VSSettings (Visual Studio Settings) DXCore service provides access to the Visual Studio IDE settings (Visual Studio version, environment settings, fonts and colors settings, etc).

Read more…

Code Issues for Switch (Select) and Case statements

December 14th, 2011 Comments off

A switch statement executes logic, dependent on the value of a given expression (parameter). The types of values a switch statement operates on can be boolean, enum, integral types, and strings. Each switch statement can contain any number of case statements, but no two case constants within the same switch statement can have the same value. Each case statement defines a value to compare against the original expression. You may also include a default label following all other case statements. If none of the other choices match, then the default choice is taken and its statements are executed. If there is no default label, control is transferred outside the switch.

Read more…