I agree that showing errors in the source code if there's no real
error is misleading. If the IDE cannot deal with showing proper
errors for templating languages, the user may want to turn the error
checking off completely. I would suggest a different approach. If the
IDE knows it cannot identify real problems, it should still notify
the user, but instead of saying "This is an error" say "It looks like
this can be a problem.". In other words display it as a warning
annotation, not an error.
I think a warning annotation would be really appropriate as it
notifies the user to pay special attention to the templating section
of the source code.
I can imagine we give the user an option to suppress specific
_warnings_ (not errors), but I'm not sure it's really needed in this
case.
-Jano
On 18 Jan 2008, at 10:20, Marek Fukala wrote:
> Hi all,
>
> In the web editing we have a problem that some HTML files are just
> fragments of a bigger unit. These fragments are in most cases
> joined by a templating language - JSP, RHTML or PHP.
>
> These files are parsed and error annotations are created as any
> other html file. This may lead to false errors since the page may
> contain just a part of the html code.
>
> It is not easily possible to determine which pages are just
> fragments and which are not automatically. So it seems that it
> would be desirable if there was a way how user can disable these
> checks for particular files.
>
> I was thinking for example about:
> 1) an action "Enable Error Checking" with a checkbox in the editor
> popup menu
> 2) or in the annotation popup menu
> 3) or on the file status icon
>
> So my question is if there is a standart way how to handle this and
> if not what would be the right UI for doing so.
>
>
http://www.netbeans.org/issues/show_bug.cgi?id=120828>
> Thanks,
> Marek