如何在 Eclipse 中仅使用键盘出现错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1832183/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:02:14  来源:igfitidea点击:

How to go to an error using only the keyboard in Eclipse?

eclipsekeyboard-shortcuts

提问by cc.

Let's say I have a file with 10 lines and I have a problem with the name of the package (or something) and the cursor is on the last line of the text.

假设我有一个包含 10 行的文件,并且包的名称(或其他名称)有问题,并且光标位于文本的最后一行。

How can I go directly to that line to see what the problem is and what suggestions there are to remove the problem, using a shortcut?

如何使用快捷方式直接转到该行以查看问题所在以及解决问题的建议?

Question: Is there a keyboard-shortcut for this?

问题:是否有键盘快捷键?

Or something like this:

或者像这样:

Go to the next errorand Go to the previous error.

转到下一个错误转到上一个错误

回答by Joe Daley

Windows and Linux

Windows 和 Linux

  • Go to the next error: Ctrl+ .
  • Go to the previous error: Ctrl+ ,
  • Show quick fixes: Ctrl+ 1
  • 转到下一个错误:Ctrl+.
  • 转到上一个错误:Ctrl+,
  • 显示快速修复:Ctrl+1

Mac

苹果电脑

  • Go to the next error: Cmd+ .
  • Go to the previous error: Cmd+ ,
  • Show quick fixes: Cmd+ 1
  • 转到下一个错误:Cmd+.
  • 转到上一个错误:Cmd+,
  • 显示快速修复:Cmd+1

回答by tomrozb

To go to problem within project just type Shift+Alt+Qthen press X. It will open the "Problems" window. Now use or to select the error/warning and press Enterto go to it.

要转到项目中的问题,只需键入Shift+ Alt+Q然后按X。它将打开“问题”窗口。现在使用选择错误/警告,然后按Enter转到它。

I know it isn't simple as Crtl+.but it works for a whole project.

我知道它不像Crtl+那样简单,.但它适用于整个项目。

回答by raggnic

To complete the previous answers, you can use the combobox linked to the toolbar buttons for next/previous annotation to set the annotation level.

要完成前面的答案,您可以使用链接到下一个/上一个注释的工具栏按钮的组合框来设置注释级别。

toolbar-combobox

工具栏组合框

That makes browsing through errors using ctrl+./ ctrl+ easier,

这使得使用 ctrl+./ ctrl+ 浏览错误更容易,

回答by Rakesh Bhalani

TO GO TO NEXT ERROR ONLY in eclipse with Ctrl + .command, tick off warnings as shown in screenshot

仅在 eclipse 中使用Ctrl + .命令转到下一个错误,勾选警告,如屏幕截图所示

enter image description here

在此处输入图片说明