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.
<!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.
<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