Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Generate configuration file out of GMF
Generate configuration file out of GMF [message #825087] Tue, 20 March 2012 12:57 Go to next message
Heinz Huber is currently offline Heinz HuberFriend
Messages: 45
Registered: February 2012
Member
Hi,

i'm searching for a framework which is able to build configuration files for me. My use case is, that i've got router configs which are at the moment written with a xtext plugin. Now i want to generate a grapical interface for that. The user should have elements which he can drag/drop and connect them with lines, so that a structure is build. Also it should be possible to set attributes of these defined elements.

So the framework has to be able to do the following things:
1) I can define a graphical interface with defined elements
2) The framework (with my programming help) is able to build a configuration file out of this

I think GMF maybe able to do something like this, but i couldn't find information about the "generate config file out of the modell" thing.

Hope someone understands what my use case is and knews if this is possible with GMF. If not -> Maybe you got a hint for me which framework will be good to use.

Thanks in advance for your help! Smile

Re: Generate configuration file out of GMF [message #825805 is a reply to message #825087] Wed, 21 March 2012 09:20 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

if you already have defined an XTEXT syntax for the meta-model you use with GMF you should be able to get the text automatically generated. I think the people in the XTEXT forums know more about this. The only thing I can point yout to is to the XTEXT documentation. There is a description of such a use case. If you want to only generate text and do not want to have the text2model direction you also could use model 2 text transformations on your ecore model instance. Here you can find more http://www.eclipse.org/modeling/m2t/ as far as I know Acceleo is a good choice but I am not an expert on m2t transformations.

Ralph
Re: Generate configuration file out of GMF [message #825953 is a reply to message #825087] Wed, 21 March 2012 13:13 Go to previous messageGo to next message
Andreas Muelder is currently offline Andreas MuelderFriend
Messages: 73
Registered: July 2011
Member
hi Heinz,
it is not very difficult to set GMF on top of a XtextResource that serializes the semantic model as text.

Check out this documentation:
http://www.eclipse.org/Xtext/documentation/2_1_0/210-emf-integration.php

Especially the part
Stage 1: Make GMF Read and Write the Semantic Model As Text
might be interesting for you.

Regards,
Andreas
Re: Generate configuration file out of GMF [message #825960 is a reply to message #825805] Wed, 21 March 2012 13:26 Go to previous messageGo to next message
Heinz Huber is currently offline Heinz HuberFriend
Messages: 45
Registered: February 2012
Member
Hi Ralph,

thanks for your answer!
I just watched the Acceleo side and got a question.

The pictures and all that stuff on the Acceleo side doesn't look like the thing i want to build.
You're right that i got a fully defined Xtext grammar and some other features build in Xtext, but the thing i want to build now is a real graphical editor. It should look like some kind of "Microsoft Visio". The user should have the chance to drag and drop elements on a free plate, connect them with wires, change their attributes by clicking on them and so on!

Out of this the picture on the plate system should then generate a file (which represents the configuration).

Am i right, that Acceleo isn't able to do things like this?
Or are the pictures and all that stuff on their site just miss understood by me?

I also will try to asks for that in the Xtext board!


@Andreas: Thanks for that link! I will try that tomorrow ... hope that works! Smile

[Updated on: Wed, 21 March 2012 14:12]

Report message to a moderator

Re: Generate configuration file out of GMF [message #831907 is a reply to message #825960] Thu, 29 March 2012 14:06 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

Acceleo is only a model to text transformation plugin which you can use to make text out of an ecore model. If you want to create a graphical editor on top of an EMF model you should use GMF as it helps you a lot with this task. Do you have a ECore meta-model for your language? If not this is the first thing you can start doing. Afterwards you can make XTEXT work with your Ecore meta-model and create a graphical gmf editor ontop of the ecore model. When doing so you should get the following for your editor:

1) A textual model editor
2) A graphical model editor (like visio)
3) A structural tree model editor

By using EMF as underlying meta-model you have the option to use the whole modeling eco-system of Eclipse with your meta-model.

Ralph
Re: Generate configuration file out of GMF [message #882454 is a reply to message #831907] Wed, 06 June 2012 13:51 Go to previous message
Maxime D is currently offline Maxime DFriend
Messages: 27
Registered: June 2012
Junior Member
Hi all !

I would like to know which framework you finally used, Heinz.

In fact, I currently have the same used case than you, I have to create a graphical plugin to create a text configuration file.

I did many research with Google, reading documentation of EMF, GMF, Graphiti and others as JFace, JDT, WST, LTK etc...
And finally my google's research send me here.

So, if you wouldn't mind to share your experience with me, it would be very helpful.

Thanks in advance.
Previous Topic:[GMF Notation] Why reason ViewImpl.getElement() is customized
Next Topic:Diagram generation does not respect the Interface Name Pattern supplied in genmodel ?
Goto Forum:
  


Current Time: Fri Apr 26 09:09:07 GMT 2024

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

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

Back to the top