<!ELEMENT extension (constraintParser+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT constraintParser EMPTY>
<!ATTLIST constraintParser
lang CDATA #REQUIRED
class CDATA #REQUIRED>
Defines a constraint parser.
IConstraintParser
interface, which handles the associated constraint language.To provide support for constraints defined in scripted Java embedded in the constraint 'body', using BeanShell, one might define an extension like the following:
<extension point=
"org.eclipse.emf.validation.constraintParsers"
>
<constraintParser class=
"com.example.validation.BeanShellConstraintParser"
lang=
"Java-BeanShell"
>
</constraintParser>
</extension>
The value of the <constraintParser> element class attribute must be
the fully qualified name of a class that implements one of the specializations of
the org.eclipse.emf.validation.service.IConstraintParser
interface defined by the framework. The currently available specializations are org.eclipse.emf.validation.service.IParameterizedConstraintParser
and org.eclipse.emf.validation.xml.IXmlConstraintParser
. Note that the latter interface is deprecated; the concrete implementations supplied by the framework (for Java, OCL, and EMF languages) implement the IParameterizedConstraintParser
interface, also.
A constraint parser is instantiated using the default (no-argument) constructor; only a single instance is created by the system.
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