Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend - nested graph information(problem with creating nested graph information)
Xtend - nested graph information [message #703333] Wed, 27 July 2011 13:11 Go to next message
gibtsdennsowas is currently offline gibtsdennsowasFriend
Messages: 3
Registered: July 2011
Junior Member
hi there,

i want to implement a M2M.
therefor i have a target metamodel:

Vertex {
NativeProperties(type of SemanticProperty)

SemanticProperty {
Name(type of String)
Value(type of String)
NativeProperties (type of SemanticProperty)

So, a Vertex object can contain some information (nested informations too, cause SemanticProperty contains a NativeProperties too).

my prob is: how do i put the (nested) source informations into this metamodel.
i tried:

create Vertex toVertex(Entity e):



create SemanticProperty toSemanticProperties(Parameter p):
	//setting name-attribute fine	

create SemanticProperty toSemanticProperties(String string):

ok, this is fine if i have informations on level 0.

but now i want to add some informations on level 1, e.g.


for this, i have:

//...same as above

(2) NativeProperties.collect(e|("  "+e.Name).info()->"  "+e.NativeProperties.collect(e|("	"+e.Name).info()))

but it seems that its not a good way, cause my output says:

--Level1InfoSub1 (!)
--Level1InfoSub2 (!)
--Level1InfoSub3 (!)

i not sure if the computation of the output (2) is wrong, or the creation statement (2) is wrong.
Can anyone help me please?

Thanks a lot!
Re: Xtend - nested graph information [message #703670 is a reply to message #703333] Wed, 27 July 2011 20:10 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13925
Registered: July 2009
Senior Member
Hi, you are using Xpands Xtend. Therefore the M2T forum would be the right place.
never the less

to solve this problem following would be helpful:

- how does to source mm look like
- how does a sample input model look like
- how does the complete ext file look like
(where do you call the trafo for the nested stuff)

In General: why do you do this string/metatype stuff


Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Xtext 1.0 -> 2.0 / import ecore on classpath not working as before
Next Topic:Error-markers for write-protected files
Goto Forum:

Current Time: Thu May 06 13:10:07 GMT 2021

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

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

Back to the top