Home » Modeling » MoDisco » Reuse Modisco's genmodel
Reuse Modisco's genmodel [message #684303] |
Wed, 15 June 2011 07:20  |
Eclipse User |
|
|
|
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 09:23   |
Eclipse User |
|
|
|
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 10:19   |
Eclipse User |
|
|
|
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 10:52   |
Eclipse User |
|
|
|
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 15:41   |
Eclipse User |
|
|
|
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 #684761 is a reply to message #684755] |
Thu, 16 June 2011 03:37  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Wed May 14 02:12:58 EDT 2025
Powered by FUDForum. Page generated in 0.12981 seconds
|