[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tigerstripe-users] Bug in the methods of interface ISterotypeCapable hasStereotypeInstance and getStereotypeInstanceByName
|
Hello,
I just tried out this scenario, but I'm unable to reproduce your issue. When you call 'getContatiningModelComponent()' are you sure you have the right reference?
I tried this on a package called xxx.yyy.zzz and I only decorated zzz with a stereotype. I then grabed a reference to 'zzz' and called <zzz_reference>. getContainingModelComponent().getStereotypeInstances() and it correctly returns an empty collection. I got further assurance by verifying that this works properly in Tigerstripe. Here's what I did:
- Under Tigerstripe Explorer, click on view menu > package presentation > Hierarchical
- Open 'Annotation Property View' (this view also displays stereotypes).
- Select 'zzz', notice it properly displays the associated stereotype
- Select 'xxx' or 'yyy', notice nothing is displayed (which is correct).
Regards,
- Navid
On Fri, Jan 27, 2012 at 4:58 AM, Xose Ramon Sousa Vazquez
<xrsousa@xxxxxxxxxxxxxxxxxxx> wrote:
Hi Navid, I had decorated the package (by example a package defined
as
a.b.c) with an stereotype and the API get the information
about the stereotype. Then I need to get the stereotype information
from the parent package, so we get the super package
a.b and
then use the same method to get the stereotype and we expect no
stereotype returned, but the API retrieve one.
To get the parent package I am using
aux_artifact=(IAbstractArtifact)
(aux_artifact.getContainingModelComponent());
I don't create the package
a.b, it is part of the
a.b.c
package created before.
Best regards
Message: 1
Date: Thu, 19 Jan 2012 11:11:01 -0500
From: Navid Mehregani
<navid.mehregani@xxxxxxxxx>
To: Tigerstripe Users list
<tigerstripe-users@xxxxxxxxxxx>
Subject: Re: [tigerstripe-users] Bug in the methods of interface
ISterotypeCapable hasStereotypeInstance and
getStereotypeInstanceByName
Message-ID:
<CACRpCyHS7Nrt8+FDR4rd7Ck4+erAcKx6B5rVmJkVPrB1N0gppw@xxxxxxxxxxxxxx>
Content-Type:
text/plain; charset="iso-8859-1"
Are you saying that when you decorate a package with a stereotype
and you
query the stereotypes of artifacts contained in the package,
Tigerstripe
incorrectly returns you the stereotype of the package?
Not sure if I completely followed you. You seem to be using the
correct
APIs.
- Navid
On Thu, Jan 19, 2012 at 3:32 AM, Xose Ramon Sousa Vazquez <
xrsousa@xxxxxxxxxxxxxxxxxxx> wrote:
I am developing a tigerstripe project that defines a package and an
artifact inside. The package, by example xxx.yyy.zzz has a stereotype proxy
definition inside. I am using the Tigerstripe API to get the stereotype
info included in the package. To perform a validation in my logic I am
looking for another sterotype definition in the packages that contains the
artifact (xxx.yyy and xxx) and then the package container also give us an
stereotype when doesn't exist.
xxx.yyy.zzz (with stereotype)
|_______>artifact
We have checked with this two methods:
*method hasStereotypeInstance from the interface IStereotypeCapable
method getStereotypeInstanceByName from the interface
IStereotypeCapable*
When we evaluate the artifact xxx.yyy.zzz they give us the proxy
stereotype (That is the expected behaivor)
When we evaluate the artifact xxx.yyy they give us the proxy stereotype
from the package xxx.yyy.zzz (That is the worng behaivor)
Tigerstripe version
Tigerstripe Annotation Framework (Incubation) 0.6.935.201102010903
org.eclipse.tigerstripe.annotation.feature.feature.group
Tigerstripe Core (Incubation) 0.6.935.201102010903
org.eclipse.tigerstripe.base.feature.group
Is there other way to read the stereotype information?
Best regards
--
*Xose Ramon Sousa Vazquez* | Director OSS Technologies, Director I+D
T/ + 34 986 410 091 (ext) 206 | M/ +34 675 550 029
www.optaresolutions.com
[image: Optare Solutions] <http://optarecoolvendor.com>
<http://optarecoolvendor.com>
_______________________________________________
tigerstripe-users mailing list
tigerstripe-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tigerstripe-users
_______________________________________________
tigerstripe-users mailing list
tigerstripe-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tigerstripe-users