Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sample Model in Tutorial(Search tutorial for reuse of existing ECORE model)
Sample Model in Tutorial [message #1239502] Tue, 04 February 2014 05:20 Go to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
Hello,

I try to evaluate Sirius, and as I can understand of the tool, it's an alternative for GMF to define model user GUI...

So I wanted to use an ecore meta-model defining an editor, and use Sirius viewpoints to define the graphical characteritics.

But the sample video doesn't really show the lin between an ecore meta-model and the viewpoint adds-on.

I don't succeed in importing my own ecore and understanding the links with the Sirius plugin's.

Can you help me on the way to find these informations.

Regards
Re: Sample Model in Tutorial [message #1239573 is a reply to message #1239502] Tue, 04 February 2014 09:03 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
Hello,

You can define your ecore meta-model using Sirius, by creating a new Ecore Modeling Project (If you are in the Sirius perspective, simply right click on the Model Explorer view and go to New/Ecore Modeling Project). Sirius will provide a diagram to realise your meta-model.
Next to this project, create a Viewpoint Specification Project where you will be able to define your graphical descriptions in the .odesign file as described in the documentation.

Regards,
Steve
Re: Sample Model in Tutorial [message #1239588 is a reply to message #1239573] Tue, 04 February 2014 09:40 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
I'm sorry but it's not the way of my question.

It was:
how to use an ECORE predefined model (before Sirius exists) and use Sirius to define the graphical view (I undertoodd the tutorial & sirius also in this way...) ?

Is it possible or not?

If yes, I don't succeed because the tutorial doesn't tell how.

In my test:

I have an EMF project with *.ECORE, *.ECOREDIAG, & *.GENMODEL files of an old project.
I generated also .edit et .editor sources.

My goal: use Sirius to create an easy editor linked with *.ecore model (an alternative to GMF)

I create an empty Sirius "Viewpoint Specification project"...

And now how to make the link with my ECORE ?

1/ dependancy with mu EMF project.... it seems impossible
2/ copy/paste .ecore, .genmodel in my Sirius project :
=> I can't follow the tutorial because of the lack of representation file
=> If i try to create a representation file, I don't find how to link with .ecore file
3/ Another idea...?

If Sirius needs to start with blanck ecore model, it's a pity.

So when I try to create viewpoints none objects of my ecore model are known...

If you have a specific "use" for importing old ecore models and make them usable, I'm interested by this specific subject.

Regards
Cyril

Re: Sample Model in Tutorial [message #1239598 is a reply to message #1239588] Tue, 04 February 2014 10:12 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
Hello,

If you already have your EMF project containing your metamodel, you only need the "Viewpoint Specification Project". You should not need to add a dependency to your metamodel plugins. When you will create your first Representation Description (Diagram, Table, Tree...) in the Domain Based field you should be able to access your metamodel metaclasses with the auto-completion. You can also directly reference the used metamodel in the "Metamodels" tab on the Representation Description element.

Regards,
Steve
Re: Sample Model in Tutorial [message #1239860 is a reply to message #1239598] Wed, 05 February 2014 03:08 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
No Message Body
Re: Sample Model in Tutorial [message #1239862 is a reply to message #1239598] Wed, 05 February 2014 03:14 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
Hello,

1/ I don't succeed to have *.ecore visualisation like at the 0min06sec of the demo video with an external *.ecore (defined with EMF):

The model explorer doesn't show elements like on the video, and the Sirius equivalent for *.ecorediag is not available.

>> Any suggestion for that?

2/ I don't succeed to apply a viewpoint on my specific *.ecore model based project.
example.graphe is equivalent to My.basicfamily (but was defined with EMF/GMF)
But when I "right click" on Viewpoint selection, the window selector is empty, my viewpoint created is not available...
(So I'm not able to make equivalent of the video 1min20sec-1min23sec.

>> Any suggestion for that?

Regards
Cyril

Re: Sample Model in Tutorial [message #1239876 is a reply to message #1239862] Wed, 05 February 2014 03:47 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
Hi,

1/ To open the Ecore Diagram provided with Sirius you have two solutions:
- Right click on your .ecore file and "open with" "Sirius Ecore Editor". This will open a transient Sirius Session that will allow you to edit your .ecore but the diagram itself will not be saved on close.
- Convert the project containing your .ecore file into a Modeling project. To do so, right click on your project, go to "Configure" contextual menu at the bottom and select "Convert to Modeling Project". Now you will have the "Viewpoint Selection" menu accessible on your project and the Ecore Diagram will be available if you activate the "Design" viewpoint.

2/ If you have a project with a model sample (example.graphe in your case) but the Viewpoint Selector doesn't show the Viewpoint you created, it might be a missing field in your odesign. Open your odesign and select your Viewpoint element. In the general tab, you have a field "Model File Extension". In your case, if you have *.graphe models, you should set in this field "graphe". Does it fix your issue?

Regards,
Steve
Re: Sample Model in Tutorial [message #1239880 is a reply to message #1239876] Wed, 05 February 2014 03:59 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
Thank you for your answers.
It's help me and the second point fix it:

My mistake: Extension is case sensitive (.Graphe != .graphe)

Regards
Re: Sample Model in Tutorial [message #1239897 is a reply to message #1239876] Wed, 05 February 2014 04:31 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
New things:

I achieve to define new diagram, but, additional questions:

1/ is it possible (like in GMF to define the GUI defined as a plugin for ECLIPSE as GMF can do? (perhaps add it to the video at the end)

2/ in the video : 1min48, there is 4 fields in properties but when I make my own manips, I have only 3 fields without "Associated Elements Expression".
Is it correct not to have it? can I configure it ?

PS: not used in my case and in the video, but understanding why my interface is != could be great.

3/ some problems with link definition, but it seems to be due to my interpretation of your ecore model in video... (how can I attache files to this subject?..."Maximum File Size: 0KB" but the better is my screen capture to add)

Regards

[Updated on: Wed, 05 February 2014 05:13]

Report message to a moderator

Re: Sample Model in Tutorial [message #1239913 is a reply to message #1239897] Wed, 05 February 2014 05:11 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
1/ The "Viewpoint Specification Project" is a plug-in project, so you can export it as a "Deployable plug-ins and fragment" if you want. On creation, this project also add the required extension point (org.eclipse.sirius.componentization) used to provide your viewpoint component (your odesign). I am not entirely sure that I understood your question, does this reply to it?

2/ Indeed this "Associated Elements Expression" field has been moved from the General tab to the Advanced tab since the video recording.

Regards,
Steve
Re: Sample Model in Tutorial [message #1239919 is a reply to message #1239913] Wed, 05 February 2014 05:21 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
Ok I will try fot the 1/ but:

Have you a tutorial for this deployment? in order to evaluate it?

To be sure: My goal is to define an editor based on .ecore meta-model like GMF does.
Sirius allows to define easier GUI, and the last step is to "deploy it as a plugin that could be delivered"

(eg. I define a GUI for editing graphs, a make it as a plugin wo create *.graphe files... so a colleague install this plugin and use my new editor without knowing what Sirius has defined or done)

We can imagine add other plugin (like OCL checker or ACCELEO generators on this new editor...)

So if we talk about the same thing, perhaps can you confirm and/or complete your answer?

PS: I add other problems with link treatment but I can't add joint piece to add screenshots...

Re: Sample Model in Tutorial [message #1239928 is a reply to message #1239919] Wed, 05 February 2014 05:36 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
We do not have a deployment tutorial as the Viewpoint Specification Project is a plugin project and the required extension is automatically created. You will just need to add this plugin to your deployment/build process (tycho, maven...) used for your metamodel plugins.
Re: Sample Model in Tutorial [message #1239932 is a reply to message #1239928] Wed, 05 February 2014 05:44 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
Ok.

So for the last point: how can I add screenshots for my last problem concerning links?

PS: "Target Finder Expression*" field rules.... ???

Regards

[Updated on: Wed, 05 February 2014 05:51]

Report message to a moderator

Re: Sample Model in Tutorial [message #1239938 is a reply to message #1239932] Wed, 05 February 2014 05:51 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
If your are using your mail client to post message using NNTP, you can attach an image. If you are using the web interface of the forum...I do not know if it is possible. You can upload your screenshot on an image sharer website and post the link to it here I guess.

Regards,
Steve
Re: Sample Model in Tutorial [message #1240020 is a reply to message #1239938] Wed, 05 February 2014 09:44 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
NNTP => I don't know how to do that.

But the fact the web forum doesn't allow to attach file seems to be specific to Sirius forum (because for others tools I'm able and was able)

I will explain textually my problem:

I try to define links like "parent-children" links on video.
When I define the link I can define source & target objects (selectable from ecore model) but the "target finder expression" cause an exception:

"problem Occurred" in a popup with "'refresh' has encountered a problem...
An internal error occurred during: "Refresh ".
The feature 'children' is not a valid feature"

I try to set [children/] like on the video example.

And no link are drawn in the model (just boxes)

I try the following syntaxes [self.children/], [children], [children/]
And is the same thing...

So I don't know how to investigate to be correct in my viewpoint.

(I modify my ecore to correspond with your demo in order to be able to talk about the precise thing that is blocking in my manip.)


>>> Is it possible to receive *.odesign linked with the video?
because I have basicfamilly model and *.aird but perhaps *.odesign will allow to me to understabd my error in my projects.

Regards

[Updated on: Wed, 05 February 2014 10:41]

Report message to a moderator

Re: Sample Model in Tutorial [message #1240075 is a reply to message #1240020] Wed, 05 February 2014 11:48 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
Can you validate if you created a "Reference Based Edge Mapping" (instead of an "Element Based Edge Mapping" which has a field "Domain Base" for the semantic element to represent)?
Is "children" the name of your containing reference? If you select the source element and in the "Interpreter" view test your expression "[children/]", do you have the expected target as a result?
Re: Sample Model in Tutorial [message #1240110 is a reply to message #1240075] Wed, 05 February 2014 13:19 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
I use "relation based edge" and not "element based edge", is it correct?
then if I click on CTRL+SPACE the interpreter gives me [/]
and if I click on CTRL+SPACE into[/] the interpreter gives me all data of ecore models links so "children"...

Perhaps if you join *.odesign of the video, I could analyse the problem in the *.odesign file...

Re: Sample Model in Tutorial [message #1240333 is a reply to message #1240110] Thu, 06 February 2014 03:47 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
Yes it is correct to use a relation based edge in order to display your "children" relation.

I can't give you this odesign sample, there is an opened issue for it https://bugs.eclipse.org/bugs/show_bug.cgi?id=422490. It is currently located in another git repository.
However, you can import as source the following plugin : org.eclipse.sirius.sample.ecore.design. It contains the odesign used for the Sirius Ecore Editor that you used previously and many more representation descriptions. You should find all the examples you need in this sample.

[Updated on: Thu, 06 February 2014 05:01]

Report message to a moderator

Re: Sample Model in Tutorial [message #1240339 is a reply to message #1240333] Thu, 06 February 2014 03:59 Go to previous messageGo to next message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
Hi,

The issue link is not valid in your answer :

>>> '422490.' is not a valid bug number nor an alias to a bug.

If the edge is correct I don't have any idea of the problem in my case... But none link possible!

Perhaps now the only way to have help is sending you all my files, if a way to do this exist... With email adress and not forum...

regards
Re: Sample Model in Tutorial [message #1240374 is a reply to message #1240339] Thu, 06 February 2014 05:05 Go to previous messageGo to next message
Steve Monnier is currently offline Steve Monnier
Messages: 42
Registered: May 2011
Member
I fixed the link to the bugzilla.
Does your expression with "children" works using the "Interpreter" view?
You can take a look to the edge mapping "EC ESupertypes" on the "Entities" diagram description of the sample org.eclipse.sirius.sample.ecore.design. It seems to be quite alike your case.
Re: Sample Model in Tutorial [message #1240389 is a reply to message #1240374] Thu, 06 February 2014 05:46 Go to previous message
cyril dufrechou is currently offline cyril dufrechou
Messages: 35
Registered: September 2013
Member
No help with this sample: no ecore files and only "images" of a design...
To investigate it's difficult.

I create a bug in buzilla => so all my projects files are joined.

the edge link "children, subCElem, subAelem, parents" tried for the link definition but none ok.

Regards
Previous Topic:Predicate expression in Conditional Edge Style Description
Next Topic:'remove' mapping in layer
Goto Forum:
  


Current Time: Sat Aug 30 06:26:21 EDT 2014

Powered by FUDForum. Page generated in 0.02408 seconds