快速快速解决许多问题 [英] Quick fix many problems at once
问题描述
是否可以快速修复在Eclipse中打开的类中的所有错误?
Is it possible to quick fix all errors in a class opened in Eclipse?
我有71个几乎相同的错误,我宁愿不这样做一对一
I have 71 errors that are pretty much the same, I would rather not do it one-by-one.
(注意:我正在快速修复Java文件)
(Note: I am quick fixing a Java file)
推荐答案
通常,您可以整体修复错误。有几种方法。我建议转到问题视图,选择错误之一,然后按Ctrl-1(快速修复)。它应该为您提供修复所有文件中所选类型的所有错误的机会。
Often, you can fix errors en masse. There are several ways. I recommend going to your Problems view, selecting one of the errors, and hitting Ctrl-1 (quick fix). It should offer you the chance to fix all the errors of the selected type, in all files.
您也可以将鼠标悬停在文本编辑器中的错误上,然后等待弹出窗口;它应该说修复此类型的其他70个错误。这样做仅适用于特定文件。
You can also mouse over the error in the text editor and wait for a popup; it should say "fix 70 other errors of this type". Doing it this way applies only to the specific file.
这篇关于快速快速解决许多问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!