Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Retrieving Stereotype Information(Retrieving Stereotype Information when profile is not in workspace directory)
Retrieving Stereotype Information [message #1724493] Wed, 24 February 2016 08:56 Go to next message
Scott Mansfield is currently offline Scott MansfieldFriend
Messages: 4
Registered: February 2016
Junior Member
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 #1724549 is a reply to message #1724493] Wed, 24 February 2016 15:03 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Some errors can occur in this case. Can you tell me how the profile is referenced in your model ?
(open the uml file with text editor and find reference to your profile searching its name)

Regards




Re: Retrieving Stereotype Information [message #1728947 is a reply to message #1724549] Fri, 08 April 2016 15:35 Go to previous messageGo to next message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
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 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
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 #1729090 is a reply to message #1728961] Mon, 11 April 2016 07:01 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Can you try this query and do a copy paste :
Class.allInstances().getAppliedStereotypes()->asSet().qualifiedName.clean() ?




Re: Retrieving Stereotype Information [message #1729366 is a reply to message #1729090] Wed, 13 April 2016 12:39 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
After trying with your data on my configuration it seems it is working.
My Installation :
papyrus : from https://eclipse.org/papyrus/download.html (windows 64 bits),
Gendoc 0.5.1
Sysml 1.4 from Help > Install new software > Papyrus > Papyrus Sysml 1.4 feature

What is the difference with what you built ?




icon10.gif  Re: Retrieving Stereotype Information [message #1729389 is a reply to message #1729366] Wed, 13 April 2016 15:39 Go to previous message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
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
Previous Topic:Accessing images
Next Topic:Problems when generating images from Papyrus diagrams
Goto Forum:
  


Current Time: Wed Sep 26 02:26:37 GMT 2018

Powered by FUDForum. Page generated in 0.01718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top