Quick fix many problems at once

32,895

Solution 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.

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.

Solution 2

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].

Solution 3

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

Solution 4

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.

Share:
32,895
Tiago Veloso
Author by

Tiago Veloso

Updated on November 14, 2020

Comments

  • Tiago Veloso
    Tiago Veloso over 3 years

    Is it possible to quick fix all errors 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)

  • Tiago Veloso
    Tiago Veloso almost 13 years
    Thanks, but it's not imports (which are warnings by the way).
  • Tiago Veloso
    Tiago Veloso almost 13 years
    For what it helps you: The constructor BinaryContractInfo<String>(VarInfo, VarInfo, Class<capture#42-of ?>, Object, Object, String) is undefined DaikonConversionUtils.java
  • besamelsosu
    besamelsosu almost 13 years
    I'm guessing problem is caused by either number of or types of parameters is not matching. In that case unless you are going to construct with same parameters all the time -which is unlikely-, you have to go through them one by one. This can only be made easier with methods mentioned in Ladlestein's answers, if that's not the exact answer you need.
  • Peter Turner
    Peter Turner over 9 years
    Did they take out the "Fix 70 other errors of this type" function. I stumbled upon this answer and was super excited but I don't see it. The Markers show the errors and we can fix that too, but it doesn't work because it limits us to 100 errors and there are 2600 of 'em! (doing a little refactoring....)
  • Ladlestein
    Ladlestein over 9 years
    Not sure about that feature disappearing. As for the limit, can you modify the view to show more than 100 errors?
  • Peter Turner
    Peter Turner over 9 years
    yeah, found it eventually!
  • Joehot200
    Joehot200 almost 9 years
    @PeterTurner Where is it? I'm trying to do the same thing.
  • geert3
    geert3 almost 9 years
    I used to have "fix N other errors" as well. After my upgrade to Luna it's gone. In the Problems view I can select two identical error messages for instance nnn cannot be resolved or is not a field (need to change to getter). Two identical errors for the same variable in the same source, if I select both and quick-fix it tells me the selected problems do not have a common applicable quick fix ???