16

I recently upgraded my Eclipse to Ganymede, version 3.4.2.

Now it's giving me a ton of errors on the HTML in my JSPs for things like parameter values with no quotes and missing end tags. These pages work fine because the cases where I leave these things out are cases where they're optional. We can argue about whether I should include them, but right now I'm trying to make simple updates to a page and I don't want to revisit the entire page. But it's hard to pick out the real errors when all these style warnings are flagged as errors.

Is there a way to turn this off?

I found Window > Preferences > Web > HTML > Validation that lists errors like these and changed them from "Error" to "Ignore", but it made no difference. Apparently this isn't what controls it.

(Yes, yes, I know, the style purists will say that I should include all the optional quotes and end tags. I often don't because I see them as clutter. I really don't understand the philosophy that says, "Typing in this text will make absolutely no functional difference, it doesn't do anything at all, but you should do it because, well, because I said so.")

Jay
  • 26,876
  • 10
  • 61
  • 112
  • Would that be related to a known bug in WTP, fixed in the latest WTP (but working only with Galileo, not Ganymede though...)? http://stackoverflow.com/questions/1208424/eclipse-ganymede-not-validating-tag-files-properly – VonC Aug 07 '09 at 19:04
  • I had a similar problem regarding style warnings and going to Window > Preferences > Web > HTML > Validation DID solve it for me on Eclipse Juno (turned some warnings and errors into ignore). – user1884155 Jul 31 '14 at 10:14

3 Answers3

11

Have you tried:

  1. Click Window > Preferences. A Preferences window appears.
  2. In the Preferences window, click Workbench > Editors.
  3. Select one of the following options:
    • To turn off real-time syntax validation, click Structured Text Editor and uncheck the Analyze annotations while typing box.
    • To control other annotation settings, click Annotations and select your annotation preferences.
  4. Click OK to save your preferences and close the page.

From this Ganymede help page.

Another method: Window > Preferences > Validation. Then uncheck the Manual and Build boxes next to HTML Syntax Validator and JSP Syntax Validator.

Daniel F. Thornton
  • 3,687
  • 2
  • 28
  • 41
  • 1
    Thanks, but ... It didn't work. You must have a different version of Eclipse. I have no "Workbench" under Window > Preferences. "Editors" does appear under "General", but there's no option for "Analyze annotations while typing". There seemed more hope for your suggestion about Window > Preferences > Validation. There are indeed entries for HTML and JSP Syntax Validator's. I tried unchecking them both. Sadly, this made no difference. I still get the error messages. I tried making irrelevant changes, saving, and rebuilding, and I still get the same messages. – Jay Aug 10 '09 at 16:26
  • I'm sorry those didn't work for you... I wasn't really able to find any other methods in the Eclipse documentation `:-/` – Daniel F. Thornton Aug 11 '09 at 12:43
  • 1
    Oh well, you're the only one who even attempted an answer, so to get SO to stop prompting me to offer a bounty, I'll give you the check mark. (Wow, that sounded like a ringing endorsement! Like when a friend of mine told a woman she was "not unattractive". I told him that that sort of flattery must have the woman falling all over him.) – Jay Sep 28 '09 at 13:38
11
  1. Right click on your project in Eclipse.
  2. Select 'Properties'.
  3. Select 'Validation'.
  4. Check 'Enable project specific settings'.
  5. Uncheck any validators you want (such as HTML Syntax Validator)
  6. Rebuild project.

You may need to go into Windows->Preferences->Validation and check 'Allow projects to override these preference settings'.

Lobo
  • 111
  • 1
  • 3
  • 1
    This worked for me, and the answer above (changing the global enablement of HTML validation) did not. Perhaps the global validation checkboxes only apply to new projects... – Glenn Barnett Feb 04 '11 at 04:26
  • 2
    This worked for me, but I had to "clean project," since simply re-building did not remove the validation errors I specifically directed my IDE not to validate. – Rick Nov 01 '11 at 18:01
2

Check this Go to

Window > Preferences. Under Web > HTML Files > Validation

you'll find "Missing start tag:" and "Missing end tag:" exlips setting

Sameer Kazi
  • 17,129
  • 2
  • 34
  • 46