Search code examples
javaintellij-ideakeyboard-shortcuts

What is the intellij idea shortcut to replace value of final variable with its value?


I want to see the value of a final variable as shown in the image below. Is there any shortcut for this?

enter image description here

I want the above variable to change to the one as shown in the image below

enter image description here


Solution

  • Fold Selection / Remove region in your Keymap settings.

    The default shortcut on Windows is Ctrl+..

    This behavior is also controlled by Settings (Preferences on macOS) | Editor | General | Code Folding | I18n strings (make sure it's enabled).