Retrieving Stereotype Information [message #1724493] |
Wed, 24 February 2016 08:56  |
Eclipse User |
|
|
|
A project (called projectX) exists in a workspace (called workspaceX). A profile (called profileY) exists in a directory that is not in workspaceX.
In the above situation, the Stereotype information does not display.
If I copy profileY into workspaceX and then refactor the model to point to the copy of profileY, the stereotype information displays.
I found this because I had a profile in a GIT repository and my local GIT directory is not underneath the workspace directory.
thoughts?
|
|
|
|
Re: Retrieving Stereotype Information [message #1728947 is a reply to message #1724549] |
Fri, 08 April 2016 15:35   |
Eclipse User |
|
|
|
Actually i think i have the same issue. I would like to access on the propeties of a specific stereotype. With a default sysml stereotype it works good. But with my own it doesn't work. I also have my profile in a other workspace (because of git). Maybe i do something wrong:
Loading of the profile:
Quote:
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_n1FyIPzFEeWnQpiBpzKiUg" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="../Sysmod/Sysmod.profile.uml#_8-eSwPzdEeWLBbdJDAaZLA"/>
</eAnnotations>
<appliedProfile xmi:type="uml:Profile" href="../Sysmod/Sysmod.profile.uml#_voikEOwhEeWIdZ7Wttd0Rw"/>
Stereotype i want to access:
Quote:
<Sysmod.Requirements:Objective xmi:id="_xY31gPzFEeWnQpiBpzKiUg" base_Class="__jD4wPzEEeWnQpiBpzKiUg" text="Sourcecodeverwaltungssystem (Git, Svn, usw.)" id="1"/>
Code in word:
Quote:
Sysmod:
[for (r : uml::Class | uml::Class.allInstances()->select(not getAppliedStereotype('Sysmod::Requirements:Objective').oclIsUndefined()))]
name: [r.name.clean()/]
id : [r.getValue(getAppliedStereotype('Sysmod::Requirements:Objective'),'id')/]
text : [r.getValue(getAppliedStereotype('Sysmod::Requirements:Objective'),'text')/]
[/for]
Best regards
Benny
|
|
|
Re: Retrieving Stereotype Information [message #1728956 is a reply to message #1728947] |
Fri, 08 April 2016 16:05   |
Eclipse User |
|
|
|
Can you try
Sysmod::Requirements::Objective
instead of Sysmod::Requirements:Objective ?
You can find the qualified name of your stereotype in the advanced property view when you select the stereotype in the profile definition
|
|
|
Re: Retrieving Stereotype Information [message #1728961 is a reply to message #1728956] |
Fri, 08 April 2016 16:20   |
Eclipse User |
|
|
|
No it also doen't work with copying the name from the advanced property:
Quote:
Sysmod:
[for (r : uml::Class | uml::Class.allInstances()->select(not getAppliedStereotype('Sysmod::Requirements::Objective').oclIsUndefined()))]
name: [r.name.clean()/]
id : [r.getValue(getAppliedStereotype('Sysmod::Requirements::Objective'),'id')/]
text : [r.getValue(getAppliedStereotype('Sysmod::Requirements::Objective'),'text')/]
[/for]
Greetings
|
|
|
|
|
Re: Retrieving Stereotype Information [message #1729389 is a reply to message #1729366] |
Wed, 13 April 2016 15:39  |
Eclipse User |
|
|
|
The solution for me was to change the location of the profile. First i had the profile somewhere on my disk and i imported the profile project into the workspace. In this case i had the troubles with the stereotypes. Then i copied the profile project into the workspace and imported it from there. Now everything works fine. I think there is a problem storing projects outside the workspace.
Greetings
Benny
|
|
|
Powered by
FUDForum. Page generated in 0.05121 seconds