Code Commenting in Xtend and Blank line operation

146 views
Skip to first unread message

Hemal Bavishi

unread,
Dec 5, 2014, 8:29:47 AM12/5/14
to xtend...@googlegroups.com
Hello,

1) In XPand, I used to comment the code or line using "REM" block. I am just wondering how that is possible using XTend. 
«REM»comment«ENDREM»

2) Blank line:

If I add a blank line in between the conditional code in the .xtend file then it add blank line in the java file even if it does not have a gray space. This blank line is used to make the .xtend file more readable (explicitly when you have so many conditional statement) but at the same time I don't want this space to be added in the final output. 

      «conditional code»,

      «conditional code»,

Regards,
Hemal Bavishi

Christian Dietrich

unread,
Dec 5, 2014, 8:49:17 AM12/5/14
to xtend...@googlegroups.com
for comment use triple ««« comment


Hemal Bavishi

unread,
Dec 5, 2014, 9:49:03 AM12/5/14
to xtend...@googlegroups.com
Thanks. Any comment on how to avoid "blank line" between two statements in the output file?

Sebastian Zarnekow

unread,
Dec 5, 2014, 10:35:27 AM12/5/14
to xtend...@googlegroups.com
How about not putting blank lines into the template? ;) What you see is usually what you get. If your template is too big, you may want to split it into several methods.

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hemal Bavishi

unread,
Dec 5, 2014, 11:43:16 AM12/5/14
to xtend...@googlegroups.com
Thanks. I found a way out by adding "«««" in the blank space. Though it looks bit odd but it serves the purpose. 

Is there any shortcut option to add the comment line (similar to ctrl+space)?

Sebastian Zarnekow

unread,
Dec 5, 2014, 12:17:18 PM12/5/14
to xtend...@googlegroups.com
Ctrl+shift+7 will do that (toggle comment)
--
--
Sebastian Zarnekow
Hofholzallee 151 | 24109 Kiel
Tel: 0151 / 1739 6724

Hemal Bavishi

unread,
Dec 5, 2014, 12:43:19 PM12/5/14
to xtend...@googlegroups.com
Thanks and Have a nice week end!!!


On Friday, December 5, 2014 10:47:18 PM UTC+5:30, Sebastian Zarnekow wrote:
Ctrl+shift+7 will do that (toggle comment)

On Friday, December 5, 2014, Hemal Bavishi <hemal...@gmail.com> wrote:
Thanks. I found a way out by adding "«««" in the blank space. Though it looks bit odd but it serves the purpose. 

Is there any shortcut option to add the comment line (similar to ctrl+space)?

On Friday, December 5, 2014 9:05:27 PM UTC+5:30, Sebastian Zarnekow wrote:
How about not putting blank lines into the template? ;) What you see is usually what you get. If your template is too big, you may want to split it into several methods.

On Fri, Dec 5, 2014 at 3:49 PM, Hemal Bavishi <hemal...@gmail.com> wrote:
Thanks. Any comment on how to avoid "blank line" between two statements in the output file?


On Friday, December 5, 2014 7:19:17 PM UTC+5:30, Christian Dietrich wrote:
for comment use triple ««« comment


--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hemal Bavishi

unread,
Dec 8, 2014, 2:07:31 AM12/8/14
to xtend...@googlegroups.com
Looks like shortcut option to toggle the comment option is not working with the eclipse editor. 

Nevertheless, I found the correct one after few try;) It's ctrl+shift+c

On Friday, December 5, 2014 10:47:18 PM UTC+5:30, Sebastian Zarnekow wrote:
Ctrl+shift+7 will do that (toggle comment)

On Friday, December 5, 2014, Hemal Bavishi <hemal...@gmail.com> wrote:
Thanks. I found a way out by adding "«««" in the blank space. Though it looks bit odd but it serves the purpose. 

Is there any shortcut option to add the comment line (similar to ctrl+space)?

On Friday, December 5, 2014 9:05:27 PM UTC+5:30, Sebastian Zarnekow wrote:
How about not putting blank lines into the template? ;) What you see is usually what you get. If your template is too big, you may want to split it into several methods.

On Fri, Dec 5, 2014 at 3:49 PM, Hemal Bavishi <hemal...@gmail.com> wrote:
Thanks. Any comment on how to avoid "blank line" between two statements in the output file?


On Friday, December 5, 2014 7:19:17 PM UTC+5:30, Christian Dietrich wrote:
for comment use triple ««« comment


--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Stefan Oehme

unread,
Dec 9, 2014, 3:31:01 AM12/9/14
to xtend...@googlegroups.com
It's just ctrl+7 on windows, but ctrl+shift+c also works.
Reply all
Reply to author
Forward
0 new messages