Home » Modeling » EMF » Can't create GenModel if Ecore model contains EReference to class GenPackage
| | |
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Ed Merks Messages: 33140 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 |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Wed Apr 24 23:52:16 GMT 2024
Powered by FUDForum. Page generated in 0.02963 seconds
|