Skip to main content



      Home
Home » Modeling » EMF » Preserve GenModel annotation to verify EOperations are implemented
Preserve GenModel annotation to verify EOperations are implemented [message #1066726] Thu, 04 July 2013 02:35 Go to next message
Eclipse UserFriend
Hello,

I have a large model which implicitly switches to "initialize by loading
..ecore". The ecore it loads is derived from the original ecore
definition upon model generation, and apparently does not contain the
GenModel annotation anymore. I tried "Suppress GenModel Annotations" :=
false, but it didn't help.

Background: I need the GenModel annotations in the model to be able to
write a unit that verifies all my custom EOperations are actually
implemented.

If I can't easily get the GenModel annotations - is there maybe another
way to write such a test?

Thanks
Marius
Re: Preserve GenModel annotation to verify EOperations are implemented [message #1066730 is a reply to message #1066726] Thu, 04 July 2013 02:53 Go to previous messageGo to next message
Eclipse UserFriend
Marius,

Comments below.

On 04/07/2013 8:35 AM, Marius Gröger wrote:
> Hello,
>
> I have a large model which implicitly switches to "initialize by loading
> .ecore". The ecore it loads is derived from the original ecore
> definition upon model generation, and apparently does not contain the
> GenModel annotation anymore.
So the derivation step is not preserving the annotations?
> I tried "Suppress GenModel Annotations" :=
> false, but it didn't help.
If the derived model doesn't contain them, nothing will help...
>
> Background: I need the GenModel annotations in the model to be able to
> write a unit that verifies all my custom EOperations are actually
> implemented.
>
> If I can't easily get the GenModel annotations - is there maybe another
> way to write such a test?
I need to understand the relation between the Ecore model you started
with (which should be available in the model folder of the project, even
at runtime) and the derived one from which you generated...
>
> Thanks
> Marius
Re: Preserve GenModel annotation to verify EOperations are implemented [message #1066742 is a reply to message #1066730] Thu, 04 July 2013 03:56 Go to previous message
Eclipse UserFriend
On 04.07.2013 08:53, Ed Merks wrote:> Marius,
>
> Comments below.
>
> On 04/07/2013 8:35 AM, Marius Gröger wrote:
>> Hello,
>>
>> I have a large model which implicitly switches to "initialize by loading
>> .ecore". The ecore it loads is derived from the original ecore
>> definition upon model generation, and apparently does not contain the
>> GenModel annotation anymore.
> So the derivation step is not preserving the annotations?

I checked again and I think I found my issue: I'm using multiple models
which are derived from each other and I accidentally had looked at an
EOperation of a model which I had not generated with "Suppress GenModel
Annotations".

>> If I can't easily get the GenModel annotations - is there maybe another
>> way to write such a test?

Anyway I'm using only methods without arguments and will now write my
tests such that I create an object instance and call the EOperation.
Since I demand anyway that the operation shall never throw an exception,
I will now just check that that is no exception (ie. no
UnsupportedOperationException or anything else).

Regards
Marius
Previous Topic:Is there a headless feature fur running MWE2 workflows?
Next Topic:[CDO 4.2] Broken pipe on TCPSelector
Goto Forum:
  


Current Time: Sun Jul 13 13:11:57 EDT 2025

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

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

Back to the top