69

I accidentally clicked on "Validate" for all of my projects (instead of going to Team > synchronize...) and I have several validation errors and tons of warnings.

I can't figure out how to clear these so it goes back to just having the standard errors.

(One way is to go to "Configure Contents" of the "Problems" view and deselect the validation errors, but I know they're still there, just hidden... it bugs me that they're not actually removed)

I've tried restarting eclipse, tried cleaning all projects but that doesn't clear these validation errors.

James Smith
  • 871
  • 2
  • 8
  • 7

8 Answers8

116

You should be able to select all the offending markers in the Problems View, right-click and choose Delete from the context menu. Clean-building causes all builders to remove only the markers that they produced, but these markers weren't produced by a builder (you created them through an explicit invocation of the "validate" command.)

Tom Crockett
  • 30,818
  • 8
  • 72
  • 90
  • The only problem I can see here is having to delete all errors , (in my case a 100 at a time). – Pradyot Jun 05 '12 at 19:11
  • @Pradyot: Deleting the markers file as takteek noted, does the trick for all entries at once. – zb226 Aug 09 '12 at 12:40
  • For me, most of the time this advice isn't relevant. I usually want to clear markers that _don't_ show up in the problems view. (As in bug in Eclipse plugins, not markers hidden by design.) – James Moore Apr 02 '13 at 05:07
  • Hours of frustration ended with this answer. Thank you. @Pradyot you can delete the parent item to remove an entire group. – Joe Coder May 13 '13 at 23:44
  • 6
    I didn't realize it was possible to just 'delete' an error from Eclipse. Didn't even think to try. Fixing bugs just got 1000x faster. – aroth Apr 08 '14 at 07:20
  • 1
    @aroth Now there just needs to be a builder which removes them automatically whenever they're created, and we'll have no more bugs forever! – Tom Crockett Apr 08 '14 at 21:43
18

I'm not aware of a built-in way to clear them all. You might try deleting the markers file in

[workspace dir]/.metadata/.plugins/org.eclipse.core.resources/.projects/[project name]
x4u
  • 13,877
  • 6
  • 48
  • 58
takteek
  • 7,020
  • 2
  • 39
  • 70
  • 3
    That could delete a lot more than problem markers... better to do `rm [workspace dir]/.metadata/.plugins/org.eclipse.core.resources/.projects/*/org.eclipse.jdt.core/state.dat` ... even then, I don't know what other metadata might be in the state.dat file besides resource markers. – Tom Crockett Aug 09 '12 at 22:08
14

Go to Window -> Show View -> Problems and delete error marker(s) on right mouse-click

Pavel Coufal
  • 169
  • 1
  • 6
5

You probably want to exclude some third party libraries (such as jquery-1.x.min.js) from being validated by your project.

In this answer I've documented how to disable it for specific sources -> How do I remove javascript validation from my eclipse project?

I'll just repeat the steps here:

  1. Right click your project
  2. Select Properties -> JavaScript -> Include
  3. Path Select Source tab. ( It looks identical to Java Build Path Source tab )
  4. Expand JavaScript source folder
  5. Highlight Excluded pattern
  6. Click Edit button
  7. Click Add button next to Exclusion patterns box.
  8. You may either type Ant-style wildcard pattern, or click Browse button to mention the JavaScript source by name.

BTW, I think you should never disable validation for sources that you are in control of (i.e. coded by yourself or your team).

Community
  • 1
  • 1
Alexander Pogrebnyak
  • 44,836
  • 10
  • 105
  • 121
4

In case you select and delete more than 100 problems and eclipse only deletes up to 100 problems, check the "Configuration Contents..." menu. This menu is the top-right of the problems tab. There is a small triangle drop down menu containing the configuration. In that menu, there is a "Use limits" checkbox which you should uncheck to be able to dleete all problems at once.

MarcelS
  • 41
  • 1
  • 3
4

I was facing same problem but i am able to remove these errors.

  1. Go to project properties -> validations and click on override validation preferences.
  2. Click on disable all and Apply changes and click on okay. Let the project built.
  3. Again go to project properties and change the validation settings as of original.
Gray
  • 115,027
  • 24
  • 293
  • 354
Mangesh
  • 41
  • 1
3

In Indogo

GO to

Property -> Builder - > Uncheck Validator

Ravi Parekh
  • 5,253
  • 9
  • 46
  • 58
2

To disable validators in your project or workspace, complete the following steps:

  1. Click Window--> Preferences and select Validation in the left pane. The Validation page of the Preferences window lists the validators available in your project and their settings.
  2. To disable individual validators, clear the check boxes next to each validator that you want to disable. Each validator has a check box to specify whether it is enabled for manual validation or on a build.
  3. Optional: You can also change the following check box options on this page:

    • Allow projects to override these preference settings--->Select to set individual validation settings for one or more of your projects.
    • Suspend all validators-->Select to prevent validation at the global level. If you select this check box, you can still enable validation at the project level.

Then Click OK.

If you want to set individual validation settings for one or more of your projects, see Overriding global validation preferences

Pino
  • 7,468
  • 6
  • 50
  • 69