Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » deleted
deleted [message #915479] Mon, 17 September 2012 07:18 Go to next message
Vinod Ravi is currently offline Vinod Ravi
Messages: 12
Registered: August 2012
Junior Member

[Updated on: Sun, 28 October 2012 05:48]

Report message to a moderator

Re: Xtend template implementation [message #915649 is a reply to message #915479] Mon, 17 September 2012 13:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6130
Registered: July 2009
Senior Member
Hi,

i guess you have a basic missunderstandling of what the code gen is.
the code gen is a program that operates on the AST and not the text.
thus you might have an Item in your hand. an item has subclasses Operation and Event.

you can do instanceof checks and you can make use of dispatch functions in Xtend.
this might give you some hints on where to start.

since you do not give any context i cannot say what is better in your case

~Christian
deleted [message #915977 is a reply to message #915649] Tue, 18 September 2012 06:41 Go to previous messageGo to next message
Vinod Ravi is currently offline Vinod Ravi
Messages: 12
Registered: August 2012
Junior Member
No Message Body

[Updated on: Sun, 28 October 2012 05:48]

Report message to a moderator

Re: Xtend template implementation [message #915982 is a reply to message #915977] Tue, 18 September 2012 06:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6130
Registered: July 2009
Senior Member
Hi,

i am not quite sure what your mean with "event exists in my model"

interface.items.filter(typeof(Event)).size>0
for the second problem first collect all stuff
and then filter it for duplicates.

[Updated on: Tue, 18 September 2012 06:54]

Report message to a moderator

deleted [message #916010 is a reply to message #915982] Tue, 18 September 2012 08:00 Go to previous messageGo to next message
Vinod Ravi is currently offline Vinod Ravi
Messages: 12
Registered: August 2012
Junior Member
No Message Body

[Updated on: Sun, 28 October 2012 05:49]

Report message to a moderator

Re: Xtend template implementation [message #916016 is a reply to message #916010] Tue, 18 September 2012 08:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6130
Registered: July 2009
Senior Member
Hi grammar is a meta thing so the answer would be true in all cases.
So do you want to know if the model contains any event or if the
interface contains any event?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
deleted [message #916023 is a reply to message #916016] Tue, 18 September 2012 08:18 Go to previous messageGo to next message
Vinod Ravi is currently offline Vinod Ravi
Messages: 12
Registered: August 2012
Junior Member
No Message Body

[Updated on: Sun, 28 October 2012 05:49]

Report message to a moderator

Re: Xtend template implementation [message #916028 is a reply to message #916023] Tue, 18 September 2012 08:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6130
Registered: July 2009
Senior Member
Hi with model I meant the synonym for ast = the instance. With
interface I meant you metaclass interface respectively one instance
of it.

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
deleted [message #916070 is a reply to message #916028] Tue, 18 September 2012 09:38 Go to previous messageGo to next message
Vinod Ravi is currently offline Vinod Ravi
Messages: 12
Registered: August 2012
Junior Member
No Message Body

[Updated on: Sun, 28 October 2012 05:49]

Report message to a moderator

Re: Xtend template implementation [message #916102 is a reply to message #916070] Tue, 18 September 2012 10:30 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6130
Registered: July 2009
Senior Member
<wsdl:types>
<xs:schema targetNamespace="«nsURI»/«name»" xmlns:xs="h ttp://www.w3.org/2001/XMLSchema">
«FOR type: it.getAllTypes()»
«type.parametersType»
«ENDFOR»
</xs:schema>
</wsdl:types>

=> implement the getAllTypes by traversing the items and collecting all types
Previous Topic:Spell checking in Xdoc
Next Topic:Loading and navigating a DSL Model
Goto Forum:
  


Current Time: Thu Jul 24 16:09:52 EDT 2014

Powered by FUDForum. Page generated in 0.04477 seconds