Support for Microsoft Code Contracts Visual Studio Extension

Microsoft provides a very nice extension for Visual Studio that enhances intellisense to provide Code Contract and Exception information. Keep in mind the BCL for .Net uses Code Contracts. This information will appear when a) mousing over a method call b) when pressing '(' to start entering parameters.

The problem I have with point a) is that enabling Color Identifiers under Code Inspection disables the tooltip information from the Code Contracts extension when mousing over a method call. The information R# provides is a simple description of what the method does, clearly inferior to what the Code Contracts supply.

1) Is there a way to have both Color Identifiers and Code Contract information? 2) If not, can you folks make it so your intellisense implementation plays nice? I don't understand why enabling Color Identifiers takes over VS tooltip info anyway, it doesn't add any value as far as I can tell.


The problem I have with point b) is that enabling R# intellisense replaces parameter information and thus disables the information provided by the Code Contracts extension. 1) Is there a way to disable only the parameter info features of R# intellisense? 2) Can you folks make parameter info intellisense play nice with the Code Contract extension?

If you need help understanding what the extension provides here is a 5 minute video demonstrating it.

3 comments
Comment actions Permalink

Hello Seamus,

Regarding your questions:
a) Tooltips for methods
1) At the moment there's no way to have both Color Identifiers and Code Contracts
information from that extension
2) We will discuss whether we can address this problem in the future

b) Parameter information for methods
1) You can try turning off the 'Automatically show parameter info in' option
under ReSharper | Options | IntelliSense | Parameter Info and then enabling
the 'Parameter information' option under Tools | Options | Text Editor |
C# | General
2) We will certainly discuss what can be done to make parameter information
play nicer with the Code Contracts extension

Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Microsoft provides a very nice
http://visualstudiogallery.msdn.microsoft.com/en-us/85f0aa38-a8a8-4811
-8b86-e7f0b8d8c71b for Visual Studio that enhances intellisense to
provide Code Contract and Exception information. Keep in mind the BCL
for .Net uses Code Contracts. This information will appear when a)
mousing over a method call b) when pressing '(' to start entering
parameters.

The problem I have with point a) is that enabling Color Identifiers
under Code Inspection disables the tooltip information from the Code
Contracts extension when mousing over a method call. The information
R# provides is a simple description of what the method does, clearly
inferior to what the Code Contracts supply.

1) Is there a way to have both Color Identifiers and Code Contract
information? 2) If not, can you folks make it so your intellisense
implementation plays nice? I don't understand why enabling Color
Identifiers takes over VS tooltip info anyway, it doesn't add any
value as far as I can tell.

The problem I have with point b) is that enabling R# intellisense
replaces parameter information and thus disables the information
provided by the Code Contracts extension. 1) Is there a way to disable
only the parameter info features of R# intellisense? 2) Can you folks
make parameter info intellisense play nice with the Code Contract
extension?

If you need help understanding what the extension provides here is a
http://channel9.msdn.com/Blogs/Peli/Code-Contracts-Editor-Extensions
demonstrating it.

---
Original message URL:
http://devnet.jetbrains.net/message/5280876#5280876



0
Comment actions Permalink

Thanks for the reply.

Turing off Parameter Info simply turns off all parameter info.

I hope it goes without saying that a lot of folks using R# are very interested in Code Contracts. While I can't get my company to adopt unit tests, Code Contracts are a much easier sell and the static analysis is really helpful in improving code quality.

(Kind of frustrating that the static analysis feature requires ultimate/msdn sub though.)

0
Comment actions Permalink

Hello Seamus,

Did you turn on 'Parameter information' option under Tools | Options | Text
Editor | C# | General? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Thanks for the reply.

Turing off Parameter Info simply turns off all parameter info.

I hope it goes without saying that a lot of folks using R# are very
interested in Code Contracts. While I can't get my company to adopt
unit tests, Code Contracts are a much easier sell and the static
analysis is really helpful in improving code quality.

(Kind of frustrating that the static analysis feature requires
ultimate/msdn sub though.)

---
Original message URL:
http://devnet.jetbrains.net/message/5281004#5281004



0

Please sign in to leave a comment.