Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set the default Scope in IntelliJ 12 for Find Usages?

Tags:

I've returned to IntelliJ after a long hiatus for Android development so I'm getting used to it again. The problem I have is that for example when you want to see where is a class being used, you'd position the caret in the class declaration and issue cmdaltF7 (on Mac OS X) to Find Usages, which is returning stuff from mapping.txt and seeds.txt as well as the .java results, and even tho I can set up the defaults by doing shiftcmdaltF7 and un-tick the: search for text occurrences and even change the scope from Project Files to a custom scope (for example), these options are not saved when I invoke Find Usages again.

Does anybody know of a way to personalize the Find Usages so it's more close to what Eclipse would do? (I.e., find the real usages instead of a text search for occurrences).

like image 772
Martin Marconcini Avatar asked Mar 25 '13 22:03

Martin Marconcini


1 Answers

Reporting back from the future: the behaviour described in the question has now been implemented (Intellij issue mentioned in the comments).

To configure cmdaltF7 to run in a default scope, start by running it against some Symbol

Usages found

Clicking on the wrench icon, one can select one of the pre-defined scopes, or create a new one (using the ... button).

List of scopes

The + creates a new scope. Find the folder in which to look, and click Include recursively. And voila!

Create a scope

Any consequent searches will use that scope until it is changed.

like image 198
verybadalloc Avatar answered Sep 21 '22 03:09

verybadalloc