Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off selected HTML errors in eclipse

Tags:

eclipse

jsp

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.")

like image 507
Jay Avatar asked Aug 07 '09 19:08

Jay


People also ask

How do I ignore an error in Eclipse?

It isn't obvious on how to use the eclipse compiler to ignore errors. i.e. Go to Settings > Compiler > Java Compiler, use the Eclipse compiler and specify "-proceedOnError" as a command line parameter.

Can you edit HTML in Eclipse?

Eclipse HTML Editor is an Eclipse plugin for HTML , JSP , and XML editing and has the following features: HTML , JSP , XML , CSS , DTD , and JavaScript colored highlighting.


2 Answers

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.

like image 93
Daniel F. Thornton Avatar answered Sep 26 '22 01:09

Daniel F. Thornton


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

like image 38
Lobo Avatar answered Sep 22 '22 01:09

Lobo