For example, having the following code:
// This is hidden from my eyes String str = "abc"; // I can see this System.out.println(str);
i'd like to point to str
in the last line and see that it's type is indeed java.lang.String
(not just String
). Where can I find this information (I am sure Idea knows it, as it can show the object's members correctly)?
By default, IntelliJ IDEA shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar. to show class fields. to have protected class members shown in the tree.
Hover the mouse over the identifier with the ctrl key held down, and you will see a tooltip containing the full type name.
If you place the caret inside the variable you want to identify and press
CTRL + SHIFT + P
a small popup will show the type like so:
If you place the caret inside an expression, Idea will first ask what part of the expression you want to identify.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With