Cleanshooter
Cleanshooter

Reputation: 2375

Can Eclipse be configured to prevent certain warnings from showing up in the Problems view pane?

I am using the Eclipse for PHP Helios build and developing extensions and templates for Joomla with it. I really want to find a way to prevent certain warnings from showing up so that the problems pane is more intuitive. For example I get a Warning for every saying:

Unknown tag (jdoc:include) - HTML Warning

These warnings are not causing any problems I'm just a little picky I guess... and I'm tired of my site saying there is like 1,300+ Warnings when most are not actual problems.

Upvotes: 6

Views: 1576

Answers (2)

Tom Kuschel
Tom Kuschel

Reputation: 775

"jdoc:include" means Namespace=jdoc, Tag=include(it is a trick of joomla of course). You have to add "jdoc" as a namespace even if it is nonsense for web page – atlanto Jan 6 '12 at 5:57

My favorite solution: You can add the namespace (thank you atlanto) to the html tag to get rid off these eclipse warnings:

old:

<html xmlns="http://www.w3.org/1999/xhtml" .....

new:

<html xmlns:jdoc="" xmlns="http://www.w3.org/1999/xhtml" .....

Upvotes: 0

Zolt&#225;n Ujhelyi
Zolt&#225;n Ujhelyi

Reputation: 13858

You can do one of several different things:

  1. You can set up a filter in the Problems view. This is the least usable solution (IMHO), as it might be too imprecise to select. To do this, open the view menu in the problems view (the small triangle in the upper right corner, select Configure contents..., and setup a filter that might remove some elements.
  2. You can define editor validation settings. E.g. for HTML files look at the Eclipse Preferences, and there look for the page Web/HTML Files/Editor/Validation - there you can configure a lot of warnings. For PHP and CSS files I did not find such options. I have not checked, but it is possible, that you can make this setting in a project-specific way by opening the project properties, and checking there for the corresponding preference page.

I believe, the second option would allow you to remove those unnecessary warnings.

Upvotes: 6

Related Questions