Archive for April, 2008

JetBrains Development Academy To Serve the Community

Wednesday, 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.

Technorati tags: ,

Generating object initializers with ReSharper

Friday, April 11th, 2008

ReSharper provides both a quick-fix and a context action to transform assignment statements into C# object initializers, and both are called “Use object initializer”.
 
So what’s the difference between them?
 
Suppose that you create an object with three assignment statements:
 

 
Putting the caret over the “new” keyword lets you apply a quick-fix that will put all assigned fields into an object initializer:
 

 
Putting the caret over the object variable or a field name in any of the tree assignment statements lets you apply a context action that will put only this assignment in the object initializer:
 

 
That is, using the context action, you can selectively put field assignments into the object initializer, leaving some of them to be declared explicitly.

Technorati tags: , , , ,

Feedback received

Friday, 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.

Feedback wanted

Monday, 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.

ReSharper in Detail: Hints - a New Level of Code Inspection in ReSharper 4.0

Thursday, 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.

Technorati tags: , , , , ,