All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.wst.validation.doc-files.faq.html Maven / Gradle / Ivy

The newest version!



Validation Framework - Frequently Asked Questions


Validation Framework - Frequently Asked Questions

How do I create Problem Markers?

There are three different ways to create problem markers.

  1. Use the native support in the validation framework.
  2. Manage your own markers.
  3. Use the support in the previous version of the validation framework.

The first approach, is the recommended approach.

1. Use the native support in the validation framework

After you have finished performing your validation, and are returning control back to the validation framework, add your messages into the ValidationResult by using the add(ValidatorMessage message) method.

2. Manage your own markers

Create and remove your own markers. So that summary information can still be displayed, set the counts of any newly created markers in the ValidationResult by using the setSeverityXXX() methods. For example, if this validation pass generated two error markers, you would call setSeverityError(2).

3. Use the support in the previous version of the validation framework

If you are porting a validator that used the previous version of the validation framework, and you wish to continue to use an IReporter to report your markers, you can continue to do so.

For this approach, use the getReporter(IProgressMonitor monitor) method, and return your messages through the IReporter. If this method is called it is assumed by the framework, that this IReporter will be used as the only way of passing messages back to the framework.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy