Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij Idea find all deprecated usages in the project

I upgrade a language level in IntelliJ Idea in a quite big project and I would like to find all deprecated method usages left - I look for all the striketrough occurrences. I have found a similar question for PhpStorm where is suggested an approach:

  • CodeRun Inspection by Name... → Enter inspection name: deprecated

This is not available in the IntelliJ Idea IDE. I work with 2018.3.3 version. Is there a comfortable way to search for all the occurrences?

like image 493
Nikolas Charalambidis Avatar asked Mar 19 '19 09:03

Nikolas Charalambidis


People also ask

How do I see all usages in IntelliJ?

In the editor, select a symbol for which you want to see the usages. From the main menu, select Edit | Find Usages | Show Usages In Code Ctrl+Alt+F7 . The usages window shows the current scope and total count of usages. If you want to quickly switch to the default scope, press Ctrl+Alt+F7 .

How do I search specific methods in IntelliJ?

From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . IntelliJ IDEA places the highlighted string into the search field.

How do I show problems in IntelliJ?

The list is updated as you switch between files in the editor. You can select any problem in the window and press F4 or double-click any problem to jump to the corresponding line in the editor.

Do deprecated methods still work?

It can still be used, but eventually it will not work with other things because it is no longer being supported. Best practice is to use the requested alternative to any depreciated type.


1 Answers

The action you are looking for is in

  • Analyze -> Run Inspection by Name

The inspection "name" is still deprecated, however you will then need to chose a specific inspection in the drop down (e.g. "Deprecated API usage" for Java OR for PHP)

like image 199
Nikolas Avatar answered Sep 21 '22 20:09

Nikolas