marker & squiggle creation problem after XML validation [message #228729] |
Tue, 10 March 2009 10:18  |
Eclipse User |
|
|
|
Dear All,
I extended XML editor. Everything worked fine before I refactored the
project file layout. The XML validation still works fine. After the
validation, the problem marker is created in vertical ruler (which is
fine), but the red squiggle isn't created as expected.
Without the red wave line, we can't bring up the quick-fix suggestions. It
seems that WTP XML editor doesn't set IMarker.CHAR_START and
IMarker.CHAR_END. Instead, it sets the column and row number. So my
questions:
How could a problem marker infer the text that should be underlined with
squiggle?
How to debug and recover the squiggle creation?
Any suggestion or clue is highly appreciated! Thank you so much!
Best Regards,
Frank Du
|
|
|
|
|
Re: marker & squiggle creation problem after XML validation [message #228985 is a reply to message #228817] |
Sat, 14 March 2009 20:36  |
Eclipse User |
|
|
|
Originally posted by: valentinbaciu.hotmail.com
Frank, to understand how the XML validator deals with squiggles have a look
at these two classes:
org.eclipse.wst.xml.core.internal.validation.eclipse.XMLMess ageInfoHelper
org.eclipse.wst.xml.ui.internal.validation.DelegatingSourceV alidator
XMLMessageInfoHelper adds extra information about the squiggle strategy to
use and DelegatingSourceValidator
computes more precise squiggle location (offset, length).
Hope this helps, Valentin
"Frank Du" <du.qixing@gmail.com> wrote in message
news:7f0518055a0be20f4b74a0e5cbab836a$1@www.eclipse.org...
> Yes, a validator creates the markers. It's a subclass of
> AbstractNestedValidator. For instance, the problem marker is:
>
>
> message: DataSetVersion must be equal to '2.5.4'.
> lineNumber: 9
> severity: 1
> toString(): ------ERROR-----: InvalidDataSetVersion: DataSetVersion must
> be equal to '2.5.4'. (line 9, column 19)
>
> The error marker appears in the vertical ruler. The squiggle doesn't show
> up in the editor.
>
> Any way do locate the issue?
>
> Thank you so much,
>
> Frank
>
>
> Nitin Dahyabhai wrote:
>
>> The values aren't something that the editor affects, it's instead the
>> particular validator that created the problem/message that is
>> responsible. What is the problem/message being created?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03910 seconds