Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Reuse Modisco's genmodel
Reuse Modisco's genmodel [message #684303] 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 #684365 is a reply to message #684303] Wed, 15 June 2011 13:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26287
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
Re: Reuse Modisco's genmodel [message #684403 is a reply to message #684365] 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 #684426 is a reply to message #684403] Wed, 15 June 2011 14:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26287
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
Re: Reuse Modisco's genmodel [message #684556 is a reply to message #684426] Wed, 15 June 2011 19:41 Go to previous messageGo to next 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 #684755 is a reply to message #684556] Thu, 16 June 2011 07:29 Go to previous messageGo to next message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 138
Registered: July 2009
Senior Member
Hi,

thank you for reporting such an issue.
In fact, this issue was already detected and fixed in bug 319265, for Indigo release (0.9.0 version).

Just to make sure, can you check that you are referencing an older version
(0.8.x version) of org.eclipse.gmt.modisco.java plugin ?

Fabien.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: Reuse Modisco's genmodel [message #684761 is a reply to message #684755] Thu, 16 June 2011 07:37 Go to previous message
Eclipse UserFriend
Originally posted by:

On 16.06.11 09.29, Fabien Giquel wrote:
> Hi,
>
> thank you for reporting such an issue.
> In fact, this issue was already detected and fixed in bug 319265, for
> Indigo release (0.9.0 version).
>
> Just to make sure, can you check that you are referencing an older version
> (0.8.x version) of org.eclipse.gmt.modisco.java plugin ?

Yes, I thought I was using 0.9, but used 0.8.2 instead. Time to upgrade!

Hallvard
Previous Topic:I'm looking for a M2M transformation tool for Modisco's Java Model
Next Topic:MoDisco team is organizing an Eclipse DemoCamp for Indigo next week
Goto Forum:
  


Current Time: Mon Dec 22 08:39:25 GMT 2014

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

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