Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Identation in xtend template with tracing
Identation in xtend template with tracing [message #1858485] Tue, 04 April 2023 17:13 Go to next message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
Hi

I generate different files with same xtend template.
Some of them need to have 3-space indentation, some need tab space indentation.
Currently I have had some post processing, that replaces the leading tabs from the template with the spaces needed.

However, now I want to make use of the tracing feature of xtend.

What is a good strategy now?

1. Also post process the .trace file, and adjust the offsets, according to the other post processing?
2. Somehow make the template configurable?
3. Something completely different?

regards
Frank
Re: Identation in xtend template with tracing [message #1858486 is a reply to message #1858485] Tue, 04 April 2023 17:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
i dont know of anybody who has ever done this.
maybe you can do the postprocessing based on the IGeneratorNode tree. (GeneratorNodeProcessor)

e.g. org.eclipse.xtext.generator.trace.node.IndentNode

or you used different GeneratorNodeExtensions
at different places


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 04 April 2023 19:19]

Report message to a moderator

Re: Identation in xtend template with tracing [message #1858488 is a reply to message #1858486] Tue, 04 April 2023 18:25 Go to previous message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
Thanks Christian, I will look into it.
Previous Topic:Xtext tracing
Next Topic:Maven build does not find xcore lib?
Goto Forum:
  


Current Time: Sat Apr 27 02:48:15 GMT 2024

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

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

Back to the top