Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » how to generate the <package>Validator class
how to generate the <package>Validator class [message #421634] Mon, 11 August 2008 22:50 Go to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
How do I configure to get the generator to generate the
<package>Validator class and the corresponding registration code in the
init() method of the <package>PackageImpl class? Several of my EMF
projects have that generated code, but a number of my EMF projects
don't. I now have a need to modify (override) the generated code, but
it doesn't exist in all of my EMF projects.
Re: how to generate the <package>Validator class [message #421635 is a reply to message #421634] Mon, 11 August 2008 23:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080400000305060103050500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

John,

If and only if at least one of the classifiers in the package has a
constraint on it, will a validator will be generated.

The EMF Validation Framework Overview
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.Validation.html>

So probably you'll want to add named constraints to some of your
classifiers...


John Yotka wrote:
> How do I configure to get the generator to generate the
> <package>Validator class and the corresponding registration code in
> the init() method of the <package>PackageImpl class? Several of my
> EMF projects have that generated code, but a number of my EMF projects
> don't. I now have a need to modify (override) the generated code, but
> it doesn't exist in all of my EMF projects.

--------------080400000305060103050500
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
John,<br>
<br>
If and only if at least one of the classifiers in the package has a
constraint on it, will a validator will be generated. <br>
<blockquote><a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.Validation.html">The
EMF Validation Framework Overview</a><br>
</blockquote>
So probably you'll want to add named constraints to some of your
classifiers...<br>
<br>
<br>
John Yotka wrote:
<blockquote cite="mid:g7qfoi$90q$1@build.eclipse.org" type="cite">How
do I configure to get the generator to generate the
&lt;package&gt;Validator class and the corresponding registration code
in the init() method of the &lt;package&gt;PackageImpl class?&nbsp; Several
of my EMF projects have that generated code, but a number of my EMF
projects don't.&nbsp; I now have a need to modify (override) the generated
code, but it doesn't exist in all of my EMF projects.
<br>
</blockquote>
</body>
</html>

--------------080400000305060103050500--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: how to generate the <package>Validator class [message #421636 is a reply to message #421635] Mon, 11 August 2008 23:37 Go to previous message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
Ed Merks wrote:
> John,
>
> If and only if at least one of the classifiers in the package has a
> constraint on it, will a validator will be generated.
>
> The EMF Validation Framework Overview
> < http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.Validation.html>
>
> So probably you'll want to add named constraints to some of your
> classifiers...
>
>
> John Yotka wrote:
>> How do I configure to get the generator to generate the
>> <package>Validator class and the corresponding registration code in
>> the init() method of the <package>PackageImpl class? Several of my
>> EMF projects have that generated code, but a number of my EMF projects
>> don't. I now have a need to modify (override) the generated code, but
>> it doesn't exist in all of my EMF projects.
Thanks!
Previous Topic:EditingDomain get ResourceEntityHandler
Next Topic:substitution group revisited
Goto Forum:
  


Current Time: Fri Apr 19 01:58:26 GMT 2024

Powered by FUDForum. Page generated in 0.01978 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top