How to Navigate Programatically [message #1822736] |
Thu, 12 March 2020 09:51  |
Eclipse User |
|
|
|
Hi,
I am providing user option to create subprocess in my Sirius digram, so subprocess will be another diagram so for Navigation , i am using Navigation tool from configuration so i had to create button in .odesign file only, can someone explain how can we do same thing pro-grammatically. so that we can provide a better UI to create and Navigate on subprocess. {PFA: Navigation Tool }
|
|
|
Re: How to Navigate Programatically [message #1822881 is a reply to message #1822736] |
Mon, 16 March 2020 06:24   |
Eclipse User |
|
|
|
Hello,
I am not sure to understand the part where you had to create a button in the odesign. If you create a navigation tool, the new action will be available in the contextual menu when you right click on the element where you want to create a sub diagram.
Anyway, if you want to create a representation programmatically, you can use the API DialectManager.INSTANCE.createRepresentation(String name, EObject semantic, RepresentationDescription description, Session session, IProgressMonitor monitor). This will create the representation in the graphical model (.aird). After that to open the representation in an editor you can use the API DialectUIManager.INSTANCE.openEditor(Session session, DRepresentation dRepresentation, IProgressMonitor monitor).
Best regards,
Steve
|
|
|
|
|
|
Re: How to Navigate Programatically [message #1828762 is a reply to message #1828718] |
Thu, 18 June 2020 04:19  |
Eclipse User |
|
|
|
Hello,
You can open a representation programmatically using the API: org.eclipse.sirius.ui.business.api.dialect.DialectUIManager.INSTANCE.openEditor(session, representation, monitor). I don't remember if it will focus on the editor if it was already opened, but this API returns an IEditorPart if you need to.
Best regards,
Steve
|
|
|
Powered by
FUDForum. Page generated in 0.04005 seconds