How-To's

ReSharper Ultimate 2016.3 EAP 5

We have recently published yet another build of ReSharper 2016.3 EAP, and let’s now look what’s inside.

ReSharper

In mainline ReSharper, there is a number of fixed issues and some new features:

Dynamic completion of package names

In project configuration files (project.json, package.json, and bower.json), ReSharper can now suggest available package names based on your input:

Dynamic completion of package names

Language injections

In the first build of 2016.3 EAP, we added support for CSS and JSON as embedded languages, and now we’re adding support for JavaScript. This means that ReSharper will be able to parse the contents of a string literal, and treat it like a JavaScript snippet – with syntax highlighting, code completion, inspections, quick-fixes and so on.

As before, this can be enabled using a specially formatted comment – //language=javascript – which means the marker and the injected language will be shared across the team. If you don’t wish to modify the file, you can also use Alt+Enter and the “Mark as” submenu, which stores a tracking marker in ReSharper’s caches, but mind that the marker is local to your machine only:

Marking string literal as JavaScript

ReSharper also automatically injects languages in certain known scenarios, such as injecting JavaScript into AngularJS templates, or CSS in jQuery’s $[] indexer. For C# code, it will also automatically inject based on usage of the HtmlElementAttributes and HtmlAttributeValue annotation attributes.

This build also includes a new options page for language injections, allowing you to selectively enable or disable built-in automatic injections:

Automatic Language Injection options page

ReSharper C++

Among other fixes in ReSharper C++, this EAP build fixes the problem of user output from tests in Boost 1.62 and improves performance of the Boost.Test runner.

dotMemory

dotMemory now checks your application on finalized objects and objects queued for finalization. A new Finalizable objects inspection on the overview page shows such objects sorted by their type.

dotMemory Finalizable Objects Inspection

There are two problems in having finalized objects:

  • The finalization thread is run unpredictably, which, first, may cause problems in case you want to reclaim the unmanaged resources as quickly as possible, and, second, may lead to sudden performance drops.
  • The lifetime of finalizable objects is extended by at least one more garbage collection cycle (when garbage collector reaches such objects, it first promotes them to the next generation).

Therefore, it is more effective to implement the IDisposable interface for these objects. In this case, you reduce objects’ lifetime and explicitly run all disposal routines via the Dispose() method.

dotPeek

dotPeek introduces new ways to explore metadata of .NET assemblies – in addition to displaying and searching for metadata tokens, you can now dig through all metadata items (tables, blobs, strings, etc.) in the Metadata node that appears under each assembly. Noticeable features of this node include:

  • Automatically finding and displaying usages of metadata table items.
  • Decoding and displaying values of blob items.
  • On double-click, decompiling and displaying code that corresponds to the metadata item.
  • Exploring PE file headers.

Metadata tree in dotPeek

Download

If you haven’t done so yet, please download the latest 2016.3 EAP build and give it a try. As usual, we welcome your feedback via issue trackers of the corresponding products: ReSharper, ReSharper C++, dotMemory, and dotPeek.

image description