I'm using IntelliJ IDEA v12. When I import a project, there’s a strikeout/strikethrough line on the method which has the annotation @Deprecated
, but I used alt+enter to disable it. So, how can I reactivate this feature? I want to display that strikethrough, thanks!
5 Answers
Open Settings
-> Type Inspections
to go to inspection settings -> Type Deprecated
to find out all deprecated related inspection settings -> Check Deprecated API usage
.

- 4,142
- 21
- 28
-
Thanks, And is in Idea, it will not add strikethrough for the method in Interface? Now, the implements method has the strikethrough – Awakening Nov 13 '13 at 07:59
-
@Awakening AFAIK, it won't add strike through for the method in interface. – longhua Nov 13 '13 at 08:15
-
Hi, Could you teach me how to @ you? I type "@lhuang" at the front of this text comment, but didn't work, the word "@lhuang" disappeared when i click "Add Comment". Thanks. – Awakening Nov 13 '13 at 09:56
-
@Awakening please check this link: http://meta.stackexchange.com/questions/43019/how-do-comment-replies-work. – longhua Nov 13 '13 at 11:39
-
Related (Deprecated class): It appears that if Deprecated class B references Deprecated class A, then B will not be struckout in A; however any other non-Deprecated classes referring to A or B will have those references struckout. – cellepo Nov 09 '17 at 20:11
-
I dont have a entry `Deprecated APi usage` and all other deprecated inspectations are activeted – Radon8472 Jan 21 '20 at 07:47
IntelliJ had a bug in 2018.3, 2018.2.2 (182.4129.33). It was fixed in builds 191.65, 183.3691.
Setting -Dide.text.effect.new.metrics=false
in the .vmoptions
fixes the problem.

- 785
- 1
- 6
- 16
-
Thank you, this fixed it for me today. The bug is still there with version 2019.1.4 (Build #IC-191.8026.42.) Version 2019.2 is already out, and I do not know whether they fixed the bug on that version, because I am not using it, because it contains other, more severe bugs. (Performance related.) – Mike Nakis Aug 10 '19 at 16:04
-
I tried all options in the Bug-report and restarted phpstorm multiple times, it has no effect for me. – Radon8472 Jan 21 '20 at 07:45
In addition to Ionghua's answer .....
If you find that IntelliJ is still not striking out deprecated methods, even though you have enabled the inspection as above, check to make sure that your code is not ignoring deprecation warnings with @SuppressWarnings("deprecation")
.

- 6,621
- 5
- 53
- 79
In addition to longhua's answer... and vegemite4me...
Another possible source for this problem might be custom color themes.
If you are using a custom theme, make sure that it contains strikethrough. I was using monokai-sublime and there is no strikethrough for @Deprecated
annotations. When I changed the color theme from monokai to darcula strikethrough worked as expected.

- 7,986
- 4
- 45
- 57
I found that the only thing that worked for me with version 2019.2 192.5728.98, runtime 11.0.3+12-b304.10 was to use Help | Edit VM Options and add -Dide.text.effect.new.metrics=false

- 51
- 2