如何在 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
How to go to an error using only the keyboard in Eclipse?
提问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+那样简单,.但它适用于整个项目。