LoginSignup
4
3

More than 5 years have passed since last update.

IntelliJでメソッド定義の左側にある@が出なくなった時の対処法

Posted at

org.jetbrains.annotationsライブラリがクラスパスにあると、null値を返すことがあるメソッド定義の左側(行番号の右)に@が表示されます。この@を押すと、「Insert '@Contract..」のようなアノテーション挿入のサジェストと、「Hide annotations inferred from source code」という@を非表示にするための選択肢が表示されます。

スクリーンショット 2016-06-16 15.52.25.png

ここで「Hide annotations inferred from source code」を選択して@を非表示にした場合、Intellijの設定項目では再び@を表示することができません。

@を再び表示させるには、editor.codeinsight.xmlの中の<option name="SHOW_SOURCE_INFERRED_ANNOTATIONS" value="false" />を削除するかvalue="true"にし、Intellijを再起動する必要があります。

editor.codeinsight.xmlの場所はこちら。

  • MacOs: /Users/$(whoami)/Library/Preferences/IdeaIC2016.1/options/editor.codeinsight.xml
  • Windows: C:\Users[USERNAME].IdeaIC2016.1\config\options\editor.codeinsight.xml
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3