New Hierarchical Views in ReSharper 7

Hierarchical representations are a great way to quickly view the relationships between different structures, and in ReSharper 7 we’ve got two new ways of looking at hierarchies of interrelated entities.

Members Hierarchy

If a hierarchy has a polymorphic type member, it’s often useful to know the types where the member is implemented, and where it’s not. ReSharper now supports this scenario: all you have to do is, with the polymorphic member selected, open up the hierarchies view. This can be done either by pressing Ctrl+E,H or by opening the Inspect This menu using Ctrl+Shift+Alt+A and selecting Hierarchies:

ReSharper will then display the following window:

In the above, notice that some elements’ icons are full-color whereas other ones are dimmed. The full-color elements indicate the types where the Text member from above is in fact implemented, whereas the dimmed icons indicate types where Text is not implemented.

CSS Style Hierarchy

When working with Cascading Style Sheets, one common pattern is to nest styles, specifying more and more precise attribute the deeper you go. And, once again, ReSharper is here to help: by opening up the Hierarchy browser (via the same mechanism as for Member Hierarchy), you will be presented with the following window:

On the left-hand side you can see the style hierarchy starting from the most general down to the most specific. The Hierarchy window also provides a preview pane, so by selecting each of the elements in the tree you can see immediately the code block it corresponds to.

Both of the features described here have been designed to make complex structures easier to understand and navigate. We hope you find them useful!

This entry was posted in News and Events and tagged , . Bookmark the permalink.

2 Responses to New Hierarchical Views in ReSharper 7

  1. Leonid says:

    CSS hierarchy view in browsers (at least in Chrome and Firefox which happen to have the best dev tools) lists the selectors starting from the most specific, followed by the general ones which makes a lot more sense actually. I also don’t quite understand the tree view here – is it possible to have more than one leaf on a level?

  2. @Leonid
    AFAIK selectors can only be ordered from generic to specific in this presentation.
    As to the tree view, y, you can certainly have multiple leaves on a level if you have multiple classes that specialize a more generic class

Leave a Reply

Your email address will not be published. Required fields are marked *