context model element [message #1758432] |
Tue, 28 March 2017 15:47  |
Eclipse User |
|
|
|
Hello,
I'm wondering what the element field stands for within the context model.
As far as I understand, it's possible to link to specific item of a model (ie a use case diagram by its {folder}/{name})

I checked the gendoc documentation, but didn't find a proper example.
Could someone provide me additional information's about this ?
Samuel
|
|
|
Re: context model element [message #1758438 is a reply to message #1758432] |
Tue, 28 March 2017 16:51   |
Eclipse User |
|
|
|
Hello Samuel,
"element" attribute of context tag represents the path to the model element used as execution context of the following <gendoc> script tags.
If you use element="RootElement/Actor1" , and add a gendoc script to display the name of current element,
<gendoc> name : [self.name/]</gendoc>
you will get the following result:
name : Actor1
Concerning diagrams, it works on a different way because with Papyrus UML diagrams are not stored in the same model file than the UML elements, so the display of diagrams is performed through an access to the UML model element containing the diagram (in your example, "RootElement" for both diagrams) and using the method to get diagrams on an element : getPapyrusDiagrams from "papyrus" bundle in your case.
Anne
|
|
|
|
Powered by
FUDForum. Page generated in 0.02935 seconds