Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Validation Generation & JRE Compliance
Validation Generation & JRE Compliance [message #416682] Tue, 12 February 2008 14:43 Go to next message
dorian_dinh is currently offline dorian_dinhFriend
Messages: 31
Registered: July 2009
Member
Hi,

My purpose is to generate a Validation file of a genPackage (B) which
depends on another genPackage (A). As the following piece of template
"Validation.javajet" tells us : B-Validator should inialize A-Validator.

************************************************************ ******************
<%for (GenPackage baseGenPackage :
genPackage.getAllValidatorBaseGenPackages()) {%>
< %=genPackage.getValidatorPackageUniqueSafeName(baseGenPackag e)% >Validator =
<%=baseGenPackage.getImportedValidatorClassName()%>.INSTANCE;
<%}%>
************************************************************ ******************

The validation generated against my model doesn't compile (initialization
of A-validator is missing) unless I raise the compliance level on my
genmodel to 6.0!

Did anybody report you this defect ? Is it a real defect or should I
configure my generation platform properly ?

My dev & target platform are compliant EMF 2.3 2007/9/25. I installed JRE
1.5.0_11, my compiler compliance level is 5.0.

Any reference point would be helpful,

Thx forward,

Dorian.
Re: Validation Generation & JRE Compliance [message #416685 is a reply to message #416682] Tue, 12 February 2008 15:37 Go to previous messageGo to next message
David Steinberg is currently offline David SteinbergFriend
Messages: 489
Registered: July 2009
Senior Member
Hi Dorian,

Sorry, but I'm having trouble understanding exactly what's going wrong.
You mention the base validator initialization line in the constructor:

aValidator = AValidator.INSTANCE;

Are you saying that, unless you set the compliance level to 6.0, this
line is not being generated in your BValidator? Or are you saying that
it is being generated, but it's not able to compile?

Cheers,
Dave


Dorian Dinh wrote:
> Hi,
>
> My purpose is to generate a Validation file of a genPackage (B) which
> depends on another genPackage (A). As the following piece of template
> "Validation.javajet" tells us : B-Validator should inialize A-Validator.
> ************************************************************ ******************
>
> <%for (GenPackage baseGenPackage :
> genPackage.getAllValidatorBaseGenPackages()) {%>
>
> < %=genPackage.getValidatorPackageUniqueSafeName(baseGenPackag e)% >Validator
> = <%=baseGenPackage.getImportedValidatorClassName()%>.INSTANCE;
> <%}%>
> ************************************************************ ******************
>
>
> The validation generated against my model doesn't compile
> (initialization of A-validator is missing) unless I raise the compliance
> level on my genmodel to 6.0!
>
> Did anybody report you this defect ? Is it a real defect or should I
> configure my generation platform properly ?
> My dev & target platform are compliant EMF 2.3 2007/9/25. I installed
> JRE 1.5.0_11, my compiler compliance level is 5.0.
>
> Any reference point would be helpful,
>
> Thx forward,
>
> Dorian.
>
>
>
>
Re: Validation Generation & JRE Compliance [message #416687 is a reply to message #416685] Tue, 12 February 2008 15:42 Go to previous messageGo to next message
dorian_dinh is currently offline dorian_dinhFriend
Messages: 31
Registered: July 2009
Member
Sorry,

i meant the base validator initialization line in the constructor
"aValidator = AValidator.INSTANCE;" is not generated unless i set
compliance level to 6.0 !


Dave Steinberg wrote:

> Hi Dorian,

> Sorry, but I'm having trouble understanding exactly what's going wrong.
> You mention the base validator initialization line in the constructor:

> aValidator = AValidator.INSTANCE;

> Are you saying that, unless you set the compliance level to 6.0, this
> line is not being generated in your BValidator? Or are you saying that
> it is being generated, but it's not able to compile?

> Cheers,
> Dave


> Dorian Dinh wrote:
>> Hi,
>>
>> My purpose is to generate a Validation file of a genPackage (B) which
>> depends on another genPackage (A). As the following piece of template
>> "Validation.javajet" tells us : B-Validator should inialize A-Validator.
>>
************************************************************ ******************
>>
>> <%for (GenPackage baseGenPackage :
>> genPackage.getAllValidatorBaseGenPackages()) {%>
>>
>> < %=genPackage.getValidatorPackageUniqueSafeName(baseGenPackag e)% >Validator
>> = <%=baseGenPackage.getImportedValidatorClassName()%>.INSTANCE;
>> <%}%>
>>
************************************************************ ******************
>>
>>
>> The validation generated against my model doesn't compile
>> (initialization of A-validator is missing) unless I raise the compliance
>> level on my genmodel to 6.0!
>>
>> Did anybody report you this defect ? Is it a real defect or should I
>> configure my generation platform properly ?
>> My dev & target platform are compliant EMF 2.3 2007/9/25. I installed
>> JRE 1.5.0_11, my compiler compliance level is 5.0.
>>
>> Any reference point would be helpful,
>>
>> Thx forward,
>>
>> Dorian.
>>
>>
>>
>>
Re: Validation Generation & JRE Compliance [message #416690 is a reply to message #416687] Tue, 12 February 2008 17:19 Go to previous messageGo to next message
David Steinberg is currently offline David SteinbergFriend
Messages: 489
Registered: July 2009
Senior Member
Hi again,

I'm unable to reproduce the problem. I always get the appropriate
validator initialization line in the constructor.

Maybe it's an environment problem? Could you try to reproduce it in a
clean workspace? If you can, then please open a bug with the exact
steps to reproduce it.

Thanks,
Dave


Dorian Dinh wrote:
> Sorry,
>
> i meant the base validator initialization line in the constructor
> "aValidator = AValidator.INSTANCE;" is not generated unless i set
> compliance level to 6.0 !
>
>
> Dave Steinberg wrote:
>
>> Hi Dorian,
>
>> Sorry, but I'm having trouble understanding exactly what's going
>> wrong. You mention the base validator initialization line in the
>> constructor:
>
>> aValidator = AValidator.INSTANCE;
>
>> Are you saying that, unless you set the compliance level to 6.0, this
>> line is not being generated in your BValidator? Or are you saying
>> that it is being generated, but it's not able to compile?
>
>> Cheers,
>> Dave
>
>
>> Dorian Dinh wrote:
>>> Hi,
>>>
>>> My purpose is to generate a Validation file of a genPackage (B) which
>>> depends on another genPackage (A). As the following piece of template
>>> "Validation.javajet" tells us : B-Validator should inialize A-Validator.
>>>
> ************************************************************ ******************
>
>>>
>>> <%for (GenPackage baseGenPackage :
>>> genPackage.getAllValidatorBaseGenPackages()) {%>
>>>
>>> < %=genPackage.getValidatorPackageUniqueSafeName(baseGenPackag e)% >Validator
>>> = <%=baseGenPackage.getImportedValidatorClassName()%>.INSTANCE;
>>> <%}%>
>>>
> ************************************************************ ******************
>
>>>
>>>
>>> The validation generated against my model doesn't compile
>>> (initialization of A-validator is missing) unless I raise the
>>> compliance level on my genmodel to 6.0!
>>>
>>> Did anybody report you this defect ? Is it a real defect or should I
>>> configure my generation platform properly ?
>>> My dev & target platform are compliant EMF 2.3 2007/9/25. I installed
>>> JRE 1.5.0_11, my compiler compliance level is 5.0.
>>>
>>> Any reference point would be helpful,
>>>
>>> Thx forward,
>>>
>>> Dorian.
>>>
>>>
>>>
>>>
>
>
Re: Validation Generation & JRE Compliance [message #416706 is a reply to message #416690] Wed, 13 February 2008 14:34 Go to previous messageGo to next message
dorian_dinh is currently offline dorian_dinhFriend
Messages: 31
Registered: July 2009
Member
Please, may i ask you :
- your eclipse version
- emf version
- target platform (my target platform is Rational Software Development
7.0.5)
- compiler
- jre

Dorian.
Re: Validation Generation & JRE Compliance [message #416715 is a reply to message #416706] Wed, 13 February 2008 20:23 Go to previous message
David Steinberg is currently offline David SteinbergFriend
Messages: 489
Registered: July 2009
Senior Member
Hi Dorian,

I'm using Eclipse 3.4M5 with EMF from CVS HEAD (we can call that EMF
2.4M5), and my target platform is my development platform. I'm using the
Sun 5.0 JRE version 1.5.0_11 and the Eclipse compiler.

Can you reproduce this problem on a vanilla Eclipse+EMF install? If so,
I'd recommend opening a bug with a model that illustrates the problem.

Cheers,
Dave


Dorian Dinh wrote:
> Please, may i ask you :
> - your eclipse version
> - emf version
> - target platform (my target platform is Rational Software Development
> 7.0.5)
> - compiler
> - jre
>
> Dorian.
>
Previous Topic:Custom property tab
Next Topic:how to generate an Ecore from a xml/xmi file?
Goto Forum:
  


Current Time: Thu Apr 18 01:24:28 GMT 2024

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

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

Back to the top