Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Exporting a diagram/node from odesign Sirius file
Exporting a diagram/node from odesign Sirius file [message #1822389] Thu, 05 March 2020 12:53 Go to next message
Mohammed Ghazi is currently offline Mohammed GhaziFriend
Messages: 1
Registered: March 2020
Junior Member
I have a Java application which uses Sirius to model some nodes and diagrams.

I have two questions:

1. How I can export these diagrams as an XML/JOSN? Is it possible to export some nodes of the diagram only? Please see the attached screenshot. For example, I want to export the node "DataRetentionPeriod" as a JSON. What is the required code and where I should insert it?

2. Can I use Post and Get commands of Liferay to export a diagram or some nodes of the Sirius files. I know that by right clicking on the modelling editor of the Sirius file I can export the diagram as an image. Can I add an option, similar to export an image, to export or call another function which can create endpoints or connection to a database? see the attach screenshot please.

I appreciate any help.
  • Attachment: Untitled.png
    (Size: 113.18KB, Downloaded 17 times)
Re: Exporting a diagram/node from odesign Sirius file [message #1822529 is a reply to message #1822389] Mon, 09 March 2020 13:39 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 496
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Mohammed,

There are several ways to contribute menus to the contextual menu : the Eclipse extension points (org.eclipse.ui.menus, org.eclipse.ui.popupMenus), GMF extension points but also the Sirius popup and operation actions elements.

See for example:
* https://www.eclipse.org/forums/index.php/m/1266146
* https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#tools

From those menu, you will have to transform your model selection to your JSON (using plain Java, using Java some visitor pattern or a subclass of the xxxSwitch class generated from your MM, using Acceleo or other Model to text language).

Regards








Regards,


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Previous Topic:Diagram Element Selection
Next Topic:Creating diagrams automatically
Goto Forum:
  


Current Time: Fri Oct 23 12:30:37 GMT 2020

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

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

Back to the top