Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Performing unrelated tasks as part of separate operations - resource creation, set operation
Performing unrelated tasks as part of separate operations - resource creation, set operation [message #1818289] Wed, 11 December 2019 15:19 Go to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 156
Registered: July 2009
Location: Canada
Senior Member
I am working on a graphical editor (Xtext-Sirius integration) that allows visualizing and editing models (Entities) that are serialized in "separate" resources. In the Node creation tool, set name operation, value expression, I specify a service that - 1) Initializes the passed Entity instance, and serializes it in newly created resource, 2) Returns the name of the Entity EObject.

Performing #1 as part of the "set" operation looks a bit odd to me. Is there a way in which I could separate these two operations - The first operation returns the name, and the second operation creates a resource and serializes the initialized Entity instance.

Like Entities, I have attributes that have name and datatype. In order to separate the two operations (setting of the name and datatype), I have nested the operation "set name" inside "set datatype". This is much easier to understand and maintain, as compared to the earlier solution where I am performing multiple "unrelated" operations as part of one operation.

I briefly looked at the following projects, but I didn't find any hints - farmingmodel, Dart-Designer, Epi-designer. I also went through the forum but didn't find much help.

It will be great if I could get some pointers/hints.
Tx in advance.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Performing unrelated tasks as part of separate operations - resource creation, set operation [message #1818489 is a reply to message #1818289] Tue, 17 December 2019 09:49 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 481
Registered: May 2011
Senior Member
Hello,

If you want a tool to performe an "unrelated" task that requires a java service instead of using a Sirius model operation, you can use the "Change Context" operation to call your service. It will only set the focus of to context to the object return by your service.
Note that if your service or its separate tasks are reused throughout your odesign, you can turn it into an external java action call: https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#extensions

Best regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Performing unrelated tasks as part of separate operations - resource creation, set operation [message #1818517 is a reply to message #1818489] Wed, 18 December 2019 11:11 Go to previous message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 156
Registered: July 2009
Location: Canada
Senior Member
Hi Steve,

Thanks for the tip.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Previous Topic:Obeo's BPMN Designer
Next Topic:Adding a Semantic Resource to the Session (SOLVED)
Goto Forum:
  


Current Time: Thu May 28 02:14:48 GMT 2020

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

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

Back to the top