Eclipse. How to activate tooltip popup using shortcut?

For example, we have the following method:

... public void method1(){ method2(); } ... 

method2 can throw an exception and Eclipse either offer a wrapper using try catch or declare a throws declaration.

Every time I need to pick up a mouse and hover over this line. enter image description here

Can I choose a wrapper or throws without using a mouse?

+5
source share
3 answers

Move the cursor to the method and press Ctrl+1 , then use the arrow keys. This trick (ctrl + 1) can help you speed up development for many things, such as automatically assigning variables to statements.

+1
source

Yes, use Ctr+1 keyboard short circuit. In your case, this is called a quick fix, and it works with errors and warnings. Using the same shortcut, you can use quick help, they are used for local code manipulations. Read more HERE .

Hi

+4
source

I think "F2" is the right key to see the tooltip visible when you hover over an item in the Eclipse editor. It may contain suggestions for correcting the situation if there is a problem with the subject on which it was processed. The functionality is called the "Show Tooltip Description". Mentioned in other keyboard shortcuts, Ctrl + 1 displays the prompt "Quick Fix", which is slightly different from the "Show Tooltip Description". I would say that both hints provide the user with some common features, but both offer their own options as well.

+2
source

Source: https://habr.com/ru/post/1201616/


All Articles