4

In newer versions of IntelliJ, value of properties used in @Value annotation (and maybe in other contexts) are shown like this:

enter image description here

This doesn't work if you have clicked on the preview or because sometimes IntelliJ ignores it:

enter image description here

How is it possible to force IntelliJ show the property value?

Mahozad
  • 18,032
  • 13
  • 118
  • 133

1 Answers1

9

Place the caret on the key inside @Value annotation and press Ctrl + - shortcut.
To do the reverse (show the key), either click on the value preview or press Ctrl + + shortcut.

I find this Ctrl + - shortcut to be very useful to fold any code block; for example you can use it inside a Javadoc to collapse it altogether.

Mahozad
  • 18,032
  • 13
  • 118
  • 133