Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Identation in xtend template with tracing
Identation in xtend template with tracing [message #1858485] Tue, 04 April 2023 13:13 Go to next message
Eclipse UserFriend
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 13:31 Go to previous messageGo to next message
Eclipse UserFriend
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

[Updated on: Tue, 04 April 2023 15:19] by Moderator

Re: Identation in xtend template with tracing [message #1858488 is a reply to message #1858486] Tue, 04 April 2023 14:25 Go to previous message
Eclipse UserFriend
Thanks Christian, I will look into it.
Previous Topic:Xtext tracing
Next Topic:Maven build does not find xcore lib?
Goto Forum:
  


Current Time: Mon Apr 28 19:43:00 EDT 2025

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

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

Back to the top