Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Problem with V2 validation framework.
Problem with V2 validation framework. [message #227126] Thu, 22 January 2009 22:32 Go to next message
Alexandros Salazar is currently offline Alexandros SalazarFriend
Messages: 15
Registered: July 2009
Junior Member

I'm trying use the V2 validation framework in order to make use of its
dependency handling abilities. I _think_ I have found a bug in how markers
are created, but I want to double check to see if maybe I misunderstood.

As allowed by the API, I use org.eclipse.wst.validation.ValidatorMessage
in the ValidationResult to let the framework handle the creation and
destruction of markers for me. I specify a marker ID in the extension
point as follows:

name="Dependency Carrying Module Validator"
class=" "

Now, when the time comes to create the message that I will return in my
implementation of AbstractValidator#validate, I use the following code:

ValidationResult result = new ValidationResult();
ValidatorMessage message = ValidatorMessage.create("Detected error.",
message.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
return result;

This behaves as follows: upon clean build, the error is properly detected.
If I modify the files that the validator depends so as to remove the
error, the validator is duly called. However, the marker from the previous
validation is never removed.

I tracked down the reason for this to the fact that the type of the marker
is always the same, and markers are searched for according to their type
by Eclipse, not their ID, which is what the extension point provides.

Does anyone know if I misunderstood the purpose of the marker ID, or if I
should file a bug with bugzilla? Thanks!
Re: Problem with V2 validation framework. [message #229576 is a reply to message #227126] Wed, 25 March 2009 17:50 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3178
Registered: July 2009
Senior Member

Alexandros Salazar wrote:
> Does anyone know if I misunderstood the purpose of the marker ID, or if
> I should file a bug with bugzilla? Thanks!

Does the extension declaring your validator also mention which
marker type it should be using? It does sound like it's worth
opening a bug report, though.

Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Dynamic Web Project isn't building class files
Next Topic:how to remove faulty parts of Jsdt
Goto Forum:

Current Time: Mon Jun 25 06:43:04 GMT 2018

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

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

Back to the top