angelozerr / eclipse-wtp-webresources

Provides completion, hyperlink, hover inside WTP HTML editor for Web Resources (CSS, JS, Images)
Eclipse Public License 1.0
13 stars 9 forks source link

Skip validation when embedded PHP script is used #32

Closed kaloyan-raev closed 9 years ago

kaloyan-raev commented 9 years ago

Consider the following snippet:

<img src="<?php echo $picture_path ?>">

In this case the src value is marked as error by the validator. This is not useful and actually annoying for users. Since the output of the PHP script cannot be determined during design time, it would be better to skip the validation when we have embedded PHP script in the src value.

angelozerr commented 9 years ago

It was the same problem with JSP scriptlet. For that @gamerson have implemented an extension point to ignore validation. See JSPScriptletIgnoreValidator declared https://github.com/angelozerr/eclipse-wtp-webresources/blob/master/org.eclipse.a.wst.html.webresources.core/plugin.xml#L79

For PHP we should have a new extension point declaration like PHPIgnoreValidator

kaloyan-raev commented 9 years ago

Thanks for the hint! See PR https://github.com/angelozerr/eclipse-wtp-webresources/pull/33