|Semantics [message #724094]
||Sat, 10 September 2011 18:16
Registered: September 2011
I am new to Eclipse EMF and GMF and have been assigned a project related to editor development using GMF. I managed to create the editor, based on syntax, however I am not being able to figure out what and how to write the code for incorporating the semantics of the language.
What I want exactly is, for eg, I have an operator node '+', and two inputs and one output. Now in normal editor, it can be any node with two incoming nodes and an outgoing node. However I have to modify some code in order to let the editor know that '+' node will add the inputs and store in output. (this example is based on one of the tutorials I read)
I have to model a language for long running transactions, a modification of PI-calculus, in that for eg, a 2 or more Process can be input to the Parallel node, now I want that my editor should be able to understand that This Parallel node will select either of the processes. But if it is a sequence, then 1st Process is to be executed first followed by the second process. Something Like this.
At the moment, it just knows that these are nodes with different names.
Also, when I create the diagram, I get an option to create a domain model, which I assume it the instance of my meta-model, however, it does not have a tree structure. It is flat. i.e.
A diagram like this
generates a domain model like this:
instead of something like this:
Is this because I just have syntax representation in my editor at the moment ?
I am sorry if I sound so random or uninformed about the topic, but I really do not know how I should proceed. I have seen tutorials that aid in editor generation but none related to semantics and Modifying the generated code. Could anyone please suggest how can I solve this ? Any help will be appreciated, web materials, suggestions, code snippets, or even direct me to people who might know the answer ...I need to submit this on 12/09/2011 (Monday morning)..Though I am a bit late, I would be really grateful if someone could help, Please..
Thanx in advance
Powered by FUDForum
. Page generated in 0.03914 seconds