Validation Listeners

Identifier:
org.eclipse.emf.validation.validationListeners

Since:
1.0

Description:
This extension point is used to define validation listeners for the validation service (org.eclipse.emf.validation.service.ModelValidationService).

The validation service will inform this listener whenever validation has occurred, loading it if necessary in order to do so. Thus, this extension point is most useful for cases where client plug-ins need to find out about validation events even before they are loaded. Otherwise, it is usually simpler just to programmatically add a listener to the validation service.

Configuration Markup:

<!ELEMENT extension (listener+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT listener (clientContext*)>

<!ATTLIST listener

class CDATA #REQUIRED>

Registers an implementation of the IValidationListener interface to receive notifications of validation events.



<!ELEMENT clientContext EMPTY>

<!ATTLIST clientContext

id CDATA #IMPLIED>

Declares one of the handled client contexts for this validation listener. No client contexts indicates that all events should be sent to the listener object.



Examples:
The following is an example of a universal validation listener registration:


<extension point="org.eclipse.emf.validation.validationListeners">
   <listener class="com.example.validation.ValidationListener"/>
</extension>

The following is an example of a validation listener that is registered to listen to a specific client context:


<extension point="org.eclipse.emf.validation.validationListeners">
   <listener class="com.example.validation.ValidationListener"/>
     <clientContext id="com.example.validation.aValidationClientContext"/>
</extension>


Copyright (c) 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html