I am using Intellij IDEA 14 Ultimate. When I search find usages, in find view there is a info like
Searching for usages in project files" and doesn't return any result. Scope is "whole project".
I have also IntelliJ 14 Community Edition. When it try find usages in community edition, it works.
Do you have any idea?
As lena said, the following should fix it for you: Click File -> Invalidate Caches / Restart.. Click the button "Invalidate and Restart" After restart, try run the search again.
In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Inlay Hints | Java. From the available options, select Code Vision and enable the Show hints for: and the Usages checkboxes. Click OK to save the changes. When you return to your code in the editor, IntelliJ IDEA will show you the usages of Java symbols.
Press ⌥F7 (macOS), or Alt+F7 (Windows/Linux), to bring up the Find Usages tool window. You can search a single file, your whole project, or customise the scope. You can also configure the color of the usages highlighting or disable the automatic highlighting of usages.
The reason IntelliJ couldn't find declarations was that the subprojects were not built. After investigating why subprojects were not built, I found out that using "auto-import" was breaking the subprojects. After importing the project from build. gradle without auto-import, it worked for me.
I had exactly the same problem, so for people looking for the quick answer, try
File
-> Invalidate Caches / Restart
Thanks to user @yole and his comment.
If it doesn't solve by File -> Invalidate Caches / Restart
then make sure your 'src' folder is marked as 'Sources' in project structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With