ReSharper 2018.2 – Navigation updates
Local functions in File Structure and Go to containing declaration
It’s been a while since local functions were introduced in C# 7.0. As many developers are making use of them for various purposes, we have expanded support for them in ReSharper and made it easier to navigate to local functions.
For example in the File Structure tool window (Ctrl+Alt+F), local functions are now displayed as first-class citizens. We can navigate directly to a local function from this tool window: no more need to scroll trough code to find a specific local function.
Similarly, Go to containing declaration (Ctrl+[) now helps us to quickly navigate to the declaration of local function from any position within its body.
Local functions are also supported in other navigations such as Go to Next/Previous Member (Alt+Down / Alt+Up).
Smarter Search Everywhere for function signatures
Using ASP.NET and getting a “yellow screen of death” displaying an exception and stack trace? ReSharper comes with an excellent Stack Trace Explorer that helps to display and navigate stack traces copied from the clipboard.
However, sometimes it may be useful to search for “just one line”. Let’s say our stack trace contains a line:
at ConsoleApplication1.PeopleRepository.GetAll(String) in c:\code\ConsoleApplication1\ConsoleApplication1\PeopleRepository.cs:line 15
With ReSharper 2018.2, we can now copy
ConsoleApplication1.PeopleRepository.GetAll(String) and navigate directly to the correct method overload in our codebase, using Search Everywhere (Ctrl+T):
Note that Search Everywhere will be able to find both of these variants:
// Search Everywhere can find this variant: ConsoleApplication1.PeopleRepository.GetAll(String) // And this variant as well: ConsoleApplication1.PeopleRepository.GetAll(String) in c:\code\ConsoleApplication1\ConsoleApplication1\PeopleRepository.cs:line 15
Ignore files in search and navigation using file mask
Sometimes, it can be useful to exclude certain files and folders from ReSharper’s search and navigation. For example when doing web development, we may want to exclude the
node_modules folder in case we don’t see ourselves navigate to library files. Another scenario that could be useful for Windows Forms developers could be excluding all
*.Designer.cs files in our solution.
While it was already possible to exclude files and folders for search and navigation in ReSharper, we have now added wildcard support. So that second example now works, too! In the ReSharper settings under Environment | Search & Navigation under Elements to skip, we can specify files and folders that will be ignored by navigations:
Different wildcard formats are supported:
?will match one character
*will match one or more characters
**will match files and folders recursively
Grab the latest ReSharper 2018.2 and give it a try! Or try out Rider 2018.2 – our standalone .NET IDE. We’d love to hear your feedback!
Subscribe to Blog updates
Boost Code Quality with Qodana and GitHub Actions
It’s been roughly half a year since we introduced Qodana to .NET in our blog post about how to elevate your C# code quality with Qodana. Since then, we’ve been quite busy! Qodana went out of preview and into GA. Furthermore, we greatly improved the integration with our IDEs, providing an effortless …
Critical Thinking in an AI-Powered World
Critical thinking techniques for use with JetBrains AI Assistant.
How To Use AI Assistant to Generate Test Data For .NET Applications
How To Use AI Assistant to Generate Test Data For .NET Applications for better unit tests.