Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » marker & squiggle creation problem after XML validation
marker & squiggle creation problem after XML validation [message #228729] Tue, 10 March 2009 14:18 Go to next message
Frank Du is currently offline Frank DuFriend
Messages: 91
Registered: July 2009
Member
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 #228749 is a reply to message #228729] Tue, 10 March 2009 19:52 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2337
Registered: July 2009
Senior Member
Frank Du wrote:
> 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!

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?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: marker & squiggle creation problem after XML validation [message #228817 is a reply to message #228749] Wed, 11 March 2009 18:23 Go to previous messageGo to next message
Frank Du is currently offline Frank DuFriend
Messages: 91
Registered: July 2009
Member
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?
Re: marker & squiggle creation problem after XML validation [message #228985 is a reply to message #228817] Sun, 15 March 2009 00:36 Go to previous message
Eclipse UserFriend
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?
>
>
>
Previous Topic:[XSLT Tools] XML Catalog in xsl:include
Next Topic:content assist hot key does not work in my customized xml editor on Eclipse 3.4
Goto Forum:
  


Current Time: Fri Nov 28 11:22:21 GMT 2014

Powered by FUDForum. Page generated in 0.01631 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software