Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Problem using UML Genmodel
Re: Problem using UML Genmodel [message #571995] Wed, 17 January 2007 15:53
Andreas Morf is currently offline Andreas MorfFriend
Messages: 14
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_000E_01C73A58.07A75B90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi James
Thanks for your answer!
Fortunately the problem disappeared unexpectedly when I changed the =
Aggregation attribute of the memberEnd to "none". After switching back =
to 'composite' everything remained ok...

But after some experiences with the Genmodel there are some further =
questions:

- For every implementation class there is a getCacheAdapter() method =
generated (in the uml2.uml-impl-classes there is no such method) - this =
leads to a stack overflow using the generated editor plugin. Deleting =
the method manually resolves the problem. What am I doing wrong with the =
UML-Model/Genmodel?
- In the UML.merged.uml-model used as metamodel, what is the difference =
beween memberEnd Property with <eReference> Stereotype and the ones =
without Stereotype?
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?

And finally a question which is maybe not just related with uml2:
Getting all the sources from CVS (emf: 200701110200 uml2: 200701111331) =
on 3.3M4 there are several errors in the UML2 projects even after =
updating the classpathes (org.eclipse.uml2, .uml2.importer.rose, . Is =
that just a strange behaviour of my environment?

Greets, Andreas


"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eo93md$g96$2@utils.eclipse.org...
Hi Andreas,

I just tried this on my machine with a contrived example and it seemed =
to work fine ( If I understood this correctly ;) ).
Would it be possible for you to send more information or a snippet of =
your metamodel so I can inspect it.
What errors are you seeing in the impl class?

Regards,

- James.

"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eo7rou$ob0$1@utils.eclipse.org...
Hi all
I'm trying to make a new language metamodel on the basis on UML.uml =
and using UML-Genmodel. In principle, the process is working but with =
the following aspect I get into trouble:

- In my metamodel I have two classes with an 1 -- 0..* association
- the creation of the genmodel works well
- after model-code generation, there are errors in the impl-class of =
the 0..* -side: in the following code-snipped the varable ownedrules is =
not declared in the class
- if I change the Multiplicity to 1, the resulting code works
public EList getOwnedrules() {

if (ownedrules =3D=3D null) {

ownedrules =3D new EObjectWithInverseResolvingEList(

MappingRule.class, this,

UMLTPackage.TRANSFORMATION_GROUP__OWNEDRULES,

UMLTPackage.MAPPING_RULE__TGROUP);

}

return ownedrules;

}


In the attachments there are some pictures of the .uml and .genmodel =
to get the context.

Anyone an idea
Regards, Andreas

------=_NextPart_000_000E_01C73A58.07A75B90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi James</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your answer!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Fortunately the problem disappeared =
unexpectedly=20
when I changed the Aggregation attribute of the memberEnd to "none". =
After=20
switching back to 'composite' everything remained ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel there=20
are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation class there =
is a <FONT=20
size=3D2>getCacheAdapter() method generated (in the =
uml2.uml-impl-classes there is=20
no such method) - this leads to a stack overflow using the generated =
editor=20
plugin. Deleting the method manually resolves the problem. What am I =
doing wrong=20
with the UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model used as =
metamodel,=20
what is the difference beween memberEnd Property with &lt;eReference&gt; =

Stereotype and the ones without Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Using an UML-model as metamodel is =
there a=20
special behaviour in Genmodel when using ownedEnd's in associations (as =
in=20
A_general_generalization)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And finally a question which is maybe =
not just=20
related with uml2:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Getting all the sources from CVS (emf: =
200701110200=20
uml2: 200701111331) on 3.3M4 there are several errors in the UML2 =
projects even=20
after updating the classpathes (org.eclipse.uml2, .uml2.importer.rose, . =
Is that=20
just a strange behaviour of my environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"James Bruck" &lt;<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:eo93md$g96$2@utils.eclipse.org">news:eo93md$g96$2@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine with =
a contrived=20
example and it seemed to work fine ( If I understood this correctly =
;)&nbsp;=20
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Would it be possible for you to send =
more=20
information or a snippet of your metamodel so I can inspect =
it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What errors are you seeing in the =
impl=20
class?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Andreas Morf" &lt;<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>&gt; =
wrote=20
in message <A=20
=
href=3D"news:eo7rou$ob0$1@utils.eclipse.org">news:eo7rou$ob0$1@utils.ecli=
pse.org</A>...</DIV>
<DIV>Hi all</DIV>
<DIV>I'm trying to make a new language metamodel on the basis on =
UML.uml and=20
using UML-Genmodel. In principle, the process is working but with =
the=20
following aspect I get into trouble:</DIV>
<DIV>&nbsp;</DIV>
<DIV>- In my metamodel I have two classes with an 1 -- 0..*=20
association</DIV>
<DIV>- the creation of the genmodel works well</DIV>
<DIV>- after model-code generation, there are errors in the =
impl-class of=20
the 0..* -side: in the following code-snipped the varable ownedrules =
is not=20
declared in the class</DIV>
<DIV>- if I change the Multiplicity to 1, the resulting code =
works</DIV>
<DIV><FONT face=3DArial size=3D2>
<P align=3Dleft><B><FONT color=3D#7f0055 =
size=3D2>public</B></FONT><FONT size=3D2>=20
EList getOwnedrules() {</P>
<P align=3Dleft></FONT><B><FONT color=3D#7f0055 =
size=3D2>if</B></FONT><FONT=20
size=3D2> (ownedrules =3D=3D </FONT><B><FONT color=3D#7f0055=20
size=3D2>null</B></FONT><FONT size=3D2>) {</P>
<P align=3Dleft>ownedrules =3D </FONT><B><FONT color=3D#7f0055=20
size=3D2>new</B></FONT><FONT size=3D2> =
EObjectWithInverseResolvingEList(</P>
<P align=3Dleft>MappingRule.</FONT><B><FONT color=3D#7f0055=20
size=3D2>class</B></FONT><FONT size=3D2>, </FONT><B><FONT =
color=3D#7f0055=20
size=3D2>this</B></FONT><FONT size=3D2>,</P>
<P align=3Dleft>UMLTPackage.</FONT><I><FONT color=3D#0000c0=20
size=3D2>TRANSFORMATION_GROUP__OWNEDRULES</I></FONT><FONT =
size=3D2>,</P>
<P align=3Dleft>UMLTPackage.</FONT><I><FONT color=3D#0000c0=20
size=3D2>MAPPING_RULE__TGROUP</I></FONT><FONT size=3D2>);</P>
<P align=3Dleft>}</P>
<P align=3Dleft></FONT><B><FONT color=3D#7f0055 =
size=3D2>return</B></FONT><FONT=20
size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>In the attachments there are some pictures of the .uml and =
..genmodel to=20
get the context.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTML>

------=_NextPart_000_000E_01C73A58.07A75B90--
Previous Topic:2.1M4 available on an update site?
Next Topic:Property Template Parameters
Goto Forum:
  


Current Time: Mon Aug 15 19:19:29 GMT 2022

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

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

Back to the top