Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Ultimate 14 find usages not working

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?

like image 806
karlkeller Avatar asked Dec 24 '14 09:12

karlkeller


People also ask

Why search is not working in IntelliJ?

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.

How do I enable usage in IntelliJ?

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.

How do I find references in IntelliJ?

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.

How do you fix Cannot find declaration to go to in IntelliJ?

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.


2 Answers

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.

like image 60
Eel Lee Avatar answered Sep 17 '22 16:09

Eel Lee


If it doesn't solve by File -> Invalidate Caches / Restart then make sure your 'src' folder is marked as 'Sources' in project structure.

like image 45
Abhijeet Jadhav Avatar answered Sep 17 '22 16:09

Abhijeet Jadhav