Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Reuse Modisco's genmodel
Reuse Modisco's genmodel [message #687202] Wed, 15 June 2011 11:20 Go to next message
Eclipse UserFriend
Originally posted by:

Hi,

I'm working on a tool for building an EMF model from a discovered Java
API, i.e. Modisco's Java model. The EMF model is composed of the Java
model, an Ecore (class) model and the mapping from the Ecore model's
features to the Java model (API). E.g. the model encodes that
EStructuralFeature X in EClass MY corresponds to the getter and setters
getX and setX in class Y.

Since my model refers to Modisco's Java model, my genmodel refers to
this model's genmodel. The latter will not validate:
A containment reference of a type with at container feature of
AnonymousClassDeclaration.classInstanceCreation that requires instances
to be created elsewhere cannot be populated.

Does this mean that I cannot refer to Modisco's model/genmodel from my own?

Hallvard
Re: Reuse Modisco's genmodel [message #687205 is a reply to message #687202] Wed, 15 June 2011 13:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Hallvard,

Note that you can always ignore these types of problems. I.e., if you
look the editor showing the problems, you'll see the other tabs are
still available. This problem just means someone has defined a
bidirectional container/containment reference and has made the container
reference have lower bound 1. I.e., it's asserting that the object, to
be valid, must have that container and hence must be in that container's
containment reference. Putting that object in any other containment
reference would result in an instance invalid. Is this problem being
reported in your model, or in the Modisco one? If the latter, it seems
to me the container reference's bound should be changed. (Note we
noticed this problem in EMF GenModel itself where we'd overlooked the
fact that a GenPackage can be contained by a GenModel or by another
GenPackage, so neither of those corresponding container references can
have lower bound 1.)


Hallvard Trætteberg wrote:
> Hi,
>
> I'm working on a tool for building an EMF model from a discovered Java
> API, i.e. Modisco's Java model. The EMF model is composed of the Java
> model, an Ecore (class) model and the mapping from the Ecore model's
> features to the Java model (API). E.g. the model encodes that
> EStructuralFeature X in EClass MY corresponds to the getter and
> setters getX and setX in class Y.
>
> Since my model refers to Modisco's Java model, my genmodel refers to
> this model's genmodel. The latter will not validate:
> A containment reference of a type with at container feature of
> AnonymousClassDeclaration.classInstanceCreation that requires
> instances to be created elsewhere cannot be populated.
>
> Does this mean that I cannot refer to Modisco's model/genmodel from my
> own?
>
> Hallvard


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reuse Modisco's genmodel [message #687207 is a reply to message #687205] Wed, 15 June 2011 14:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

On 15.06.11 15.23, Ed Merks wrote:
>
> Note that you can always ignore these types of problems. I.e., if you
> look the editor showing the problems, you'll see the other tabs are
> still available.

Yes, I have ignored it so far. But it's pretty annoying, since I have to
reload it pretty often and must switch tab. I was also afraid there was
a hidden problem waiting to jump on me.

> This problem just means someone has defined a
> bidirectional container/containment reference and has made the container
> reference have lower bound 1. I.e., it's asserting that the object, to
> be valid, must have that container and hence must be in that container's
> containment reference. Putting that object in any other containment
> reference would result in an instance invalid. Is this problem being
> reported in your model, or in the Modisco one? If the latter, it seems
> to me the container reference's bound should be changed.

You're right, the lower bound is 1. Unfortunately, it's in the Modisco
model, so I cannot change it. I wonder if they have noticed?

Hallvard
Re: Reuse Modisco's genmodel [message #687208 is a reply to message #687207] Wed, 15 June 2011 14:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Hallvard,

If they've not regenerated, they might not have noticed. I'd suggest
opening a bugzilla. I'm sure they'll want to fix it.


Hallvard Trætteberg wrote:
> On 15.06.11 15.23, Ed Merks wrote:
>>
>> Note that you can always ignore these types of problems. I.e., if you
>> look the editor showing the problems, you'll see the other tabs are
>> still available.
>
> Yes, I have ignored it so far. But it's pretty annoying, since I have
> to reload it pretty often and must switch tab. I was also afraid there
> was a hidden problem waiting to jump on me.
>
>> This problem just means someone has defined a
>> bidirectional container/containment reference and has made the container
>> reference have lower bound 1. I.e., it's asserting that the object, to
>> be valid, must have that container and hence must be in that container's
>> containment reference. Putting that object in any other containment
>> reference would result in an instance invalid. Is this problem being
>> reported in your model, or in the Modisco one? If the latter, it seems
>> to me the container reference's bound should be changed.
>
> You're right, the lower bound is 1. Unfortunately, it's in the Modisco
> model, so I cannot change it. I wonder if they have noticed?
>
> Hallvard


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reuse Modisco's genmodel [message #687210 is a reply to message #687208] Wed, 15 June 2011 19:41 Go to previous message
Eclipse UserFriend
Originally posted by:

On 15.06.11 16.52, Ed Merks wrote:
> Hallvard,
>
> If they've not regenerated, they might not have noticed. I'd suggest
> opening a bugzilla. I'm sure they'll want to fix it.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=349496

> Hallvard Trætteberg wrote:
>> On 15.06.11 15.23, Ed Merks wrote:
>>>
>>> Note that you can always ignore these types of problems. I.e., if you
>>> look the editor showing the problems, you'll see the other tabs are
>>> still available.
>>
>> Yes, I have ignored it so far. But it's pretty annoying, since I have
>> to reload it pretty often and must switch tab. I was also afraid there
>> was a hidden problem waiting to jump on me.
>>
>>> This problem just means someone has defined a
>>> bidirectional container/containment reference and has made the container
>>> reference have lower bound 1. I.e., it's asserting that the object, to
>>> be valid, must have that container and hence must be in that container's
>>> containment reference. Putting that object in any other containment
>>> reference would result in an instance invalid. Is this problem being
>>> reported in your model, or in the Modisco one? If the latter, it seems
>>> to me the container reference's bound should be changed.
>>
>> You're right, the lower bound is 1. Unfortunately, it's in the Modisco
>> model, so I cannot change it. I wonder if they have noticed?
>>
>> Hallvard
Re: Reuse Modisco's genmodel [message #687475 is a reply to message #687202] Wed, 15 June 2011 13:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Hallvard,

Note that you can always ignore these types of problems. I.e., if you
look the editor showing the problems, you'll see the other tabs are
still available. This problem just means someone has defined a
bidirectional container/containment reference and has made the container
reference have lower bound 1. I.e., it's asserting that the object, to
be valid, must have that container and hence must be in that container's
containment reference. Putting that object in any other containment
reference would result in an instance invalid. Is this problem being
reported in your model, or in the Modisco one? If the latter, it seems
to me the container reference's bound should be changed. (Note we
noticed this problem in EMF GenModel itself where we'd overlooked the
fact that a GenPackage can be contained by a GenModel or by another
GenPackage, so neither of those corresponding container references can
have lower bound 1.)


Hallvard Trætteberg wrote:
> Hi,
>
> I'm working on a tool for building an EMF model from a discovered Java
> API, i.e. Modisco's Java model. The EMF model is composed of the Java
> model, an Ecore (class) model and the mapping from the Ecore model's
> features to the Java model (API). E.g. the model encodes that
> EStructuralFeature X in EClass MY corresponds to the getter and
> setters getX and setX in class Y.
>
> Since my model refers to Modisco's Java model, my genmodel refers to
> this model's genmodel. The latter will not validate:
> A containment reference of a type with at container feature of
> AnonymousClassDeclaration.classInstanceCreation that requires
> instances to be created elsewhere cannot be populated.
>
> Does this mean that I cannot refer to Modisco's model/genmodel from my
> own?
>
> Hallvard


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reuse Modisco's genmodel [message #687479 is a reply to message #687205] Wed, 15 June 2011 14:19 Go to previous message
Eclipse UserFriend
Originally posted by:

On 15.06.11 15.23, Ed Merks wrote:
>
> Note that you can always ignore these types of problems. I.e., if you
> look the editor showing the problems, you'll see the other tabs are
> still available.

Yes, I have ignored it so far. But it's pretty annoying, since I have to
reload it pretty often and must switch tab. I was also afraid there was
a hidden problem waiting to jump on me.

> This problem just means someone has defined a
> bidirectional container/containment reference and has made the container
> reference have lower bound 1. I.e., it's asserting that the object, to
> be valid, must have that container and hence must be in that container's
> containment reference. Putting that object in any other containment
> reference would result in an instance invalid. Is this problem being
> reported in your model, or in the Modisco one? If the latter, it seems
> to me the container reference's bound should be changed.

You're right, the lower bound is 1. Unfortunately, it's in the Modisco
model, so I cannot change it. I wonder if they have noticed?

Hallvard
Re: Reuse Modisco's genmodel [message #687480 is a reply to message #687207] Wed, 15 June 2011 14:52 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Hallvard,

If they've not regenerated, they might not have noticed. I'd suggest
opening a bugzilla. I'm sure they'll want to fix it.


Hallvard Trætteberg wrote:
> On 15.06.11 15.23, Ed Merks wrote:
>>
>> Note that you can always ignore these types of problems. I.e., if you
>> look the editor showing the problems, you'll see the other tabs are
>> still available.
>
> Yes, I have ignored it so far. But it's pretty annoying, since I have
> to reload it pretty often and must switch tab. I was also afraid there
> was a hidden problem waiting to jump on me.
>
>> This problem just means someone has defined a
>> bidirectional container/containment reference and has made the container
>> reference have lower bound 1. I.e., it's asserting that the object, to
>> be valid, must have that container and hence must be in that container's
>> containment reference. Putting that object in any other containment
>> reference would result in an instance invalid. Is this problem being
>> reported in your model, or in the Modisco one? If the latter, it seems
>> to me the container reference's bound should be changed.
>
> You're right, the lower bound is 1. Unfortunately, it's in the Modisco
> model, so I cannot change it. I wonder if they have noticed?
>
> Hallvard


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reuse Modisco's genmodel [message #687483 is a reply to message #687208] Wed, 15 June 2011 19:41 Go to previous message
Eclipse UserFriend
Originally posted by:

On 15.06.11 16.52, Ed Merks wrote:
> Hallvard,
>
> If they've not regenerated, they might not have noticed. I'd suggest
> opening a bugzilla. I'm sure they'll want to fix it.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=349496

> Hallvard Trætteberg wrote:
>> On 15.06.11 15.23, Ed Merks wrote:
>>>
>>> Note that you can always ignore these types of problems. I.e., if you
>>> look the editor showing the problems, you'll see the other tabs are
>>> still available.
>>
>> Yes, I have ignored it so far. But it's pretty annoying, since I have
>> to reload it pretty often and must switch tab. I was also afraid there
>> was a hidden problem waiting to jump on me.
>>
>>> This problem just means someone has defined a
>>> bidirectional container/containment reference and has made the container
>>> reference have lower bound 1. I.e., it's asserting that the object, to
>>> be valid, must have that container and hence must be in that container's
>>> containment reference. Putting that object in any other containment
>>> reference would result in an instance invalid. Is this problem being
>>> reported in your model, or in the Modisco one? If the latter, it seems
>>> to me the container reference's bound should be changed.
>>
>> You're right, the lower bound is 1. Unfortunately, it's in the Modisco
>> model, so I cannot change it. I wonder if they have noticed?
>>
>> Hallvard
Previous Topic:EMF query and index
Next Topic:[CDO] access CDO server in same JVM like CDO Sessions view
Goto Forum:
  


Current Time: Tue Apr 23 09:58:41 GMT 2024

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

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

Back to the top