Home » Modeling » UML2 » Re: Problem using UML Genmodel
Re: Problem using UML Genmodel [message #468510] |
Wed, 17 January 2007 15:53 |
Andreas Morf 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> </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> </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 <eReference> =
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> </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> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> 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> </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 =
;) =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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
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> </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> </DIV>
<DIV>In the attachments there are some pictures of the .uml and =
..genmodel to=20
get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTML>
------=_NextPart_000_000E_01C73A58.07A75B90--
|
|
|
Re: Problem using UML Genmodel [message #468524 is a reply to message #468510] |
Fri, 19 January 2007 02:34 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0080_01C73B48.610BDD00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back to =
you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when converting =
from UMLto Ecore. Specific code generation details might be necessary =
for those items with stereotypes applied. Sometimes information is =
provided in the stereotype to allow conversion from Ecore to UML and =
back to Ecore and preserve the integrity of the original .ecore model ( =
ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not aware =
of unique behavior for this. I'll discuss it with Kenn and get back to =
you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do however =
have some issues with org.eclipse.emf.importer.rose. .. may not be the =
same issue you are having but these problems are a result of .jars =
needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided here, =
make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_0080_01C73B48.610BDD00
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.2900.2995" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote in=20
message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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=20
is 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=20
wrong with the UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one I'll =
have to=20
investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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 =
<eReference>=20
Stereotype and the ones without Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore stereotype =
provides=20
information when converting from UMLto Ecore. Specific code =
generation=20
details might be necessary for those items with stereotypes =
applied. =20
Sometimes information is provided in the stereotype to allow =
conversion from=20
Ecore to UML and back to Ecore and preserve the integrity of the =
original=20
.ecore model ( ie. round tripping ).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean about =
"special=20
behavior". I'm not aware of unique behavior for =
this. I'll=20
discuss it with Kenn and get back to you if there is something unique=20
here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors in =
the UML2=20
projects even after updating the classpathes (org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build issues for =
the uml2=20
project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the same =
issue you=20
are having but these problems are a result of .jars needed for=20
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's that =
explain how to=20
resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or the =
examples=20
provided here, make sure you have the 2 jar files required by this =
plugin=20
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files=20
required by the </FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If=20
necessary, Eclipse can generate them for you. All you need to do is to =
run the=20
Ant script created by PDE when you right click on the manifest file =
and select=20
"PDE Tools>Create Ant Build File". </FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any issues =
with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message=20
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood this=20
correctly ;) ).</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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
and using UML-Genmodel. In principle, the process is working but =
with the=20
following aspect I get into trouble:</DIV>
<DIV> </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=20
not 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> </DIV>
<DIV>In the attachments there are some pictures of the .uml and =
..genmodel=20
to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BODY=
></HTML>
------=_NextPart_000_0080_01C73B48.610BDD00--
|
|
|
Re: Problem using UML Genmodel [message #468525 is a reply to message #468510] |
Fri, 19 January 2007 03:01 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_078A_01C73B4C.33147340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Andreas,
Regarding the errors, please ensure that you only have the following =
projects checked out (from HEAD):
org.eclipse.uml2-feature
org.eclipse.uml2-plugin
org.eclipse.uml2.codegen.ecore
org.eclipse.uml2.codegen.ecore.ui
org.eclipse.uml2.common
org.eclipse.uml2.common.edit
org.eclipse.uml2.doc-feature
org.eclipse.uml2.doc-plugin
org.eclipse.uml2.examples-feature
org.eclipse.uml2.examples-plugin
org.eclipse.uml2.examples.uml.ui
org.eclipse.uml2.sdk-feature
org.eclipse.uml2.tests-feature
org.eclipse.uml2.tests-plugin
org.eclipse.uml2.uml
org.eclipse.uml2.uml.ecore.exporter
org.eclipse.uml2.uml.ecore.importer
org.eclipse.uml2.uml.edit
org.eclipse.uml2.uml.editor
org.eclipse.uml2.uml.resources
org.eclipse.uml2.uml.tests
Kenn
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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_078A_01C73B4C.33147340
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.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regarding the errors, please ensure =
that you only=20
have the following projects checked out (from HEAD):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>org.eclipse.uml2-feature<BR>org.eclipse.uml2-plugin<BR >org.eclipse.u=
ml2.codegen.ecore<BR>org.eclipse.uml2.codegen.ecore.ui<BR >org.eclipse.uml=
2.common<BR>org.eclipse.uml2.common.edit<BR>org.eclipse.uml2.doc-feature <=
BR>org.eclipse.uml2.doc-plugin<BR>org.eclipse.uml2.examples-feature <BR>or=
g.eclipse.uml2.examples-plugin<BR>org.eclipse.uml2.examples.uml.ui <BR>org=
..eclipse.uml2.sdk-feature<BR>org.eclipse.uml2.tests-feature <BR>org.eclips=
e.uml2.tests-plugin<BR>org.eclipse.uml2.uml<BR>org.eclipse.uml2.uml.ecore=
..exporter<BR>org.eclipse.uml2.uml.ecore.importer<BR>org.eclipse.uml2.uml.=
edit<BR>org.eclipse.uml2.uml.editor<BR>org.eclipse.uml2.uml.resources <BR>=
org.eclipse.uml2.uml.tests<BR></DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote in=20
message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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=20
is 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=20
wrong 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 =
<eReference>=20
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> </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:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors in =
the UML2=20
projects even after updating the classpathes (org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message=20
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood this=20
correctly ;) ).</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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
and using UML-Genmodel. In principle, the process is working but =
with the=20
following aspect I get into trouble:</DIV>
<DIV> </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=20
not 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> </DIV>
<DIV>In the attachments there are some pictures of the .uml and =
..genmodel=20
to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BODY=
></HTML>
------=_NextPart_000_078A_01C73B4C.33147340--
|
|
|
Re: Problem using UML Genmodel [message #468526 is a reply to message #468524] |
Fri, 19 January 2007 03:10 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_079D_01C73B4D.6CDA39B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
- Could you provide more details on the stack overflow you are seeing? =
Every "model root" class will have this method in it, but it's not clear =
to me why this would result in a stack overflow...
- Association ends that are owned by the assocation are ignored when =
converting UML models to Ecore.
Kenn
"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eopai8$174$1@utils.eclipse.org...
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back to =
you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when =
converting from UMLto Ecore. Specific code generation details might be =
necessary for those items with stereotypes applied. Sometimes =
information is provided in the stereotype to allow conversion from Ecore =
to UML and back to Ecore and preserve the integrity of the original =
..ecore model ( ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not =
aware of unique behavior for this. I'll discuss it with Kenn and get =
back to you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do =
however have some issues with org.eclipse.emf.importer.rose. .. may =
not be the same issue you are having but these problems are a result of =
..jars needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided =
here, make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_079D_01C73B4D.6CDA39B0
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.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>- Could you provide more details on the =
stack=20
overflow you are seeing? Every "model root" class will have this method =
in it,=20
but it's not clear to me why this would result in a stack=20
overflow...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Association ends that are owned by =
the assocation=20
are ignored when converting UML models to Ecore.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message <A=20
=
href=3D"news:eopai8$174$1@utils.eclipse.org">news:eopai8$174$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote=20
in message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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 when I changed the Aggregation attribute of the =
memberEnd to=20
"none". After switching back to 'composite' everything remained=20
ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation class =
there is a=20
<FONT size=3D2>getCacheAdapter() method generated (in the=20
uml2.uml-impl-classes there is no such method) - this leads to a =
stack=20
overflow using the generated editor plugin. Deleting the method =
manually=20
resolves the problem. What am I doing wrong with the=20
UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one =
I'll have to=20
investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model used =
as=20
metamodel, what is the difference beween memberEnd Property with=20
<eReference> Stereotype and the ones without =
Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore stereotype =
provides=20
information when converting from UMLto Ecore. Specific code =
generation=20
details might be necessary for those items with stereotypes =
applied. =20
Sometimes information is provided in the stereotype to allow =
conversion from=20
Ecore to UML and back to Ecore and preserve the integrity of the =
original=20
.ecore model ( ie. round tripping ).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean about =
"special=20
behavior". I'm not aware of unique behavior for =
this. I'll=20
discuss it with Kenn and get back to you if there is something =
unique=20
here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors =
in the=20
UML2 projects even after updating the classpathes (org.eclipse.uml2, =
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build issues =
for the uml2=20
project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the same =
issue you=20
are having but these problems are a result of .jars needed for=20
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's that =
explain how=20
to resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT =
size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or the =
examples=20
provided here, make sure you have the 2 jar files required by this =
plugin=20
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 =
jar files=20
required by the </FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If=20
necessary, Eclipse can generate them for you. All you need to do is =
to run=20
the Ant script created by PDE when you right click on the manifest =
file and=20
select "PDE Tools>Create Ant Build File". =
</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any issues =
with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote =
in message=20
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood =
this=20
correctly ;) ).</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=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
and using UML-Genmodel. In principle, the process is working but =
with=20
the following aspect I get into trouble:</DIV>
<DIV> </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=20
of the 0..* -side: in the following code-snipped the varable =
ownedrules=20
is not 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=20
size=3D2> 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=20
size=3D2>return</B></FONT><FONT size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the attachments there are some pictures of the .uml and=20
.genmodel to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
=
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BLOC=
KQUOTE></BODY></HTML>
------=_NextPart_000_079D_01C73B4D.6CDA39B0--
|
|
|
Re: Problem using UML Genmodel [message #468690 is a reply to message #468526] |
Fri, 19 January 2007 16:49 |
Andreas Morf Messages: 14 Registered: July 2009 |
Junior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0036_01C73BF2.2DD55AB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Kenn,
I don't know how and why it comes, but now, there is no such method =
anymore when generating the model code - strange!
I will send you the details as soon as the problem occurs again...
So, how do you markup a class as a "model root" class in the genmodel?
Andreas
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eopcql$mcq$1@utils.eclipse.org...
- Could you provide more details on the stack overflow you are seeing? =
Every "model root" class will have this method in it, but it's not clear =
to me why this would result in a stack overflow...
- Association ends that are owned by the assocation are ignored when =
converting UML models to Ecore.
Kenn
"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eopai8$174$1@utils.eclipse.org...
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back =
to you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when =
converting from UMLto Ecore. Specific code generation details might be =
necessary for those items with stereotypes applied. Sometimes =
information is provided in the stereotype to allow conversion from Ecore =
to UML and back to Ecore and preserve the integrity of the original =
..ecore model ( ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not =
aware of unique behavior for this. I'll discuss it with Kenn and get =
back to you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do =
however have some issues with org.eclipse.emf.importer.rose. .. may =
not be the same issue you are having but these problems are a result of =
..jars needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided =
here, make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_0036_01C73BF2.2DD55AB0
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>Kenn,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I don't know how and why it comes, but =
now, there=20
is no such method anymore when generating the model code - =
strange!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I will send you the details as soon as =
the problem=20
occurs again...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So, how do you markup a class as a =
"model root"=20
class in the genmodel?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Andreas</FONT></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>"Kenn Hussey" <<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>> wrote in =
message=20
<A=20
=
href=3D"news:eopcql$mcq$1@utils.eclipse.org">news:eopcql$mcq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>- Could you provide more details on =
the stack=20
overflow you are seeing? Every "model root" class will have this =
method in it,=20
but it's not clear to me why this would result in a stack=20
overflow...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Association ends that are owned by =
the=20
assocation are ignored when converting UML models to =
Ecore.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message=20
<A=20
=
href=3D"news:eopai8$174$1@utils.eclipse.org">news:eopai8$174$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below =
....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote in message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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=20
unexpectedly when I changed the Aggregation attribute of the =
memberEnd to=20
"none". After switching back to 'composite' everything remained=20
ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with =
the Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation class =
there is a=20
<FONT size=3D2>getCacheAdapter() method generated (in the=20
uml2.uml-impl-classes there is no such method) - this leads to a =
stack=20
overflow using the generated editor plugin. Deleting the method =
manually=20
resolves the problem. What am I doing wrong with the=20
UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one =
I'll have to=20
investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model =
used as=20
metamodel, what is the difference beween memberEnd Property with=20
<eReference> Stereotype and the ones without=20
Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore stereotype =
provides=20
information when converting from UMLto Ecore. Specific code=20
generation details might be necessary for those items with =
stereotypes=20
applied. Sometimes information is provided in the stereotype =
to=20
allow conversion from Ecore to UML and back to Ecore and preserve =
the=20
integrity of the original .ecore model ( ie. round tripping=20
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean =
about "special=20
behavior". I'm not aware of unique behavior for =
this. =20
I'll discuss it with Kenn and get back to you if there is =
something unique=20
here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>And finally a question which is =
maybe not=20
just related with uml2:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Getting all the sources from CVS =
(emf:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors =
in the=20
UML2 projects even after updating the classpathes =
(org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build issues =
for the=20
uml2 project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the same =
issue=20
you are having but these problems are a result of .jars needed for =
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's =
that explain=20
how to resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT =
size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or the =
examples=20
provided here, make sure you have the 2 jar files required by this =
plugin=20
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 =
jar=20
files required by the </FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If=20
necessary, Eclipse can generate them for you. All you need to do =
is to run=20
the Ant script created by PDE when you right click on the manifest =
file=20
and select "PDE Tools>Create Ant Build File".=20
</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any issues =
with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> =
wrote in=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood =
this=20
correctly ;) ).</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=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
UML.uml and using UML-Genmodel. In principle, the process is =
working=20
but with the following aspect I get into trouble:</DIV>
<DIV> </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=20
of the 0..* -side: in the following code-snipped the varable=20
ownedrules is not declared in the class</DIV>
<DIV>- if I change the Multiplicity to 1, the resulting code=20
works</DIV>
<DIV><FONT face=3DArial size=3D2>
<P align=3Dleft><B><FONT color=3D#7f0055 =
size=3D2>public</B></FONT><FONT=20
size=3D2> 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 =
size=3D2>new</B></FONT><FONT size=3D2>=20
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=20
size=3D2>return</B></FONT><FONT size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the attachments there are some pictures of the .uml =
and=20
.genmodel to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
=
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BLOC=
KQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0036_01C73BF2.2DD55AB0--
|
|
|
Re: Problem using UML Genmodel [message #468693 is a reply to message #468690] |
Fri, 19 January 2007 18:05 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_07E8_01C73BCA.837935E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Andreas,
Whether a class is considered a model root is determined in EMF like =
this:
public boolean isModelRoot()
{
return getClassExtendsGenClass() =3D=3D null || =
getClassExtendsGenClass().getGenModel() !=3D getGenModel();
}
Kenn
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eoqsqu$i5o$1@utils.eclipse.org...
Kenn,
I don't know how and why it comes, but now, there is no such method =
anymore when generating the model code - strange!
I will send you the details as soon as the problem occurs again...
So, how do you markup a class as a "model root" class in the genmodel?
Andreas
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eopcql$mcq$1@utils.eclipse.org...
- Could you provide more details on the stack overflow you are =
seeing? Every "model root" class will have this method in it, but it's =
not clear to me why this would result in a stack overflow...
- Association ends that are owned by the assocation are ignored when =
converting UML models to Ecore.
Kenn
"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eopai8$174$1@utils.eclipse.org...
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back =
to you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when =
converting from UMLto Ecore. Specific code generation details might be =
necessary for those items with stereotypes applied. Sometimes =
information is provided in the stereotype to allow conversion from Ecore =
to UML and back to Ecore and preserve the integrity of the original =
..ecore model ( ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour =
in Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not =
aware of unique behavior for this. I'll discuss it with Kenn and get =
back to you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do =
however have some issues with org.eclipse.emf.importer.rose. .. may =
not be the same issue you are having but these problems are a result of =
..jars needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided =
here, make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_07E8_01C73BCA.837935E0
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.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Whether a class is considered a model =
root is=20
determined in EMF like this:</FONT></DIV>
<DIV><B><FONT color=3D#7f0055 size=3D2></FONT></B> </DIV>
<DIV><B><FONT color=3D#7f0055 size=3D2>public</B></FONT><FONT size=3D2>=20
</FONT><B><FONT color=3D#7f0055 size=3D2>boolean</B></FONT><FONT =
size=3D2>=20
isModelRoot()</FONT></DIV>
<DIV><FONT size=3D2>{</FONT></DIV>
<DIV><B><FONT color=3D#7f0055 size=3D2> =
return</B></FONT><FONT=20
size=3D2> getClassExtendsGenClass() =3D=3D </FONT><B><FONT =
color=3D#7f0055=20
size=3D2>null</B></FONT><FONT size=3D2> || =
getClassExtendsGenClass().getGenModel()=20
!=3D getGenModel();</FONT></DIV>
<DIV><FONT size=3D2>}</DIV></FONT>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote in=20
message <A=20
=
href=3D"news:eoqsqu$i5o$1@utils.eclipse.org">news:eoqsqu$i5o$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I don't know how and why it comes, =
but now, there=20
is no such method anymore when generating the model code -=20
strange!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I will send you the details as soon =
as the=20
problem occurs again...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So, how do you markup a class as a =
"model root"=20
class in the genmodel?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Andreas</FONT></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>"Kenn Hussey" <<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>> wrote =
in message=20
<A=20
=
href=3D"news:eopcql$mcq$1@utils.eclipse.org">news:eopcql$mcq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>- Could you provide more details on =
the stack=20
overflow you are seeing? Every "model root" class will have this =
method in=20
it, but it's not clear to me why this would result in a stack=20
overflow...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Association ends that are owned =
by the=20
assocation are ignored when converting UML models to =
Ecore.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote =
in message=20
<A=20
=
href=3D"news:eopai8$174$1@utils.eclipse.org">news:eopai8$174$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below =
....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote in message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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=20
unexpectedly when I changed the Aggregation attribute of the =
memberEnd=20
to "none". After switching back to 'composite' everything =
remained=20
ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with =
the=20
Genmodel there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation =
class there is a=20
<FONT size=3D2>getCacheAdapter() method generated (in the=20
uml2.uml-impl-classes there is no such method) - this leads to a =
stack=20
overflow using the generated editor plugin. Deleting the method =
manually=20
resolves the problem. What am I doing wrong with the=20
UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one =
I'll have=20
to investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model =
used as=20
metamodel, what is the difference beween memberEnd Property with =
<eReference> Stereotype and the ones without=20
Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore =
stereotype provides=20
information when converting from UMLto Ecore. Specific =
code=20
generation details might be necessary for those items with =
stereotypes=20
applied. Sometimes information is provided in the =
stereotype to=20
allow conversion from Ecore to UML and back to Ecore and =
preserve the=20
integrity of the original .ecore model ( ie. round tripping=20
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Using an UML-model as =
metamodel is there=20
a special behaviour in Genmodel when using ownedEnd's in =
associations=20
(as in A_general_generalization)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean =
about "special=20
behavior". I'm not aware of unique behavior for =
this. =20
I'll discuss it with Kenn and get back to you if there is =
something=20
unique here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>And finally a question which is =
maybe not=20
just related with uml2:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Getting all the sources from =
CVS (emf:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several =
errors in=20
the UML2 projects even after updating the classpathes =
(org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build =
issues for the=20
uml2 project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the =
same issue=20
you are having but these problems are a result of .jars needed =
for=20
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's =
that explain=20
how to resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT =
size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or =
the examples=20
provided here, make sure you have the 2 jar files required by =
this=20
plugin ("importer.rose.jar" and "importer.rose.tasks.jar") and =
also the=20
2 jar files required by the =
</FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar").=20
If necessary, Eclipse can generate them for you. All you need to =
do is=20
to run the Ant script created by PDE when you right click on the =
manifest file and select "PDE Tools>Create Ant Build File".=20
</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any =
issues with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> =
wrote in=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my =
machine with a=20
contrived example and it seemed to work fine ( If I understood =
this=20
correctly ;) ).</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=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
UML.uml and using UML-Genmodel. In principle, the process is =
working=20
but with the following aspect I get into trouble:</DIV>
<DIV> </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=20
impl-class of the 0..* -side: in the following code-snipped =
the=20
varable ownedrules is not 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=20
size=3D2> EList getOwnedrules() {</P>
<P align=3Dleft></FONT><B><FONT color=3D#7f0055=20
size=3D2>if</B></FONT><FONT size=3D2> (ownedrules =3D=3D =
</FONT><B><FONT=20
color=3D#7f0055 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>=20
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=20
size=3D2>return</B></FONT><FONT size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the attachments there are some pictures of the .uml =
and=20
.genmodel to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
=
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BLOC=
KQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_07E8_01C73BCA.837935E0--
|
|
| | |
Re: Problem using UML Genmodel [message #572451 is a reply to message #468510] |
Fri, 19 January 2007 02:34 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0080_01C73B48.610BDD00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back to =
you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when converting =
from UMLto Ecore. Specific code generation details might be necessary =
for those items with stereotypes applied. Sometimes information is =
provided in the stereotype to allow conversion from Ecore to UML and =
back to Ecore and preserve the integrity of the original .ecore model ( =
ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not aware =
of unique behavior for this. I'll discuss it with Kenn and get back to =
you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do however =
have some issues with org.eclipse.emf.importer.rose. .. may not be the =
same issue you are having but these problems are a result of .jars =
needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided here, =
make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_0080_01C73B48.610BDD00
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.2900.2995" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote in=20
message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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=20
is 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=20
wrong with the UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one I'll =
have to=20
investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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 =
<eReference>=20
Stereotype and the ones without Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore stereotype =
provides=20
information when converting from UMLto Ecore. Specific code =
generation=20
details might be necessary for those items with stereotypes =
applied. =20
Sometimes information is provided in the stereotype to allow =
conversion from=20
Ecore to UML and back to Ecore and preserve the integrity of the =
original=20
.ecore model ( ie. round tripping ).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean about =
"special=20
behavior". I'm not aware of unique behavior for =
this. I'll=20
discuss it with Kenn and get back to you if there is something unique=20
here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors in =
the UML2=20
projects even after updating the classpathes (org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build issues for =
the uml2=20
project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the same =
issue you=20
are having but these problems are a result of .jars needed for=20
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's that =
explain how to=20
resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or the =
examples=20
provided here, make sure you have the 2 jar files required by this =
plugin=20
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files=20
required by the </FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If=20
necessary, Eclipse can generate them for you. All you need to do is to =
run the=20
Ant script created by PDE when you right click on the manifest file =
and select=20
"PDE Tools>Create Ant Build File". </FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any issues =
with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message=20
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood this=20
correctly ;) ).</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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
and using UML-Genmodel. In principle, the process is working but =
with the=20
following aspect I get into trouble:</DIV>
<DIV> </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=20
not 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> </DIV>
<DIV>In the attachments there are some pictures of the .uml and =
..genmodel=20
to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BODY=
></HTML>
------=_NextPart_000_0080_01C73B48.610BDD00--
|
|
|
Re: Problem using UML Genmodel [message #572487 is a reply to message #468510] |
Fri, 19 January 2007 03:01 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_078A_01C73B4C.33147340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Andreas,
Regarding the errors, please ensure that you only have the following =
projects checked out (from HEAD):
org.eclipse.uml2-feature
org.eclipse.uml2-plugin
org.eclipse.uml2.codegen.ecore
org.eclipse.uml2.codegen.ecore.ui
org.eclipse.uml2.common
org.eclipse.uml2.common.edit
org.eclipse.uml2.doc-feature
org.eclipse.uml2.doc-plugin
org.eclipse.uml2.examples-feature
org.eclipse.uml2.examples-plugin
org.eclipse.uml2.examples.uml.ui
org.eclipse.uml2.sdk-feature
org.eclipse.uml2.tests-feature
org.eclipse.uml2.tests-plugin
org.eclipse.uml2.uml
org.eclipse.uml2.uml.ecore.exporter
org.eclipse.uml2.uml.ecore.importer
org.eclipse.uml2.uml.edit
org.eclipse.uml2.uml.editor
org.eclipse.uml2.uml.resources
org.eclipse.uml2.uml.tests
Kenn
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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_078A_01C73B4C.33147340
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.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regarding the errors, please ensure =
that you only=20
have the following projects checked out (from HEAD):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>org.eclipse.uml2-feature<BR>org.eclipse.uml2-plugin<BR >org.eclipse.u=
ml2.codegen.ecore<BR>org.eclipse.uml2.codegen.ecore.ui<BR >org.eclipse.uml=
2.common<BR>org.eclipse.uml2.common.edit<BR>org.eclipse.uml2.doc-feature <=
BR>org.eclipse.uml2.doc-plugin<BR>org.eclipse.uml2.examples-feature <BR>or=
g.eclipse.uml2.examples-plugin<BR>org.eclipse.uml2.examples.uml.ui <BR>org=
..eclipse.uml2.sdk-feature<BR>org.eclipse.uml2.tests-feature <BR>org.eclips=
e.uml2.tests-plugin<BR>org.eclipse.uml2.uml<BR>org.eclipse.uml2.uml.ecore=
..exporter<BR>org.eclipse.uml2.uml.ecore.importer<BR>org.eclipse.uml2.uml.=
edit<BR>org.eclipse.uml2.uml.editor<BR>org.eclipse.uml2.uml.resources <BR>=
org.eclipse.uml2.uml.tests<BR></DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote in=20
message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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=20
is 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=20
wrong 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 =
<eReference>=20
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> </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:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors in =
the UML2=20
projects even after updating the classpathes (org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message=20
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood this=20
correctly ;) ).</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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
and using UML-Genmodel. In principle, the process is working but =
with the=20
following aspect I get into trouble:</DIV>
<DIV> </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=20
not 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> </DIV>
<DIV>In the attachments there are some pictures of the .uml and =
..genmodel=20
to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BODY=
></HTML>
------=_NextPart_000_078A_01C73B4C.33147340--
|
|
|
Re: Problem using UML Genmodel [message #572540 is a reply to message #468524] |
Fri, 19 January 2007 03:10 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_079D_01C73B4D.6CDA39B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
- Could you provide more details on the stack overflow you are seeing? =
Every "model root" class will have this method in it, but it's not clear =
to me why this would result in a stack overflow...
- Association ends that are owned by the assocation are ignored when =
converting UML models to Ecore.
Kenn
"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eopai8$174$1@utils.eclipse.org...
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back to =
you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when =
converting from UMLto Ecore. Specific code generation details might be =
necessary for those items with stereotypes applied. Sometimes =
information is provided in the stereotype to allow conversion from Ecore =
to UML and back to Ecore and preserve the integrity of the original =
..ecore model ( ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not =
aware of unique behavior for this. I'll discuss it with Kenn and get =
back to you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do =
however have some issues with org.eclipse.emf.importer.rose. .. may =
not be the same issue you are having but these problems are a result of =
..jars needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided =
here, make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_079D_01C73B4D.6CDA39B0
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.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>- Could you provide more details on the =
stack=20
overflow you are seeing? Every "model root" class will have this method =
in it,=20
but it's not clear to me why this would result in a stack=20
overflow...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Association ends that are owned by =
the assocation=20
are ignored when converting UML models to Ecore.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message <A=20
=
href=3D"news:eopai8$174$1@utils.eclipse.org">news:eopai8$174$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote=20
in message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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 when I changed the Aggregation attribute of the =
memberEnd to=20
"none". After switching back to 'composite' everything remained=20
ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with the =
Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation class =
there is a=20
<FONT size=3D2>getCacheAdapter() method generated (in the=20
uml2.uml-impl-classes there is no such method) - this leads to a =
stack=20
overflow using the generated editor plugin. Deleting the method =
manually=20
resolves the problem. What am I doing wrong with the=20
UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one =
I'll have to=20
investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model used =
as=20
metamodel, what is the difference beween memberEnd Property with=20
<eReference> Stereotype and the ones without =
Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore stereotype =
provides=20
information when converting from UMLto Ecore. Specific code =
generation=20
details might be necessary for those items with stereotypes =
applied. =20
Sometimes information is provided in the stereotype to allow =
conversion from=20
Ecore to UML and back to Ecore and preserve the integrity of the =
original=20
.ecore model ( ie. round tripping ).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean about =
"special=20
behavior". I'm not aware of unique behavior for =
this. I'll=20
discuss it with Kenn and get back to you if there is something =
unique=20
here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors =
in the=20
UML2 projects even after updating the classpathes (org.eclipse.uml2, =
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build issues =
for the uml2=20
project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the same =
issue you=20
are having but these problems are a result of .jars needed for=20
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's that =
explain how=20
to resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT =
size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or the =
examples=20
provided here, make sure you have the 2 jar files required by this =
plugin=20
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 =
jar files=20
required by the </FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If=20
necessary, Eclipse can generate them for you. All you need to do is =
to run=20
the Ant script created by PDE when you right click on the manifest =
file and=20
select "PDE Tools>Create Ant Build File". =
</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any issues =
with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote =
in message=20
<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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood =
this=20
correctly ;) ).</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=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
and using UML-Genmodel. In principle, the process is working but =
with=20
the following aspect I get into trouble:</DIV>
<DIV> </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=20
of the 0..* -side: in the following code-snipped the varable =
ownedrules=20
is not 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=20
size=3D2> 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=20
size=3D2>return</B></FONT><FONT size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the attachments there are some pictures of the .uml and=20
.genmodel to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
=
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BLOC=
KQUOTE></BODY></HTML>
------=_NextPart_000_079D_01C73B4D.6CDA39B0--
|
|
|
Re: Problem using UML Genmodel [message #572722 is a reply to message #468526] |
Fri, 19 January 2007 16:49 |
Andreas Morf Messages: 14 Registered: July 2009 |
Junior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0036_01C73BF2.2DD55AB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Kenn,
I don't know how and why it comes, but now, there is no such method =
anymore when generating the model code - strange!
I will send you the details as soon as the problem occurs again...
So, how do you markup a class as a "model root" class in the genmodel?
Andreas
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eopcql$mcq$1@utils.eclipse.org...
- Could you provide more details on the stack overflow you are seeing? =
Every "model root" class will have this method in it, but it's not clear =
to me why this would result in a stack overflow...
- Association ends that are owned by the assocation are ignored when =
converting UML models to Ecore.
Kenn
"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eopai8$174$1@utils.eclipse.org...
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back =
to you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when =
converting from UMLto Ecore. Specific code generation details might be =
necessary for those items with stereotypes applied. Sometimes =
information is provided in the stereotype to allow conversion from Ecore =
to UML and back to Ecore and preserve the integrity of the original =
..ecore model ( ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour in =
Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not =
aware of unique behavior for this. I'll discuss it with Kenn and get =
back to you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do =
however have some issues with org.eclipse.emf.importer.rose. .. may =
not be the same issue you are having but these problems are a result of =
..jars needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided =
here, make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_0036_01C73BF2.2DD55AB0
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>Kenn,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I don't know how and why it comes, but =
now, there=20
is no such method anymore when generating the model code - =
strange!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I will send you the details as soon as =
the problem=20
occurs again...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So, how do you markup a class as a =
"model root"=20
class in the genmodel?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Andreas</FONT></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>"Kenn Hussey" <<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>> wrote in =
message=20
<A=20
=
href=3D"news:eopcql$mcq$1@utils.eclipse.org">news:eopcql$mcq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>- Could you provide more details on =
the stack=20
overflow you are seeing? Every "model root" class will have this =
method in it,=20
but it's not clear to me why this would result in a stack=20
overflow...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Association ends that are owned by =
the=20
assocation are ignored when converting UML models to =
Ecore.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote in =
message=20
<A=20
=
href=3D"news:eopai8$174$1@utils.eclipse.org">news:eopai8$174$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below =
....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote in message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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=20
unexpectedly when I changed the Aggregation attribute of the =
memberEnd to=20
"none". After switching back to 'composite' everything remained=20
ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with =
the Genmodel=20
there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation class =
there is a=20
<FONT size=3D2>getCacheAdapter() method generated (in the=20
uml2.uml-impl-classes there is no such method) - this leads to a =
stack=20
overflow using the generated editor plugin. Deleting the method =
manually=20
resolves the problem. What am I doing wrong with the=20
UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one =
I'll have to=20
investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model =
used as=20
metamodel, what is the difference beween memberEnd Property with=20
<eReference> Stereotype and the ones without=20
Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore stereotype =
provides=20
information when converting from UMLto Ecore. Specific code=20
generation details might be necessary for those items with =
stereotypes=20
applied. Sometimes information is provided in the stereotype =
to=20
allow conversion from Ecore to UML and back to Ecore and preserve =
the=20
integrity of the original .ecore model ( ie. round tripping=20
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></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> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean =
about "special=20
behavior". I'm not aware of unique behavior for =
this. =20
I'll discuss it with Kenn and get back to you if there is =
something unique=20
here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>And finally a question which is =
maybe not=20
just related with uml2:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Getting all the sources from CVS =
(emf:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several errors =
in the=20
UML2 projects even after updating the classpathes =
(org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build issues =
for the=20
uml2 project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the same =
issue=20
you are having but these problems are a result of .jars needed for =
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's =
that explain=20
how to resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT =
size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or the =
examples=20
provided here, make sure you have the 2 jar files required by this =
plugin=20
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 =
jar=20
files required by the </FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If=20
necessary, Eclipse can generate them for you. All you need to do =
is to run=20
the Ant script created by PDE when you right click on the manifest =
file=20
and select "PDE Tools>Create Ant Build File".=20
</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any issues =
with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> =
wrote in=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my machine =
with a=20
contrived example and it seemed to work fine ( If I understood =
this=20
correctly ;) ).</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=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
UML.uml and using UML-Genmodel. In principle, the process is =
working=20
but with the following aspect I get into trouble:</DIV>
<DIV> </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=20
of the 0..* -side: in the following code-snipped the varable=20
ownedrules is not declared in the class</DIV>
<DIV>- if I change the Multiplicity to 1, the resulting code=20
works</DIV>
<DIV><FONT face=3DArial size=3D2>
<P align=3Dleft><B><FONT color=3D#7f0055 =
size=3D2>public</B></FONT><FONT=20
size=3D2> 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 =
size=3D2>new</B></FONT><FONT size=3D2>=20
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=20
size=3D2>return</B></FONT><FONT size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the attachments there are some pictures of the .uml =
and=20
.genmodel to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
=
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BLOC=
KQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0036_01C73BF2.2DD55AB0--
|
|
|
Re: Problem using UML Genmodel [message #572776 is a reply to message #468690] |
Fri, 19 January 2007 18:05 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_07E8_01C73BCA.837935E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Andreas,
Whether a class is considered a model root is determined in EMF like =
this:
public boolean isModelRoot()
{
return getClassExtendsGenClass() =3D=3D null || =
getClassExtendsGenClass().getGenModel() !=3D getGenModel();
}
Kenn
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eoqsqu$i5o$1@utils.eclipse.org...
Kenn,
I don't know how and why it comes, but now, there is no such method =
anymore when generating the model code - strange!
I will send you the details as soon as the problem occurs again...
So, how do you markup a class as a "model root" class in the genmodel?
Andreas
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eopcql$mcq$1@utils.eclipse.org...
- Could you provide more details on the stack overflow you are =
seeing? Every "model root" class will have this method in it, but it's =
not clear to me why this would result in a stack overflow...
- Association ends that are owned by the assocation are ignored when =
converting UML models to Ecore.
Kenn
"James Bruck" <jbruck@ca.ibm.com> wrote in message =
news:eopai8$174$1@utils.eclipse.org...
Hi Andreas,
some comments below ...
- James.
"Andreas Morf" <andreas_morf@bluewin.ch> wrote in message =
news:eolgq1$q5s$1@utils.eclipse.org...
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?
+ Not sure about this one I'll have to investigate and get back =
to you. =20
- In the UML.merged.uml-model used as metamodel, what is the =
difference beween memberEnd Property with <eReference> Stereotype and =
the ones without Stereotype?
+ In general the Ecore stereotype provides information when =
converting from UMLto Ecore. Specific code generation details might be =
necessary for those items with stereotypes applied. Sometimes =
information is provided in the stereotype to allow conversion from Ecore =
to UML and back to Ecore and preserve the integrity of the original =
..ecore model ( ie. round tripping ).
- Using an UML-model as metamodel is there a special behaviour =
in Genmodel when using ownedEnd's in associations (as in =
A_general_generalization)?
+ I'm not sure what you mean about "special behavior". I'm not =
aware of unique behavior for this. I'll discuss it with Kenn and get =
back to you if there is something unique here.
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?
+ I'm not seeing any build issues for the uml2 project. I do =
however have some issues with org.eclipse.emf.importer.rose. .. may =
not be the same issue you are having but these problems are a result of =
..jars needed for ant.
Sometimes there are .readme's that explain how to resolve these =
issues.
eg. Before running your build scripts or the examples provided =
here, make sure you have the 2 jar files required by this plugin =
("importer.rose.jar" and "importer.rose.tasks.jar") and also the 2 jar =
files required by the org.eclipse.emf.ant plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar"). If necessary, Eclipse can generate them for you. =
All you need to do is to run the Ant script created by PDE when you =
right click on the manifest file and select "PDE Tools>Create Ant Build =
File".=20
but again, I don't see any issues with uml.
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_07E8_01C73BCA.837935E0
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.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Whether a class is considered a model =
root is=20
determined in EMF like this:</FONT></DIV>
<DIV><B><FONT color=3D#7f0055 size=3D2></FONT></B> </DIV>
<DIV><B><FONT color=3D#7f0055 size=3D2>public</B></FONT><FONT size=3D2>=20
</FONT><B><FONT color=3D#7f0055 size=3D2>boolean</B></FONT><FONT =
size=3D2>=20
isModelRoot()</FONT></DIV>
<DIV><FONT size=3D2>{</FONT></DIV>
<DIV><B><FONT color=3D#7f0055 size=3D2> =
return</B></FONT><FONT=20
size=3D2> getClassExtendsGenClass() =3D=3D </FONT><B><FONT =
color=3D#7f0055=20
size=3D2>null</B></FONT><FONT size=3D2> || =
getClassExtendsGenClass().getGenModel()=20
!=3D getGenModel();</FONT></DIV>
<DIV><FONT size=3D2>}</DIV></FONT>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>> =
wrote in=20
message <A=20
=
href=3D"news:eoqsqu$i5o$1@utils.eclipse.org">news:eoqsqu$i5o$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I don't know how and why it comes, =
but now, there=20
is no such method anymore when generating the model code -=20
strange!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I will send you the details as soon =
as the=20
problem occurs again...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So, how do you markup a class as a =
"model root"=20
class in the genmodel?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Andreas</FONT></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>"Kenn Hussey" <<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>> wrote =
in message=20
<A=20
=
href=3D"news:eopcql$mcq$1@utils.eclipse.org">news:eopcql$mcq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>- Could you provide more details on =
the stack=20
overflow you are seeing? Every "model root" class will have this =
method in=20
it, but it's not clear to me why this would result in a stack=20
overflow...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Association ends that are owned =
by the=20
assocation are ignored when converting UML models to =
Ecore.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> wrote =
in message=20
<A=20
=
href=3D"news:eopai8$174$1@utils.eclipse.org">news:eopai8$174$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi Andreas,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>some comments below =
....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote in message <A=20
=
href=3D"news:eolgq1$q5s$1@utils.eclipse.org">news:eolgq1$q5s$1@utils.ecli=
pse.org</A>...</DIV>
<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=20
unexpectedly when I changed the Aggregation attribute of the =
memberEnd=20
to "none". After switching back to 'composite' everything =
remained=20
ok...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But after some experiences with =
the=20
Genmodel there are some further questions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- For every implementation =
class there is a=20
<FONT size=3D2>getCacheAdapter() method generated (in the=20
uml2.uml-impl-classes there is no such method) - this leads to a =
stack=20
overflow using the generated editor plugin. Deleting the method =
manually=20
resolves the problem. What am I doing wrong with the=20
UML-Model/Genmodel?</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ Not sure about this one =
I'll have=20
to investigate and get back to you. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- In the UML.merged.uml-model =
used as=20
metamodel, what is the difference beween memberEnd Property with =
<eReference> Stereotype and the ones without=20
Stereotype?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ In general the Ecore =
stereotype provides=20
information when converting from UMLto Ecore. Specific =
code=20
generation details might be necessary for those items with =
stereotypes=20
applied. Sometimes information is provided in the =
stereotype to=20
allow conversion from Ecore to UML and back to Ecore and =
preserve the=20
integrity of the original .ecore model ( ie. round tripping=20
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- Using an UML-model as =
metamodel is there=20
a special behaviour in Genmodel when using ownedEnd's in =
associations=20
(as in A_general_generalization)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not sure what you mean =
about "special=20
behavior". I'm not aware of unique behavior for =
this. =20
I'll discuss it with Kenn and get back to you if there is =
something=20
unique here.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>And finally a question which is =
maybe not=20
just related with uml2:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Getting all the sources from =
CVS (emf:=20
200701110200 uml2: 200701111331) on 3.3M4 there are several =
errors in=20
the UML2 projects even after updating the classpathes =
(org.eclipse.uml2,=20
.uml2.importer.rose, . Is that just a strange behaviour of my=20
environment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>+ I'm not seeing any build =
issues for the=20
uml2 project. I do however have some issues with=20
org.eclipse.emf.importer.rose. .. may not be the =
same issue=20
you are having but these problems are a result of .jars needed =
for=20
ant.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sometimes there are .readme's =
that explain=20
how to resolve these issues.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>eg. <FONT =
size=3D3><FONT=20
face=3D"Times New Roman">Before running your build scripts or =
the examples=20
provided here, make sure you have the 2 jar files required by =
this=20
plugin ("importer.rose.jar" and "importer.rose.tasks.jar") and =
also the=20
2 jar files required by the =
</FONT><TT>org.eclipse.emf.ant</TT><FONT=20
face=3D"Times New Roman"> plugin ("emf.ant.jar" and =
"emf.ant.tasks.jar").=20
If necessary, Eclipse can generate them for you. All you need to =
do is=20
to run the Ant script created by PDE when you right click on the =
manifest file and select "PDE Tools>Create Ant Build File".=20
</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>but again, I don't see any =
issues with=20
uml.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Greets, Andreas</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
href=3D"mailto:jbruck@ca.ibm.com">jbruck@ca.ibm.com</A>> =
wrote in=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>I just tried this on my =
machine with a=20
contrived example and it seemed to work fine ( If I understood =
this=20
correctly ;) ).</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=20
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> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>- James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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" <<A=20
=
href=3D"mailto:andreas_morf@bluewin.ch">andreas_morf@bluewin.ch</A>>=20
wrote 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=20
UML.uml and using UML-Genmodel. In principle, the process is =
working=20
but with the following aspect I get into trouble:</DIV>
<DIV> </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=20
impl-class of the 0..* -side: in the following code-snipped =
the=20
varable ownedrules is not 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=20
size=3D2> EList getOwnedrules() {</P>
<P align=3Dleft></FONT><B><FONT color=3D#7f0055=20
size=3D2>if</B></FONT><FONT size=3D2> (ownedrules =3D=3D =
</FONT><B><FONT=20
color=3D#7f0055 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>=20
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=20
size=3D2>return</B></FONT><FONT size=3D2> ownedrules;</P>
<P align=3Dleft>}</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the attachments there are some pictures of the .uml =
and=20
.genmodel to get the context.</DIV>
<DIV> </DIV>
<DIV>Anyone an idea</DIV>
<DIV>Regards, Andreas</DIV>
<DIV><FONT face=3DArial=20
=
size=3D2></FONT> </DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BLOC=
KQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_07E8_01C73BCA.837935E0--
|
|
| | |
Goto Forum:
Current Time: Wed Sep 25 05:49:06 GMT 2024
Powered by FUDForum. Page generated in 0.06945 seconds
|