Home » Modeling » UML2 » Profile'.getDefinition inverse? Ecore2UML
Profile'.getDefinition inverse? Ecore2UML [message #476398] |
Wed, 17 October 2007 21:43  |
Eclipse User |
|
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi all,
I was wondering if I could inverse the process Profile.getDefinition->
ecorePackage. The code is based on annotations which are obviously not
there for the other way round. I saw an Ecore2UML class, does this help?
Does anybody knows what Ecore2UML does, I took a look at the API & the
code but didn't get it right away.
I don't get the point where the difference is made between e.g. a 'real'
UML-class, an an eCore instance of the UML-metaclass- I always thought
it's the same. Or is it just here the case because UML-profiles are
partly on M2/Superstructure?
- -stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHFro3IYVWjMSpDwwRAhG7AKC/R1nK1/6Tu9FkfGtzxaAzobdQzgCe KfjT
DgC5+CFPKSl3cqBqFo9kB4c=
=Ym8N
-----END PGP SIGNATURE-----
|
|
|
Re: Profile'.getDefinition inverse? Ecore2UML [message #476407 is a reply to message #476398] |
Mon, 22 October 2007 09:45   |
Eclipse User |
|
|
|
Hi Stefan,
To find the corresponding UML element given the ecore element, you could
search the UML model by corresponding name.
The Ecore2UML won't help you out in this case since it is the code that
actually converts Ecore to UML, however I believe you want to discover the
mapping after you already have the ecore and uml representations.
The class Ecore2UML ( really called Ecore2UMLConverter ), converts from
Ecore to UML. It extends Ecore Switch. It's basically a big switch
statement that goes through all the ecore cases such as: caseEClass(),
caseEPackage() etc. and creates corresponding UML items for each ecore item.
It's a bit tricky to follow partially because there is code that supports
generics.
Profiles need to know about the ecore representation ( stored under the
annotation ) since the UML project uses dynamic EMF. This is because , code
for profiles is traditionally not generated, and there is a need to
manipulate instances of dynamic classes. However, with static profile
definition, you could actually generate code for your profile and would no
longer have the need for the dynamic ecore representation.
Cheers,
-James.
"SKuhn" <kuhn@oio.de> wrote in message news:ff6dpf$ko$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi all,
>
> I was wondering if I could inverse the process Profile.getDefinition->
> ecorePackage. The code is based on annotations which are obviously not
> there for the other way round. I saw an Ecore2UML class, does this help?
>
> Does anybody knows what Ecore2UML does, I took a look at the API & the
> code but didn't get it right away.
>
> I don't get the point where the difference is made between e.g. a 'real'
> UML-class, an an eCore instance of the UML-metaclass- I always thought
> it's the same. Or is it just here the case because UML-profiles are
> partly on M2/Superstructure?
>
> - -stefan
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHFro3IYVWjMSpDwwRAhG7AKC/R1nK1/6Tu9FkfGtzxaAzobdQzgCe KfjT
> DgC5+CFPKSl3cqBqFo9kB4c=
> =Ym8N
> -----END PGP SIGNATURE-----
|
|
|
Re: Profile'.getDefinition inverse? Ecore2UML [message #476414 is a reply to message #476407] |
Mon, 22 October 2007 18:32  |
Eclipse User |
|
|
|
You might want to have a look at UMLUtil.getNamedElement() to see how this
works with profiles.
- James.
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:ffi9hc$g9a$1@build.eclipse.org...
> Hi Stefan,
>
> To find the corresponding UML element given the ecore element, you could
> search the UML model by corresponding name.
> The Ecore2UML won't help you out in this case since it is the code that
> actually converts Ecore to UML, however I believe you want to discover the
> mapping after you already have the ecore and uml representations.
>
> The class Ecore2UML ( really called Ecore2UMLConverter ), converts from
> Ecore to UML. It extends Ecore Switch. It's basically a big switch
> statement that goes through all the ecore cases such as: caseEClass(),
> caseEPackage() etc. and creates corresponding UML items for each ecore
> item. It's a bit tricky to follow partially because there is code that
> supports generics.
>
> Profiles need to know about the ecore representation ( stored under the
> annotation ) since the UML project uses dynamic EMF. This is because ,
> code for profiles is traditionally not generated, and there is a need to
> manipulate instances of dynamic classes. However, with static profile
> definition, you could actually generate code for your profile and would no
> longer have the need for the dynamic ecore representation.
>
> Cheers,
>
> -James.
>
>
>
> "SKuhn" <kuhn@oio.de> wrote in message
> news:ff6dpf$ko$1@build.eclipse.org...
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> hi all,
>>
>> I was wondering if I could inverse the process Profile.getDefinition->
>> ecorePackage. The code is based on annotations which are obviously not
>> there for the other way round. I saw an Ecore2UML class, does this help?
>>
>> Does anybody knows what Ecore2UML does, I took a look at the API & the
>> code but didn't get it right away.
>>
>> I don't get the point where the difference is made between e.g. a 'real'
>> UML-class, an an eCore instance of the UML-metaclass- I always thought
>> it's the same. Or is it just here the case because UML-profiles are
>> partly on M2/Superstructure?
>>
>> - -stefan
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.7 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFHFro3IYVWjMSpDwwRAhG7AKC/R1nK1/6Tu9FkfGtzxaAzobdQzgCe KfjT
>> DgC5+CFPKSl3cqBqFo9kB4c=
>> =Ym8N
>> -----END PGP SIGNATURE-----
>
>
|
|
|
Re: Profile'.getDefinition inverse? Ecore2UML [message #625240 is a reply to message #476398] |
Mon, 22 October 2007 09:45  |
Eclipse User |
|
|
|
Hi Stefan,
To find the corresponding UML element given the ecore element, you could
search the UML model by corresponding name.
The Ecore2UML won't help you out in this case since it is the code that
actually converts Ecore to UML, however I believe you want to discover the
mapping after you already have the ecore and uml representations.
The class Ecore2UML ( really called Ecore2UMLConverter ), converts from
Ecore to UML. It extends Ecore Switch. It's basically a big switch
statement that goes through all the ecore cases such as: caseEClass(),
caseEPackage() etc. and creates corresponding UML items for each ecore item.
It's a bit tricky to follow partially because there is code that supports
generics.
Profiles need to know about the ecore representation ( stored under the
annotation ) since the UML project uses dynamic EMF. This is because , code
for profiles is traditionally not generated, and there is a need to
manipulate instances of dynamic classes. However, with static profile
definition, you could actually generate code for your profile and would no
longer have the need for the dynamic ecore representation.
Cheers,
-James.
"SKuhn" <kuhn@oio.de> wrote in message news:ff6dpf$ko$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi all,
>
> I was wondering if I could inverse the process Profile.getDefinition->
> ecorePackage. The code is based on annotations which are obviously not
> there for the other way round. I saw an Ecore2UML class, does this help?
>
> Does anybody knows what Ecore2UML does, I took a look at the API & the
> code but didn't get it right away.
>
> I don't get the point where the difference is made between e.g. a 'real'
> UML-class, an an eCore instance of the UML-metaclass- I always thought
> it's the same. Or is it just here the case because UML-profiles are
> partly on M2/Superstructure?
>
> - -stefan
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHFro3IYVWjMSpDwwRAhG7AKC/R1nK1/6Tu9FkfGtzxaAzobdQzgCe KfjT
> DgC5+CFPKSl3cqBqFo9kB4c=
> =Ym8N
> -----END PGP SIGNATURE-----
|
|
|
Re: Profile'.getDefinition inverse? Ecore2UML [message #625293 is a reply to message #476407] |
Mon, 22 October 2007 18:32  |
Eclipse User |
|
|
|
You might want to have a look at UMLUtil.getNamedElement() to see how this
works with profiles.
- James.
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:ffi9hc$g9a$1@build.eclipse.org...
> Hi Stefan,
>
> To find the corresponding UML element given the ecore element, you could
> search the UML model by corresponding name.
> The Ecore2UML won't help you out in this case since it is the code that
> actually converts Ecore to UML, however I believe you want to discover the
> mapping after you already have the ecore and uml representations.
>
> The class Ecore2UML ( really called Ecore2UMLConverter ), converts from
> Ecore to UML. It extends Ecore Switch. It's basically a big switch
> statement that goes through all the ecore cases such as: caseEClass(),
> caseEPackage() etc. and creates corresponding UML items for each ecore
> item. It's a bit tricky to follow partially because there is code that
> supports generics.
>
> Profiles need to know about the ecore representation ( stored under the
> annotation ) since the UML project uses dynamic EMF. This is because ,
> code for profiles is traditionally not generated, and there is a need to
> manipulate instances of dynamic classes. However, with static profile
> definition, you could actually generate code for your profile and would no
> longer have the need for the dynamic ecore representation.
>
> Cheers,
>
> -James.
>
>
>
> "SKuhn" <kuhn@oio.de> wrote in message
> news:ff6dpf$ko$1@build.eclipse.org...
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> hi all,
>>
>> I was wondering if I could inverse the process Profile.getDefinition->
>> ecorePackage. The code is based on annotations which are obviously not
>> there for the other way round. I saw an Ecore2UML class, does this help?
>>
>> Does anybody knows what Ecore2UML does, I took a look at the API & the
>> code but didn't get it right away.
>>
>> I don't get the point where the difference is made between e.g. a 'real'
>> UML-class, an an eCore instance of the UML-metaclass- I always thought
>> it's the same. Or is it just here the case because UML-profiles are
>> partly on M2/Superstructure?
>>
>> - -stefan
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.7 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFHFro3IYVWjMSpDwwRAhG7AKC/R1nK1/6Tu9FkfGtzxaAzobdQzgCe KfjT
>> DgC5+CFPKSl3cqBqFo9kB4c=
>> =Ym8N
>> -----END PGP SIGNATURE-----
>
>
|
|
|
Goto Forum:
Current Time: Sat Aug 30 23:11:52 EDT 2025
Powered by FUDForum. Page generated in 0.03264 seconds
|