View the actual value of a constant?
We have lots of constants built up from other constants. When you do a "quick definition" for the constant you see the other constants it is made up of. What I would really like to see is the final value of the constant. Is there any easy way to get it? I couldn't find one.
For example:
public static final class TEST {
public static final String FOO = "FOO";
public static final String FOOBAR = FOO + "/BAR";
}
When I do quick definition for FOOBAR I see something like: FOOBAR = FOO + "/BAR". What I would really like to see is FOOBAR = "FOO/BAR". While I realize "quick definition" might not be the right way to do this, it is the closest I can find to what I'm looking for. Am I missing something?
Thanks,
Tom
请先登录再写评论。
You can use the "Copy string concatenation text to the clipboard" intention and then view the text using Edit | Paste from History...
I don't get the "Copy string concatination" intention on FOOBAR, I only get it if I go to the defintion of FOOBAR and put the cursor in the definition. I'd like to be able to quickly see the full value for FOOBAR where I see FOOBAR in the code.
This is not currently possible.
Could someone point me the code of "Copy String concatenation text to the clipboard". I can't seem to find the Class where this is used in intellij-community source code.
https://github.com/JetBrains/intellij-community/blob/master/plugins/IntentionPowerPak/src/com/siyeh/ipp/concatenation/CopyConcatenatedStringToClipboardIntention.java