Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Can't create GenModel if Ecore model contains EReference to class GenPackage
Can't create GenModel if Ecore model contains EReference to class GenPackage [message #539832] Sun, 13 June 2010 19:35 Go to next message
Mirko Seifert is currently offline Mirko SeifertFriend
Messages: 31
Registered: July 2009
Member
Hi,

I have an Ecore model which contains one EClass "A" that owns a
EReference "ref" of type "GenPackage". The reference is non-containment
and non-container.
Validating the Ecore model does not report any error. But, when I create
a new GenModel using the New File Wizard, the following error is reported:

"A containment reference of a type with a container feature
platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
that requires instances to be contained elsewhere cannot be populated."

This seems to be new behavior added in Eclipse 3.6 since the same model
works in Eclipse 3.5.

Can anyone explain what this error message means?

Thanks a lot,

Mirko
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #540031 is a reply to message #539832] Mon, 14 June 2010 15:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Mirko,

This sounds like an issue in the GenModel itself which was fixed. What
version of EMF are you trying?

There is a new constraint that if there is a container reference with
lower bound that container reference's opposite must be the only
containment reference for objects of that type. In this case, the
GenPackage is not necessarily contained a GenModel because it might be
contained by a GenPackage, so the model was changed.


Mirko Seifert wrote:
> Hi,
>
> I have an Ecore model which contains one EClass "A" that owns a
> EReference "ref" of type "GenPackage". The reference is
> non-containment and non-container.
> Validating the Ecore model does not report any error. But, when I
> create a new GenModel using the New File Wizard, the following error
> is reported:
>
> "A containment reference of a type with a container feature
> platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
> that requires instances to be contained elsewhere cannot be populated."
>
> This seems to be new behavior added in Eclipse 3.6 since the same
> model works in Eclipse 3.5.
>
> Can anyone explain what this error message means?
>
> Thanks a lot,
>
> Mirko


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #540050 is a reply to message #540031] Mon, 14 June 2010 16:57 Go to previous messageGo to next message
Mirko Seifert is currently offline Mirko SeifertFriend
Messages: 31
Registered: July 2009
Member
Hi Ed,

Ed Merks wrote:
> Mirko,
>
> This sounds like an issue in the GenModel itself which was fixed. What
> version of EMF are you trying?

I used Helios RC3. Updating to RC4 solved the problem.

> There is a new constraint that if there is a container reference with
> lower bound that container reference's opposite must be the only
> containment reference for objects of that type. In this case, the
> GenPackage is not necessarily contained a GenModel because it might be
> contained by a GenPackage, so the model was changed.

Yes I've seen the bug report for that. But, since my reference is not a
containment reference, the constraint should not be violated. That's the
reason I was wondering about the reported error.

Thanks for your help!

Cheers,

Mirko
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #647303 is a reply to message #540031] Wed, 05 January 2011 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mluchian.interpro.qc.ca

Hello Ed,

I have the same problem with EMF 2.6.1 (Helios); The Genmodel Editor for
my own model gives the same error Mirko had. I tried opening the same
..genmodel with EMF 2.5.0 (Galileo) and there is absolutely no problem of
the type "A containment reference of a type with a container feature
platform:.... that requires instances to be contained elsewhere cannot
be populated."

Could you confirm if this is a bug or a new setting in EMF 2.6.1 that
would disable this validation?

Thanks,

Mircea

On 14/6/2010 11:38, Ed Merks wrote:
> Mirko,
>
> This sounds like an issue in the GenModel itself which was fixed.
> What version of EMF are you trying?
>
> There is a new constraint that if there is a container reference with
> lower bound that container reference's opposite must be the only
> containment reference for objects of that type. In this case, the
> GenPackage is not necessarily contained a GenModel because it might be
> contained by a GenPackage, so the model was changed.
>
>
> Mirko Seifert wrote:
>> Hi,
>>
>> I have an Ecore model which contains one EClass "A" that owns a
>> EReference "ref" of type "GenPackage". The reference is
>> non-containment and non-container.
>> Validating the Ecore model does not report any error. But, when I
>> create a new GenModel using the New File Wizard, the following error
>> is reported:
>>
>> "A containment reference of a type with a container feature
>> platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
>> that requires instances to be contained elsewhere cannot be populated."
>>
>> This seems to be new behavior added in Eclipse 3.6 since the same
>> model works in Eclipse 3.5.
>>
>> Can anyone explain what this error message means?
>>
>> Thanks a lot,
>>
>> Mirko
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #647304 is a reply to message #540031] Wed, 05 January 2011 15:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mluchian.interpro.qc.ca

Hello Ed,

I have the same problem with EMF 2.6.1 (Helios); The Genmodel Editor for
my own model gives the same error Mirko had. I tried opening the same
..genmodel with EMF 2.5.0 (Galileo) and there is absolutely no problem of
the type "A containment reference of a type with a container feature
platform:.... that requires instances to be contained elsewhere cannot
be populated."

Could you confirm if this is a bug or a new setting in EMF 2.6.1 that
would disable this validation?

Thanks,

Mircea

On 14/6/2010 11:38, Ed Merks wrote:
> Mirko,
>
> This sounds like an issue in the GenModel itself which was fixed.
> What version of EMF are you trying?
>
> There is a new constraint that if there is a container reference with
> lower bound that container reference's opposite must be the only
> containment reference for objects of that type. In this case, the
> GenPackage is not necessarily contained a GenModel because it might be
> contained by a GenPackage, so the model was changed.
>
>
> Mirko Seifert wrote:
>> Hi,
>>
>> I have an Ecore model which contains one EClass "A" that owns a
>> EReference "ref" of type "GenPackage". The reference is
>> non-containment and non-container.
>> Validating the Ecore model does not report any error. But, when I
>> create a new GenModel using the New File Wizard, the following error
>> is reported:
>>
>> "A containment reference of a type with a container feature
>> platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
>> that requires instances to be contained elsewhere cannot be populated."
>>
>> This seems to be new behavior added in Eclipse 3.6 since the same
>> model works in Eclipse 3.5.
>>
>> Can anyone explain what this error message means?
>>
>> Thanks a lot,
>>
>> Mirko
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #647305 is a reply to message #647304] Wed, 05 January 2011 15:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mluchian.utilicase.com

This is very interesting... In EMF 2.6.1, when I change the runtime
level setting in my .genmodel editor from 2.6 to 2.5, the validation
error dissapears.

On 5/1/2011 10:45, M L wrote:
> Hello Ed,
>
> I have the same problem with EMF 2.6.1 (Helios); The Genmodel Editor
> for my own model gives the same error Mirko had. I tried opening the
> same ..genmodel with EMF 2.5.0 (Galileo) and there is absolutely no
> problem of the type "A containment reference of a type with a
> container feature platform:.... that requires instances to be
> contained elsewhere cannot be populated."
>
> Could you confirm if this is a bug or a new setting in EMF 2.6.1 that
> would disable this validation?
>
> Thanks,
>
> Mircea
>
> On 14/6/2010 11:38, Ed Merks wrote:
>> Mirko,
>>
>> This sounds like an issue in the GenModel itself which was fixed.
>> What version of EMF are you trying?
>>
>> There is a new constraint that if there is a container reference with
>> lower bound that container reference's opposite must be the only
>> containment reference for objects of that type. In this case, the
>> GenPackage is not necessarily contained a GenModel because it might be
>> contained by a GenPackage, so the model was changed.
>>
>>
>> Mirko Seifert wrote:
>>> Hi,
>>>
>>> I have an Ecore model which contains one EClass "A" that owns a
>>> EReference "ref" of type "GenPackage". The reference is
>>> non-containment and non-container.
>>> Validating the Ecore model does not report any error. But, when I
>>> create a new GenModel using the New File Wizard, the following error
>>> is reported:
>>>
>>> "A containment reference of a type with a container feature
>>> platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
>>>
>>> that requires instances to be contained elsewhere cannot be populated."
>>>
>>> This seems to be new behavior added in Eclipse 3.6 since the same
>>> model works in Eclipse 3.5.
>>>
>>> Can anyone explain what this error message means?
>>>
>>> Thanks a lot,
>>>
>>> Mirko
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #647344 is a reply to message #647305] Wed, 05 January 2011 17:12 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Mircea,

You really have a model that references GenPackage? It sounds like you
have a model with an actual problem, i.e., you have a container feature
that says it's required (lower bound 1) yet you have another containment
reference that can contain an instance and when it does that container
reference will be null. I.e., it's impossible to populate that other
containment reference and still have the model be valid.

M L wrote:
> This is very interesting... In EMF 2.6.1, when I change the runtime
> level setting in my .genmodel editor from 2.6 to 2.5, the validation
> error dissapears.
>
> On 5/1/2011 10:45, M L wrote:
>> Hello Ed,
>>
>> I have the same problem with EMF 2.6.1 (Helios); The Genmodel Editor
>> for my own model gives the same error Mirko had. I tried opening the
>> same ..genmodel with EMF 2.5.0 (Galileo) and there is absolutely no
>> problem of the type "A containment reference of a type with a
>> container feature platform:.... that requires instances to be
>> contained elsewhere cannot be populated."
>>
>> Could you confirm if this is a bug or a new setting in EMF 2.6.1 that
>> would disable this validation?
>>
>> Thanks,
>>
>> Mircea
>>
>> On 14/6/2010 11:38, Ed Merks wrote:
>>> Mirko,
>>>
>>> This sounds like an issue in the GenModel itself which was fixed.
>>> What version of EMF are you trying?
>>>
>>> There is a new constraint that if there is a container reference with
>>> lower bound that container reference's opposite must be the only
>>> containment reference for objects of that type. In this case, the
>>> GenPackage is not necessarily contained a GenModel because it might be
>>> contained by a GenPackage, so the model was changed.
>>>
>>>
>>> Mirko Seifert wrote:
>>>> Hi,
>>>>
>>>> I have an Ecore model which contains one EClass "A" that owns a
>>>> EReference "ref" of type "GenPackage". The reference is
>>>> non-containment and non-container.
>>>> Validating the Ecore model does not report any error. But, when I
>>>> create a new GenModel using the New File Wizard, the following error
>>>> is reported:
>>>>
>>>> "A containment reference of a type with a container feature
>>>> platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
>>>>
>>>> that requires instances to be contained elsewhere cannot be
>>>> populated."
>>>>
>>>> This seems to be new behavior added in Eclipse 3.6 since the same
>>>> model works in Eclipse 3.5.
>>>>
>>>> Can anyone explain what this error message means?
>>>>
>>>> Thanks a lot,
>>>>
>>>> Mirko


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can't create GenModel if Ecore model contains EReference to class GenPackage [message #647379 is a reply to message #647344] Wed, 05 January 2011 21:02 Go to previous message
Eclipse UserFriend
Originally posted by: mluchian.utilicase.com

Thanks Ed,

In fact yes, there was a problem with my model, and I have solved the
problem.

Mircea

On 5/1/2011 12:12, Ed Merks wrote:
> Mircea,
>
> You really have a model that references GenPackage? It sounds like
> you have a model with an actual problem, i.e., you have a container
> feature that says it's required (lower bound 1) yet you have another
> containment reference that can contain an instance and when it does
> that container reference will be null. I.e., it's impossible to
> populate that other containment reference and still have the model be
> valid.
>
> M L wrote:
>> This is very interesting... In EMF 2.6.1, when I change the runtime
>> level setting in my .genmodel editor from 2.6 to 2.5, the validation
>> error dissapears.
>>
>> On 5/1/2011 10:45, M L wrote:
>>> Hello Ed,
>>>
>>> I have the same problem with EMF 2.6.1 (Helios); The Genmodel Editor
>>> for my own model gives the same error Mirko had. I tried opening the
>>> same ..genmodel with EMF 2.5.0 (Galileo) and there is absolutely no
>>> problem of the type "A containment reference of a type with a
>>> container feature platform:.... that requires instances to be
>>> contained elsewhere cannot be populated."
>>>
>>> Could you confirm if this is a bug or a new setting in EMF 2.6.1
>>> that would disable this validation?
>>>
>>> Thanks,
>>>
>>> Mircea
>>>
>>> On 14/6/2010 11:38, Ed Merks wrote:
>>>> Mirko,
>>>>
>>>> This sounds like an issue in the GenModel itself which was fixed.
>>>> What version of EMF are you trying?
>>>>
>>>> There is a new constraint that if there is a container reference with
>>>> lower bound that container reference's opposite must be the only
>>>> containment reference for objects of that type. In this case, the
>>>> GenPackage is not necessarily contained a GenModel because it might be
>>>> contained by a GenPackage, so the model was changed.
>>>>
>>>>
>>>> Mirko Seifert wrote:
>>>>> Hi,
>>>>>
>>>>> I have an Ecore model which contains one EClass "A" that owns a
>>>>> EReference "ref" of type "GenPackage". The reference is
>>>>> non-containment and non-container.
>>>>> Validating the Ecore model does not report any error. But, when I
>>>>> create a new GenModel using the New File Wizard, the following error
>>>>> is reported:
>>>>>
>>>>> "A containment reference of a type with a container feature
>>>>> platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenMode l.ecore#//GenPackage/genModel
>>>>>
>>>>> that requires instances to be contained elsewhere cannot be
>>>>> populated."
>>>>>
>>>>> This seems to be new behavior added in Eclipse 3.6 since the same
>>>>> model works in Eclipse 3.5.
>>>>>
>>>>> Can anyone explain what this error message means?
>>>>>
>>>>> Thanks a lot,
>>>>>
>>>>> Mirko
Previous Topic:[CDO] Query Language
Next Topic:[Teneo] org.eclipse.emf.teneo.annotations-1.1.2.v201011240719.jar doesn't run with Java 1.5
Goto Forum:
  


Current Time: Tue Apr 16 18:53:49 GMT 2024

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

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

Back to the top