Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Create diagram editor
Create diagram editor [message #1763699] Thu, 18 May 2017 17:33 Go to next message
Lainis 20 is currently offline Lainis 20Friend
Messages: 26
Registered: November 2016
Junior Member
Hi,

I was looking at the sirius tutorials and I have some questions.

1. Can I create a diagram editor (palette and empty canvas) without create the model? For example the family example diagram starts with people created before create a new representation. I need the model to be empty and the user to populate the model through the canvas.

2. I need to select a node and allow or not to open and related a different viewpoint or diferent diagram editor, but I need all the elements to be in the same model. Is that possible with sirius?

Thank you so much
Re: Create diagram editor [message #1763731 is a reply to message #1763699] Fri, 19 May 2017 07:26 Go to previous messageGo to next message
Frederic Madiot is currently offline Frederic MadiotFriend
Messages: 14
Registered: October 2014
Location: Nantes
Junior Member

Hi,
1. No, you must at least create a model containing a root element on which you can create a first diagram. In the tutorial example, you must create a model containing a Family instance. From the Family instance you can then create a blank diagram on which you can create new persons.
2. Not sure to understand your question. From a selected node, you can open editors for other kinds of diagrams with a menu or a double-click (see https://wiki.eclipse.org/Sirius/Tutorials/AdvancedTutorial#Object-Centered_Diagram)
Best regards,
Fred


Frédéric Madiot - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Create diagram editor [message #1763985 is a reply to message #1763731] Tue, 23 May 2017 16:16 Go to previous messageGo to next message
Lina 20 is currently offline Lina 20Friend
Messages: 32
Registered: March 2017
Member
Hi fred,

Thanks for your answer.

1. I create a first diagram in wich I can create new Man Nodes. Thanks
2. I followed the tutorial you suggested me, that is what I need. Thanks. But now I have two questions. a) I try to put a new instance of Man inside the new diagram relations editor instead the same element like the tutorial suggest. But I can't understand why I cannot put a man inside the editor or the man is not being drawed if I have the same configuration for the first diagram description. b) Can I create a diagram representation in the same odesign based on a different metamodel? for example a Man has relations to pets (my own ecore).

I appreciate your help. Thank you so much.

I attached the diagram editor that is not drawing the element and the odesign view. Thanks

Lina

Re: Create diagram editor [message #1764074 is a reply to message #1763985] Wed, 24 May 2017 14:44 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Lina,

It seems that your diagram description is incomplete.
First there is no ModelOperation in the "Begin" element of your "Mansini" tool node creation tool. So when you use the tool, there is no model modification.
Then I noticed that your DiagramDescription seems to be defined on "Man" or "Person" domain class, then you cannot reuse the same semantic candidates than the other diagram which is based on the Family : the navigation request indicates to Sirius how to find Man/Woman/Person elements from a Family. The will return no result if you try to evaluate them from an other person (the root semant element of your current diagram)

To answer to your last question, it is possible to mix several metamodels on the same diagram or in the same Viewpoint, you have to select them in the Metamodels tab of the DiagramDescription and then you will need to build request or Java service able to query your models. If you have links between both metamodels you just have to follow the EMF reference otherwise you might need an additional metamodel to link them or your own system (annotations, naming rules...) to simulate it.

Regards


Maxime

[Updated on: Wed, 24 May 2017 14:44]

Report message to a moderator

Re: Create diagram editor [message #1764083 is a reply to message #1764074] Wed, 24 May 2017 15:11 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

You might also look the result of theAdvanced Tutorial and its Relationships diagram.
See:
- https://wiki.eclipse.org/Sirius/Tutorials/AdvancedTutorial
- RelationShips diagram creation steps: https://wiki.eclipse.org/Sirius/Tutorials/AdvancedTutorial#Object-Centered_Diagram
- solution: menu File > New > Example... : select Basic Family Modeler Definition - Advanced Tutorial Solution

Regards,

Maxime
Re: Create diagram editor [message #1764632 is a reply to message #1764083] Thu, 01 June 2017 04:43 Go to previous message
Lina 20 is currently offline Lina 20Friend
Messages: 32
Registered: March 2017
Member
Hi Maxime,

Thanks for your answer. I made the Object Centered Diagram tutorial on the family ecore and on my project too. The family tutorial works fine, but not mine.

When I 'm going to create the relations diagram (the second one) I get the following error: - Feature name not found in EClass EObject -, this happens when I set title expression to: "aql:' Viewpoint for '+ self.name".
I was comparing basicfamily ecore against my own ecore and looks like the same but with different names. Instead of Family is ArchimateModel and instead of Person is ArchimateElement. Both of them have "name" feature in the ecore file. So I do not know how to solve this error.

What I finally want to achieve is to open a new diagram related to a businessprocess (like family tutorial - relations of man) with different elements in the canvas related to another ecore (different of my archimate, is not in the tutorial).

I attached my own ecore and my odesign.

I appreciate if you can help me.
Thank you so much,

Lina
Previous Topic:Create Relation Edge through JAva Service
Next Topic:Multi-level Tree Custom Layout
Goto Forum:
  


Current Time: Tue Apr 23 09:35:37 GMT 2024

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

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

Back to the top