Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sharing the semantic model with another editor and editing domain(Sirius editor must exist in tandem with another editor, and both must share the same semantic model. )
Sharing the semantic model with another editor and editing domain [message #1761423] Wed, 10 May 2017 22:23 Go to next message
Chris Mamorella is currently offline Chris MamorellaFriend
Messages: 34
Registered: June 2013
Member
For our application, Sirius must exist in tandem with another editor "X" and both must share the same semantic model. Changes in one editor need to be reflected in the other and vice versa. Editor "X" has its own editing domain. Sirius has its own TransactionalEditingDomain. Is there a way to make Sirius use Editor "X"s editing domain? It seems like the only viable solution is for both editors to share the same editing domain since they have to share the same model reference.

I've seen high level documentation suggesting that Sirius can manage the sharing of command stacks and editing domains across editors, but I've so far not come across anything more specific. This would seem to be a common problem or use case. Is there an extension point that I could use to supply a custom editing domain or some other way to override the TransasctionalEditingDomain?

[Updated on: Thu, 11 May 2017 14:56]

Report message to a moderator

Re: Sharing the semantic model with another editor and editing domain [message #1763401 is a reply to message #1761423] Mon, 15 May 2017 09:42 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

As a first simple solution, you can use the editing domain used in Sirius Session for your editor.
SessionManager.INSTANCE.getSession(URI sessionResourceURI, IProgressMonitor)
or
SessionManager.INSTANCE.getExistingSession(URI )
and then
session.getTransactionalEditingDomain()
.

Otherwise, you can effectively provide an implementation for the
org.eclipse.sirius.common.editingDomainFactory
extension point, if you need to set some specificities.

Regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sharing the semantic model with another editor and editing domain [message #1764199 is a reply to message #1763401] Fri, 26 May 2017 15:14 Go to previous messageGo to next message
Chris Mamorella is currently offline Chris MamorellaFriend
Messages: 34
Registered: June 2013
Member
Laurent,
Thank you for the reply.

In our case it would be preferable to override the Sirius transactional editing domain with org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain. Could that be contributed to the "org.eclipse.sirius.common.editingDomainFactory" extension point or is that schema hardwired to the transactional editing domain?

Regards,
Chris
Re: Sharing the semantic model with another editor and editing domain [message #1764425 is a reply to message #1764199] Mon, 29 May 2017 15:19 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

you can override the Sirius editing domain using org.eclipse.sirius.LocalSessionEditingDomainFactory extension point.

In override field, put org.eclipse.sirius.LocalSessionEditingDomainFactory which is the id of the Sirius editing domain.
The class attribute corresponds to the EditingDomain you will use.

regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Error while modifying model
Next Topic:Generation in headless mode
Goto Forum:
  


Current Time: Fri Apr 26 11:35:17 GMT 2024

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

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

Back to the top