|
Re: Papyrus diagram rootelement and owner [message #1781305 is a reply to message #1781301] |
Mon, 05 February 2018 21:04 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Hello Arun and welcome.
EDIT : Indeed getPapyrusDiagrams has a side effect. It loads the notation file with the same name of the uml containing your element and search for a notation::Diagram which has a feature element linked to your element (the root element).
If you want the owner of the diagram, you can open a bug to have it automatically in the papyrus bundle OR
- you can start your template from a notation file and do :
style::PapyrusViewStyle.allInstances()
from the papyrus view Style :
- eContainer().oclAsType(notation::Diagram) to get the diagram
- owner to check if it is the element you are looking for
- you can start from uml
self.eAllContents().getPapyrusDiagrams(), to trigger the side effects and load the notation files then
style::PapyrusViewStyle.allInstances()->select(owner = yourElement).eContainer().oclAsType(notation::Diagram) to get your diagram.
tell me if you have troubles
[Updated on: Tue, 06 February 2018 07:47] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03233 seconds