简体   繁体   English

日食。 如何使用快捷方式激活工具提示弹出窗口?

[英]Eclipse. How to activate tooltip popup using shortcut?

for example we have following method: 例如,我们有以下方法:

...

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

method2 can throws exception and Eclipse offer either wrap by try catch or declare throws declaration. method2可以抛出异常, Eclipse提供了try catch或declare throws声明。

Each time I need pick up the mouse and hover mouse cursor to this row. 每次我需要拿起鼠标并将鼠标光标悬停在此行。 在此输入图像描述

Is it possible select wrap or throws without using mouse? 是否可以在不使用鼠标的情况下选择换行或抛出?

Yes, use Ctr+1 keyboard shortuct. 是的,使用Ctr+1键盘短路。 In your case, it is called quick fix and it works errors and warnings. 在您的情况下,它被称为快速修复,它可以处理错误和警告。 With the same shortcut you can use quick assists, they are used for local code manipulations. 使用相同的快捷方式,您可以使用快速助手,它们用于本地代码操作。 Read more HERE . 阅读更多HERE

Regards 问候

I think that 'F2' is the right key to see the tooltip visible when hoovering mouse over an item in Eclipse editor. 我认为'F2'是在Eclipse编辑器中将鼠标悬停在项目上时看到工具提示可见的正确键。 It may contain suggestions of fixing if there's a problem with the item being hoovered over. 如果项目被覆盖有问题,它可能包含修复建议。 The functionality is called "Show Tooltip Description". 该功能称为“显示工具提示说明”。 Mentioned in other answers shortcut Ctrl+1 shows a "Quick Fix" tooltip which is slightly a different trick than "Show Tooltip Description". 在其他答案中提到快捷键Ctrl + 1显示“快速修复”工具提示,这与“显示工具提示说明”略有不同。 I would say that both tooltip provide user with some common functionalities but both offer also their own options. 我会说两个工具提示都为用户提供了一些常用功能,但两者都提供了自己的选项。

Move your cursor to the method and press Ctrl+1 , then use your arrowkeys. 将光标移动到方法并按Ctrl+1 ,然后使用箭头键。 This trick (ctrl+1) can help you speed up development for a lot of things, like automaticly assign statements to variables. 这个技巧(ctrl + 1)可以帮助你加速很多事情的开发,比如自动将语句分配给变量。

Press F2 for focus, F2进行对焦,

在此输入图像描述


Using Ctrl + 1 for proposal table, 使用Ctrl + 1作为提案表,

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM