开发者

Quick fix many problems at once

开发者 https://www.devze.com 2023-03-21 11:18 出处:网络
Is it possible to quick fix all errors开发者_如何学C in a class opened in Eclipse? I have 71 errors that are pretty much the same, I would rather not do it one-by-one.

Is it possible to quick fix all errors开发者_如何学C in a class opened in Eclipse?

I have 71 errors that are pretty much the same, I would rather not do it one-by-one.

(Note: I am quick fixing a Java file)


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.

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 depends on type of errors.If error are there because of missing imports then you can solve it by pressing CTRL + SHIFT + O. For other errors you have to solve one by one [AFAIK].


As far as I know, there's no way to do this. Sorry!


You would get better answers if you would specify the error type. And if errors are too similar -hopefully identical-, you can always use find&replace tool.


There are certain errors/warnings which you can fix in one go in a file e.g. missing NON-NLS tags. When you hover on an error, the quick fix list will show something like 'Fix n problems of same kind'.

In other cases you could use a cleanup, e.g. for missing @Override annotation.


All imports fix as CTRL + SHIFT + M

0

精彩评论

暂无评论...
验证码 换一张
取 消