Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » [Sirius Web] Custom diagram framework
[Sirius Web] Custom diagram framework [message #1843598] Tue, 10 August 2021 11:14 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 334
Registered: August 2013
Senior Member
Hi

On SiriusCon 2021 you showed that it's possible to use blockly, d3js, etc. for diagram. Are there any examples? Could you suggest how to do it?
Re: [Sirius Web] Custom diagram framework [message #1844059 is a reply to message #1843598] Mon, 30 August 2021 15:10 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 646
Registered: July 2009
Senior Member
Hi,
The code for those examples is not publicly available.

There is no documentation for this at the moment as the APIs are still somewhat in flux, but the main entry points are:


  • `IRepresentation`, `IRepresentationDescription` and a renderer to create the data structure corresponding to your representation given the current state of the user data models;
  • `IRepresentationEventProcessor` (and the corresponding factory) to handle the mutation operations requested by users via your representation;
  • you'll need a `IEditingContextEventHandler` to handle the actual creation of an instance of your representation (see for example org.eclipse.sirius.web.spring.collaborative.forms.handlers.CreateFormEventHandler).


On the frontend, see `sirius-components/frontend/src/workbench/RepresentationContext.ts`: you'll need to register your own React-based component (similar to `FormWebSocketContainer`) which will be instanciated to display a specific instance of your new representation kind, trigger the appropriate mutation requests and receive new versions of the representation (rendered on the backend) when the backend sends them.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Diagram Has Red Xs Everywhere, But No Problems Reported
Next Topic:Sirius web - how to download/upload models
Goto Forum:
  


Current Time: Mon Oct 03 21:21:45 GMT 2022

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

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

Back to the top