How to view the actual value of @Value in Spring?
Answered
I am using a Mac and able to see the following (not in debug mode nor running the program. Jus when I open a project).
But if I click on the value, it disapears and the actual String value comes back. How can I get back the value again? Is there a shortcut for this?
Tried playing around with Ctrl/ Cmd mixes with space but nothing is working. Please advice. Thanks.
This is what I get when I open a project (not always. Seems random. Sometimes you get the actual value 'CN=SVC.....', sometimes it is just the variable name in the properties file).
If I click on the value I end up with following.
What is the shortcut to get back the actual values CN=SVC.....', as before? Thanks.
Please sign in to leave a comment.
Code | Folding | Expand/Collapse (Ctrl =/ Ctrl -):
It doesn't work for me. Option + space works by showing a popup but only on 1 of my projects. Nothin happens on other projects.
My settings for reference.
Sorry, can't reproduce. Try to assign some other shortcuts for the the Folding | Expand / Collapse actions. I've verified that it works fine in IntelliJ IDEA 2018.3.3.
Tried adding other shortcuts and same outcome.
Its weird that it works in 1 of my projects and not the rest. (Even when working, I mean option + space, not the shortcuts mentioned in the settings).
Using version 2018.3.4.
Please share a sample project to reproduce the issue: https://intellij-support.jetbrains.com/hc/articles/206869619.
Note that the feature to show the actual values from the property files works only if you've configured the Spring context in IntelliJ IDEA Spring Facet settings to include these property files, otherwise IDE will not be able to resolve them. Check your configuration.
Well that explains it then cos the Spring Facet doesn't contain these files plus I can't be modifying it (for some reason..). Thanks.
I can't make head or tale of this answer which is also mentioned in the post: https://stackoverflow.com/a/49209232/104891
It says something about Code Folding disabling the option I18 string.
whatever that means?
But I want to be able to toggle the view, if there is no way to do that, please can you add it?
Does the collapse menu work for you?
ok, so select folding → collapse / Expand does toggle the individual value, collapse all / expand all for the class. A little bizarre, but it works, thanks.