|Re: How to Navigate Programatically [message #1822881 is a reply to message #1822736]
||Mon, 16 March 2020 10:24
|| Steve Monnier
Registered: May 2011
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).
Steve Monnier - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.02328 seconds