Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xpand or Xtext function NOCODE(No Code while running algorithem)
Xpand or Xtext function NOCODE [message #1703586] Mon, 03 August 2015 12:06 Go to next message
fox nox is currently offline fox noxFriend
Messages: 1
Registered: August 2015
Junior Member
Hello all,

I need a kind of function in the xpand or xtent language, which suppress the output of the FOREACH-Loops (CR, LF, Space or TAB) and IF-Sequences by doing normal calculation.
If code is written in normal way, often code is indent like the following:

«FOREACH ...
«FOREACH c.eAllContents ....
«set ...
«get ...
«ENDFOREACH-»
«ENDFOREACH-»

This is especially necessary for having a better view on the code and changing it afterwards. If the example above is done in Xpand the results looks bad!
I know I can add ")->>" or ")->"">>" but there are still new lines which I do not want.

In other languages there are similar function called [!NOCODE!].

[!NOCODE!]
...
... some code
....
[!ENDNOCODE!]

Is there a kind of function in Xpand also?
The solution could also be a JAVA function for Xtent.
Re: Xpand or Xtext function NOCODE [message #1703634 is a reply to message #1703586] Mon, 03 August 2015 18:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14111
Registered: July 2009
Senior Member
Hi

for Xpand/Xtend1 questions please use the m2t forum/newsgroup

ntl. there is no other option besides the ->> in xpand.

(maybe you can fix that with a beautifier)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xpand or Xtext function NOCODE [message #1843451 is a reply to message #1703586] Fri, 30 July 2021 08:08 Go to previous message
zhen zhong is currently offline zhen zhongFriend
Messages: 1
Registered: July 2021
Junior Member
hello, may i ask a question? What language is this?
[!//
...
... some code
....
[!ENDNOCODE!][!//
Previous Topic:Run the generated unit tests from the dsl test programmatically
Next Topic:Override SL_COMMENT
Goto Forum:
  


Current Time: Thu Jan 20 23:51:11 GMT 2022

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

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

Back to the top