Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsStrange behaviour with getAppliedStereoTypes(), getAppliedStereoType
https://www.eclipse.org/forums/index.php/mv/msg/196987/628125/#msg_628125
i am currently working on an M2M transformation for an UML Model. Starting with a Model with two profiles applied. I have the following problem. While iterating over all packages embedded in the model i am trying to get the applied profiles for each package. if i do this:
Stereotype st : pack.getAppliedStereotypes()
I get back all the applied Stereotypes and everything is fine. But then i try to get a single StereoType by name, i always get back null. Even if i do something like this
for (Stereotype st : pack.getAppliedStereotypes()){
String name = st.getName();
Stereotype stereo = pack.getAppliedStereotype(name);
I dont understand why, i get all the applied stereotypes, iterating over them getting the name of each and the try to get it by name and it returns null.
Any advice?
Stefan]]>Stefan 2009-12-16T10:30:13-00:00Re: Strange behaviour with getAppliedStereoTypes(), getAppliedStereoType
https://www.eclipse.org/forums/index.php/mv/msg/196987/628126/#msg_628126
You mention that " in the model i am trying to get the applied profiles "
but your code is trying to get applied stereotypes.
Could the problem be that you are trying to get sterotypes when you mean
profiles or vice versa?
- James.
"Stefan" <schegi@uni-koblenz.de> wrote in message
news:hgacrk$10j$1@build.eclipse.org...
> Hi,
>
> i am currently working on an M2M transformation for an UML Model. Starting
> with a Model with two profiles applied. I have the following problem.
> While iterating over all packages embedded in the model i am trying to get
> the applied profiles for each package. if i do this:
> Stereotype st : pack.getAppliedStereotypes()
>
> I get back all the applied Stereotypes and everything is fine. But then i
> try to get a single StereoType by name, i always get back null. Even if i
> do something like this
>
> for (Stereotype st : pack.getAppliedStereotypes()){
> String name = st.getName();
> Stereotype stereo = pack.getAppliedStereotype(name);
>
> I dont understand why, i get all the applied stereotypes, iterating over
> them getting the name of each and the try to get it by name and it returns
> null.
>
> Any advice?
>
> Stefan
>]]>james bruck2009-12-16T19:43:22-00:00Re: Strange behaviour with getAppliedStereoTypes(), getAppliedStereoType
https://www.eclipse.org/forums/index.php/mv/msg/196987/913426/#msg_913426
example: Name: BusinessModel
FindByName Profile::BusinessModel
in my case]]>martin schwehla2012-09-15T16:11:09-00:00Re: Strange behaviour with getAppliedStereoTypes(), getAppliedStereoType
https://www.eclipse.org/forums/index.php/mv/msg/196987/913444/#msg_913444
You will need to make your message much clearer if anyone is to
understand it.
Regards
Ed Willink
On 15/09/2012 17:11, martin schwehla wrote:
> add a prefix :
> example: Name: BusinessModel
> FindByName Profile::BusinessModel
>
> in my case]]>Ed Willink2012-09-15T17:16:11-00:00