Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to instantiate timelines in a sequence diagram using customised classes (from matamodel)(Sequence diagram instance classes)
How to instantiate timelines in a sequence diagram using customised classes (from matamodel) [message #1839376] Fri, 19 March 2021 15:10 Go to next message
Cristian Valenci is currently offline Cristian ValenciFriend
Messages: 2
Registered: March 2021
Junior Member
Hello everyone :)

So I'm currently trying to generate sequence diagrams using ecplise's plugin found in the following link:

https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.sample.interactions.design

For that matter, I've imported the Viewpoint's metamodel file, and its respective .edit and .editor file systems (i.e. the following projects).
- org.eclipse.sirius.sample.interactions.
- org.eclipse.sirius.sample.interactions.edit
- org.eclipse.sirius.sample.interactions.editor
- org.eclipse.sirius.sample.interactions.design (on runtime)

Since this sample projetc lets you instanciate "participants" defining its type using standard ecore classes, it should be possible to also define them using customised classes defined on an external metamodel.

For that matter I defined a simpe metamodel (i.e. for an automised gate) sourcing the interaction.ecore file and the metamodel ecore file both ways. However I'm still unable to define a participant type as any of my metamodel classes (i.e. GateDoor).

So, is there any method to instanciate a custom type instance/participant in a sequence diagram?

Thanks in advance,

Cristian

[Updated on: Mon, 22 March 2021 20:32]

Report message to a moderator

Re: How to instantiate timelines in a sequence diagram using customised classes (from matamodel) [message #1839659 is a reply to message #1839376] Thu, 25 March 2021 10:01 Go to previous messageGo to next message
Glenn Plouhinec is currently offline Glenn PlouhinecFriend
Messages: 22
Registered: April 2020
Junior Member
Hi Cristian,

If I understand correctly you are trying to create your own metamodel that extends "interactions.ecore" right? This is more a question about EMF than Sirius ;)
On my side I could extend it by adding the resource "interactions.ecore" in my "customInteractions.ecore" (right click > Load Resource...) then by creating classes with references to the classes of "interactions.ecore". Then in the .genmodel file, "Generator" tab I did a right click > "Reload..." and I had to check "org.eclipse.emf.ecore" as Referenced generator model. Finally a Generate All in the genmodel allows to generate the necessary packages before launching a runtime that includes them.
Furthermore, if you want to create a Viewpoint Specification Model of your project, you will probably have to create a reference to the VSM "interaction.odesign" and the necessary metamodels.

Best regards,
Glenn


Glenn Plouhinec - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to instantiate timelines in a sequence diagram using customised classes (from matamodel) [message #1839788 is a reply to message #1839659] Mon, 29 March 2021 07:41 Go to previous messageGo to next message
Cristian Valenci is currently offline Cristian ValenciFriend
Messages: 2
Registered: March 2021
Junior Member
Hi Glenn,

Indeed, I'm trying to instanciate my participants as a class that I defined on a metamodel of my own. However the Sirius sample only lets you instantiate them as one of the Ecore classes. I've tried doing what you explained without success. So if it's possible, could you illustrate what you did, maybe I'm doing the wrong procedure because I do have sourced the interaction model in my metamodel and also referenced my classes to the participants, yet I'm still unable to intanciate participants as a class of my own (i.e. as an User).

Best regards,
Cristian
Re: How to instantiate timelines in a sequence diagram using customised classes (from matamodel) [message #1839790 is a reply to message #1839788] Mon, 29 March 2021 08:24 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 515
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Cristian,

I understand that you are currently trying as a User (and not yet programmatically) to use your just created created your own metamodel to define GateDoor and some other concepts.

If you have modified the provided sample metamodel, you shoud then modify the ".design" project and its .odesign Viewpoint Specification model in order to provides new tools, and mapping/service modifications to let Sirius find and be able to display your kind of elements.

If you have cretaed a new metamodel, you will need to modifiy the .odesign and its plugin to register the new metamodel (plugins dependencies and properties fo the DiagramDescription), then you will have to create a model (manually, from the Reflective Ecore Editor) to be able to see elements until you have working tools in the VSM to create your elements in the model from the palette.

Sirius sample Sequenc editor based on the Siris Interaction sample metamodel, is only able to create Participants relying on the interaction::Participant class as the Participant creation tool from the VSM is defined to do this. If you want to change the type, you can create your own equivalent tool but with your metamodel class in the createInstance task.

Regards


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Centering the text of a container's label
Next Topic:Sirius Web tutorial
Goto Forum:
  


Current Time: Sun Sep 25 20:57:25 GMT 2022

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

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

Back to the top