Archive

Archive for the ‘DXCore’ Category

How to use CodeMetricProvider control to build you own code metric

December 9th, 2010 Comments off

Let’s implement the Comment Density code metric using the CodeMetricProvider DXCore component. This code metric provides the ratio of comment lines to all lines and indicates the comments coverage of your source code. We are going to calculate it in percents for all type declarations like this:

Comment Density = (comment lines / code lines) * 100

The density of comments metric value will be between 0 and 100 percents, and can be used as a quality indicator to see how much of the code is commented. So, if the comment density value for instance is below a certain value defined by the project manager, it indicates that the code is under commented. Let’s assume that what’s recommended is a commenting of at least 15% of the code and a maximum of 30%.

Read more…

DXCore Components – CodeMetricProvider

December 9th, 2010 Comments off

The CodeMetricProvider component calculates and returns a code metric used in the Metrics tool window of Refactor! Pro and the Show Metrics CodeRush feature. See the “Show Metrics” post to learn more about software metrics.

Read more…

How to use BigHint DXCore component

December 6th, 2010 Comments off

To make the big hint component work, execute the following steps:

  1. Drop the BigHint control on the PlugIn design surface
  2. Fill the Title property with a short message
  3. Fill the Text property with a message or some information
  4. Call one of the ShowAt() overloads inside your code.

Read more…

DXCore Components – BigHint

December 6th, 2010 Comments off

Big hints are large tool tips which describe the active feature or provide other helpful information. This is what the big hint looks like:

DXCore Big hint preview

Read more…

How to use IssueProvider DXCore component

December 2nd, 2010 6 comments

Let’s assume that we need to highlight all local variables with incorrect names using CodeRush Code Issues technology. For example, the name is incorrect if it starts from an upper case letter instead of a lower case letter. Follow these steps to get the IssueProvider component working:

  • Create a new DXCore plug-in if you haven’t done it yet
  • Drop the IssueProvider control on the plug-in designer surface
  • Fill the ProviderName property of the IssueProvider
  • Fill the Description property of the IssueProvider if needed

Read more…

DXCore Components – IssueProvider

December 2nd, 2010 Comments off

The IssueProvider component represents a particular code issue check provider, which verifies the source code. This component is a part of the Code Issues Analysis Engine from the CodeRush. The newly created provider will be automatically registered once DXCore/CodeRush is loaded. You should be able to see it appear on the Editor | Code Analysis | Catalog options page in the Options Dialog.

Read more…

DXCore Services – ThirdPartyExtensions

November 22nd, 2010 Comments off

The ThirdPartyExtensions service provides methods to check whether or not specified Visual Studio 2010 extensions are installed and/or enabled. This service also contains a few useful properties for the Microsoft Power Tools extension.

Read more…

DXCore Services – ActionHint

November 22nd, 2010 Comments off

The ActionHint service provides methods for manipulating of action hints and tweaking its settings for the current Visual Studio session.

Read more…