I'm using IntelliJ idea v12. When I import a project, there shows the strikeout/strikethrough line on the method which has the annotation @Deprecated
, but I use alt+enter and disable. So, how can I re-active this feature? Thanks! I want to display that strikethrough!
相关问题
- Configure gradle plugin based on future tasks
- How to make available “open this project in Intell
- IntelliJ 2017.1.2 GOLANG debug does not work on br
- JavaFX sample issue
- Could not import the newly generated play framewor
相关文章
- In IntelliJ IDEA, how can I create a key binding t
- Handling ffmpeg library interface change when upgr
- IntelliJ IDEA can't open projects or add SDK o
- IntelliJ Subversion Authentication Required Dialog
- Kotlin Koans with EduTools plugin: “Failed to laun
- How to set up Intellij to run javap command on a p
- How to enable “type information” for streams retur
- How to add a project to build path in IntelliJ Ide
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.Open
Settings
-> TypeInspections
to go to inspection settings -> TypeDeprecated
to find out all deprecated related inspection settings -> CheckDeprecated API usage
.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.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
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")
.