Search in sources :

Example 1 with XMLValidator

use of com.amalto.workbench.widgets.xmlviewer.validator.XMLValidator in project tmdm-studio-se by Talend.

the class XMLSourceViewer method installValidator.

private void installValidator() {
    if (document != null) {
        final XMLValidator validator = new XMLValidator(document, annotationModel);
        IDocumentListener validateListener = new IDocumentListener() {

            public void documentChanged(DocumentEvent event) {
                validator.validate(document);
            }

            public void documentAboutToBeChanged(DocumentEvent event) {
            }
        };
        document.addDocumentListener(validateListener);
    }
}
Also used : IDocumentListener(org.eclipse.jface.text.IDocumentListener) DocumentEvent(org.eclipse.jface.text.DocumentEvent) XMLValidator(com.amalto.workbench.widgets.xmlviewer.validator.XMLValidator)

Aggregations

XMLValidator (com.amalto.workbench.widgets.xmlviewer.validator.XMLValidator)1 DocumentEvent (org.eclipse.jface.text.DocumentEvent)1 IDocumentListener (org.eclipse.jface.text.IDocumentListener)1