|Problem with V2 validation framework. [message #227126]
||Thu, 22 January 2009 17:32
| Alexandros Salazar
Registered: July 2009
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"
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.",
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!