Can I configure Eclipse to prevent certain alerts from appearing in the Problems panel?

I use Eclipse for PHP Helios to build and develop extensions and templates for Joomla with it. I really want to find a way to prevent certain alerts from appearing so that the problem panel is more intuitive. For example, I get a warning for every statement:

Unknown tag (jdoc: include) - HTML warning

These warnings do not cause any problems. I'm just a little picky, I think ... and I'm tired of my site saying that there are, like 1300+ warnings, when most of them are not actual issues.

+6
source share
2 answers

You can do one of several things:

  • You can configure the filter in the Problems view. This is the least used solution (IMHO) as it may be too inaccurate to select. To do this, open the browse menu in the problem view (a small triangle in the upper right corner, select "Customize content ..." and set a filter that can remove some items.
  • You can define editor verification settings. For instance. for HTML files, see Eclipse Preferences and find the Web / HTML Files / Editor / Validation page - there you can configure many warnings. For PHP and CSS files, I did not find such options. I did not check, but it is possible that you can make this parameter in a specific way by opening the project properties and checking the corresponding preferences page there.

I believe the second option will allow you to remove these unnecessary warnings.

+6
source

"jdoc: include" means namespace = jdoc, tag = include (this is of course the joomla trick). You should add "jdoc" as the namespace, even if it is absurd for a web page - atlanto January 6, 12 at 5:57

My favorite solution: you can add a namespace (thanks atlanto) to the html tag to get rid of these eclipse warnings:

old:

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

new

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

Source: https://habr.com/ru/post/905234/


All Articles