May 16th, 2008
As you might already know, Complete Statement (Ctrl+Shift+Enter) is one of major enhancements in Code Completion brought by ReSharper 4.0. This feature inserts necessary syntax elements to complete the current statement or another language construct, and gets you in position to write your code further.
Complete Statement is currently known to work with the following language constructs:
- Type members: class, interface, struct, enum, delegate, field, event, and method declarations;
- Statements: if, while, do, switch, using, lock, continue, break, and return statements; case and default clauses; conversion of single-line statements to block statements;
- Expressions: invocation, element access, string/char literals; object, member, and collection item initializers; expressions that create anonymous types and implicitly typed arrays.
Below are a number of specific examples of the assistance that Complete Statement provides in specific contexts.
Class declaration
Before Complete Statement:

After Complete Statement:

Delegate declaration
Before Complete Statement:

After Complete Statement:

Method declaration
Before Complete Statement:

After Complete Statement:

Nested method invocation
Before Complete Statement:

After Complete Statement:

if statement
Before Complete Statement:

After Complete Statement:

case clause
Before Complete Statement:

After Complete Statement:

Conversion of a single-line statement into block
Before Complete Statement:

After Complete Statement:

Element access expression
Before Complete Statement:

After Complete Statement:

May 5th, 2008
JetBrains announces dotTrace 3.1 - the new minor release of the simple and super-fast profiling tool for .NET developers!
We keep working on a major upgrade that will represent a big step in terms of functionality and scalability, but as an intermediate release, we’d like to introduce dotTrace 3.1. The highlights of this new version include:
- Support for Visual Studio 2008 and .NET Framework 3.x. You can now launch dotTrace from Visual Studio 2008 and profile solutions running under latest versions of .NET Framework.
- Support for Windows Vista and Windows Server 2008.
- Support for web-based JetBrains License Server, a utility that serves as a central source of license tickets and distributes them between workstations seamlessly.
- A new floating license that any member of your development team can use.
- Stability and performance improvements.
As usual, you can download a 10-day evaluation copy. Current dotTrace 3.0 customers can upgrade for free.
For more details on changes in dotTrace 3.1 as compared to 3.0, see Release Notes.
May 4th, 2008
ReSharper extends Visual Studio’s native IntelliSense with a set of three Code Completion features to make it more convenient and adaptable.
ReSharper’s Code Completion is a natural candidate for in-detail review. However, a full-fledged description is out of agenda, because Ilya Ryzhenkov’s Code Completion with ReSharper says it all. Or does it?
While his post is comprehensive, it was written back when R# 3.0 EAP was far from being complete. That said, a number of corrections and additions are due to be announced as of late R# 4.0 EAP.
- There are still three Completion features, but what was previously known as Basic Completion is now called Symbol Completion, while Type Name Completion was renamed to Import Symbol Completion.
- In ReSharper 4.0, all three completion features support CamelHumps - for example, you can complete a long type name by entering only its uppercase characters (can you say “DecoderReplacementFallbackBuffer”? forget it - just type DRFB instead)
To make sure it works, clear the Case-sensitive prefix matching check box in Resharper | Options | Environment | IntelliSense | Completion Behavior. Note that the Use CamelHumps check box in ReSharper | Options | Environment | Editor doesn’t have any impact on how CamelHumps works in completion.
- Needless to say, Code Completion as of R# 4.0 supports C# 3.0 features, including:
- Extension methods. Both Smart Completion and Symbol Completion are enabled to suggest extension methods. Import Symbol Completion works after dot for extension methods and inserts required using directives:

- Object and collection initializers. Smart Completion in initializers displays available properties/fields to initialize:

- Lambdas. Smart Completion generates lambda-expression syntax as an alternative for anonymous and named methods:
- Complete Statement. Complete Statement is a feature that inserts necessary syntax elements with a simple shortcut - Ctrl+Shift+Enter. It comes to the rescue in numerous situations, including auto-closing parentheses, adding semicolons, completing if, while and for statements, declaring classes, methods, and structs, and so on:
- There are also some minor changes and fixes, including completion for boolean fields in XAML files, auto-inserting closing single quotes in XML attributes, and so forth.
Additional references
April 30th, 2008
You might have already heard about the brand new JetBrains Development Academy. Launched in April 2008, the Academy fosters a community of experts and evangelists to champion best development practices and promote software innovation worldwide.
The JetBrains Development Academy serves as a connection point for developers who strive to adopt top methodologies and use JetBrains products to help them achieve that goal. It plans to provide support for Java and .NET user groups, support educational institutions, conduct in-place presentations, publish articles on the Academy’s website, and help users learn about popular and innovative technologies. These benefits will be provided courtesy of the Academy members, who are recognized experts representing various areas of software development.
The Academy website also features a Q&A section, where you can ask questions, get answers and gain valuable insight into the technologies, products and best practices relevant in today’s world of software development.
April 11th, 2008
Thanks for sharing your thoughts and demands in the previous post. Your input will hopefully push us to pay more attention to screencasting in the near future.
Meanwhile, in case that you’ve missed it, take a look at our existing collection of demos.
April 7th, 2008
This post serves to gather feedback regarding any particular ReSharper features that you’d like to see reviewed in this blog.
Please have your say!
Updated! This post is not a place to suggest new features/improvements for whatever version of ReSharper. The most efficient way to do it is using JIRA.
April 3rd, 2008
Until recently (that is, until R# 4.0 nightly builds became available), ReSharper had three levels of code analysis:
- Errors (to highlight uncompilable code)
- Warnings (to mark code items that don’t prevent your code from compiling but may nevertheless represent serious coding inefficiencies)
- Suggestions (to draw your attention to things that are not necessarily wrong but useful to know)
R# 4.0 introduces a new, considerably less intrusive level of code analysis results - hints.
Unlike errors, warnings and suggestions, hints are not taken into account when you navigate to next/previous highlights, not shown in the Marker Bar and therefore do not influence the color of the Status Indicator. A hint simply brings your attention to a particular code detail and recommends a way of improvement. Code items that have associated hints are highlighted with a solid green underline. Move the mouse pointer over a highlighted item to view the corresponding hint in a tooltip:

Putting the caret at a highlighted item allows you to display the hint in the status bar.
As usual, for any code inspection item that is shown as a hint by default, you can modify inspection severity to display it as a suggestion, error or warning. You can do that in one of the two alternative ways:
- using the general list of code inspection items in ReSharper | Options | Code Inspection | Inspection Severity, or
- using an item-specific Inspection options dialog box (which is new in ReSharper 4.0, by the way) that you can open by Alt+Entering a specific hint and choosing Inspection options for [name of inspection item] in the drop-down list.
In practice, hints turned out to be a convenient way for ReSharper to suggest migrating to C# 3.0 features without disturbing your coding sessions too much. That’s a reason why they’re somewhat left out of ReSharper’s traditional “show code highlights and let user navigate between them” routine.
March 25th, 2008
Personally, I’ve been a fan of comparison tables for ages, and now there’s one that hits the nail on the head!
Ladies and gentlemen, please welcome ReSharper 3.1 vs Plain Visual Studio - face to face, feature to feature!
March 23rd, 2008
Sometimes it is necessary to create method overloads that just pass default values to other overloads. ReSharper allows you to do this quickly and easily.
Take this simple method for example:

We need to take the CreateUser method and add a new parameter to it. However, we also need to keep the old CreateUser method signature around for other code that still uses that version of the method signature. Using ReSharper’s Change Signiture (Control-F6) feature will allow us to create an overloaded method to solve our problem.

When the Change Signature dialog opens for this method, we will go ahead and add our new email parameter to this method.

In the above screenshot, notice the option “Delegate via overloading method” circled in red. Clicking this box is what will take the signature changes and turn them into a new overloaded method.
When the changes are ready, clicking Next in the Change Signature dialog will now produce the following code.

Notice that in the SaveNewUser method, the original method signature remains intact, but it is now delegated through an overloaded method. The CreateUser method now has two overloaded variations, the delegating method and the main method, where we can now add code to handle the new email parameter.
Jeff Pennal
JetBrains .NET Evangelist
|
|