Find Usages: no place for symbols to hide

Find Usages lets you quickly see all the places where a symbol (class, method, property, variable, etc.) is used. Unlike textual search, Find Usages in AppCode works on the semantic level and shows you actual usages, not just text matches. Moreover, it understands and can be used with localization, Core Data and xib files.

Finding usages
Just press Alt + F7 and get a list of references grouped by type of usage, module and file. The first results are displayed immediately. When you have a huge project, more results appear as the IDE finds them.

By default the results are not grouped by usage type, but you can enable this by pressing Ctrl + T or by clicking the corresponding button on the sidebar.

Options
You can adjust the search options to include text occurrences, not show results when there’s only one usage, or limit the search scope by using Shift + Alt + Cmd + F7 shortcut or clicking the first button on the right panel with search results.

Quick popup
If you want to see the results quickly without leaving the editor, simply press Alt + Cmd + F7.

Highlight usages
By default, AppCode highlights the usages of a symbol at the caret within the opened file in the editor.

However, you can disable this feature by deselecting Preferences | Editor | Highlight usages of element at the caret and calling it via Shift + Cmd + F7 instead, only when you need it.

This way you can highlight more than one symbol if you want, and to remove the highlighting by simply pressing Esc.

That’s it for today! Stay tuned!

This entry was posted in Tips'n'Tricks. Bookmark the permalink.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">