Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see an object's full type name in IntelliJ Idea?

Tags:

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)?

like image 412
Ivan Avatar asked Oct 19 '11 00:10

Ivan


People also ask

How can I see all method names in IntelliJ?

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.


Video Answer


2 Answers

Hover the mouse over the identifier with the ctrl key held down, and you will see a tooltip containing the full type name.

like image 55
Ricky Clarkson Avatar answered Sep 20 '22 20:09

Ricky Clarkson


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:

enter image description here

If you place the caret inside an expression, Idea will first ask what part of the expression you want to identify.

like image 20
LCE Avatar answered Sep 22 '22 20:09

LCE