Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ: view property values in code

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?

like image 769
Mahozad Avatar asked Oct 18 '25 21:10

Mahozad


1 Answers

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.

like image 97
Mahozad Avatar answered Oct 21 '25 09:10

Mahozad