Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sirius Web DSL(Building a web diagram editor for custom DSL - WOHTO)
Sirius Web DSL [message #1843842] Fri, 20 August 2021 10:52 Go to next message
Marian Edu is currently offline Marian EduFriend
Messages: 10
Registered: March 2012
Junior Member
We're trying to build a small PoC creating a web diagram editor for our own DSL and one of the options are Sirius Web.
Apart from some Eclipse Con videos and the sirius-web project on github there ins't much to get one started.

What we did so far is this:


  1. build our EMF model project and install it into maven
  2. build a Sirius design project using our model and build it with maven
  3. clone the `sirius-web` project
  4. update `sirius-web-sample-application`

    • drop dependencies to Obeo models
    • add dependencies to our DSL model and design
    • update EMFConfiguration to use our model (package/factory)
    • update SiriusConfiguration to use our DSL `odesign` file

  5. left all packages in sirius-web unchanged
  6. build everything with maven


Now, if I try to run the sample spring application it gives a `NoSuchBeanDefinitionException`:
No qualifying bean of type 'org.eclipse.sirius.web.persistence.repositories.IDocumentRepository' available: expected at least 1 bean which qualifies as autowire candidate.


It's most probably something we do wrong - or not doing it at all - any hints much appreciated, if there is indeed a `how-to` or `getting started` document that we've overlooked I can follow redirects :)

Thanks,
Marian
Re: Sirius Web DSL [message #1843881 is a reply to message #1843842] Mon, 23 August 2021 08:35 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi.

I'm not sure if this is the problem, but in your forked version of org.eclipse.sirius.web.sample.SampleApplication, did you modify the @ComponentScan({ "org.eclipse.sirius.web" }) annotation? If you changed the Java namespace of the sample application, you need to *add* the root package to that annotation, but the "org.eclipse.sirius.web" element must be kept too, otherwise Spring Boot will not find the corresponding beans (like the IDocumentRepository in the message) at startup.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sirius Web DSL [message #1843882 is a reply to message #1843881] Mon, 23 August 2021 09:07 Go to previous messageGo to next message
Marian Edu is currently offline Marian EduFriend
Messages: 10
Registered: March 2012
Junior Member
Indeed, had to add our own DSL package to the @ComponentScan list. We've got this to start at least, create a new empty document and we're able to add elements to it but nothing shows in the diagram representation although the creation tool is working and we see the objects being added to the model.

The only apparent error we get is when selecting model elements that have properties with 'null' values (default) - Sirius seems to be keen in having a non-null value so the properties view does not show for those objects.

No error when objects are created, those show up in explorer, even model validation seems to work but nothing shows in the representation and that is actually what we're looking for :)

Any hints on what could be wrong there, where we should look at? Given the fact the representation is seen and creation tools work I would say the 'odesign' definition is found, running that in an Eclipse instance seems to work as in we can add objects to the model and those are visible on representation but then maybe some gotchas we need to be aware for the 'web ui'?

Thanks
Re: Sirius Web DSL [message #1843997 is a reply to message #1843882] Thu, 26 August 2021 11:48 Go to previous messageGo to next message
Marian Edu is currently offline Marian EduFriend
Messages: 10
Registered: March 2012
Junior Member
Turns out the issue was with the `semanticCandidatesExpression` value, looking at some examples we've found that was set to "[sequences/]" (sequences being a property of the diagram model element. While that seemed to work find in desktop version nothing was shown in the web diagram, changing it to "aql:self.sequences" solved the issue and now objects are being shown in the diagram :)

We ought to do some more digging on Sirius before going further with this, not sure why sometime 'feature' is being used for semantic candidate expression while other times 'aql' or even 'var' is being used. Sub containers layout is something that doesn't work nicely in web ui, a simple UML editor with sub containers for 'properties' and 'methods' looks fine in desktop version (with vertical stack in main container and list layout in sub-containers) but in web the main container seems to be a 'free form' layout and the sub-containers can be dragged around freely (no-label seems not to be honoured either).

Anyway, we've got it far enough for a PoC so we will most probably evaluate this again after a little while to give time for the project to mature... unless you guys need a lab monkey (think the proper term is early adopter) :)

Thanks
Marian
Re: Sirius Web DSL [message #1844055 is a reply to message #1843997] Mon, 30 August 2021 13:59 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
> not sure why sometime 'feature' is being used for semantic candidate expression while other times 'aql' or even 'var' is being used.

Multiple languages can be supported for the evaluation of interpreted expressions. 'var' and 'feature' (and 'service') are "mini-languages" with very limited scopes (get the value of a variable, read the value of a feature, invoke a Java service) which makes them very fast at runtime, with almost zero overhead. 'aql' invokes an arbritrary AQL expression, which for simple expressions can be a little slower (though AQL is pretty fast).

> sub containers layout is something that doesn't work nicely in web ui, a simple UML editor with sub containers for 'properties' and 'methods' looks fine in desktop version

Yes, this is a known limitation of Sirius Web at the moment. It's not on the roadmap for now, but feel free to open a ticket on https://github.com/eclipse-sirius/sirius-web/issues so we can discuss your needs.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sirius Web DSL [message #1847242 is a reply to message #1843842] Wed, 20 October 2021 22:22 Go to previous message
Andriy Yuzva is currently offline Andriy YuzvaFriend
Messages: 1
Registered: October 2021
Junior Member
Hi,

We are a group of Computer Sci. students from McMaster University (Canada). We are also trying to create a Sirius Web based editor for a DSL that was initially developed with Sirius Desktop. We would appreciate any documentation/guides/tips or anything that could be helpful.

Thank you,
Andriy
Previous Topic:Getting the LayoutConstraint of a Node without opening a session?
Next Topic:Connecting Viewpoint Specification Project to Sirius Web
Goto Forum:
  


Current Time: Wed Apr 24 19:58:26 GMT 2024

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

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

Back to the top