Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Trim SemanticRegion (Formatting)(Trim SemanticRegion (Formatting))
Trim SemanticRegion (Formatting) [message #1771835] Thu, 31 August 2017 08:24 Go to next message
Konstantin Maltsev is currently offline Konstantin MaltsevFriend
Messages: 2
Registered: August 2017
Junior Member
Hello!
Because of particular qualities of my grammar i have whitespaces in Semantic Region.
How can I trim Semantic Region with Formatter extends AbstractFormatter2?

0 12 H "// language=ru"       Comment:TerminalRule'COMMENTS'
      B Feature              Feature
12  1  S "\n"                 Feature:nl+=NL
13  0  H
13 12  S "Функционал: "       Feature:featuretext=[DynaKey|ID]
25  0  H
25  7  >>>S "       asd asd   "            Feature:title=ID<<<
32  0  H
38  1  S "\n"                 Feature:featureTitleEnd+=NL
39  0  H
Re: Trim SemanticRegion (Formatting) [message #1771874 is a reply to message #1771835] Thu, 31 August 2017 14:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
can you give a more complete example? if you prepend the region with exactly one space this should do it

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Trim SemanticRegion (Formatting) [message #1771913 is a reply to message #1771874] Fri, 01 September 2017 03:46 Go to previous messageGo to next message
Konstantin Maltsev is currently offline Konstantin MaltsevFriend
Messages: 2
Registered: August 2017
Junior Member
What do I need to provide to make example more completely?
Are You talking about
feature.regionFor.feature(FEATURE__TITLE).prepend[oneSapce]?
Re: Trim SemanticRegion (Formatting) [message #1771915 is a reply to message #1771913] Fri, 01 September 2017 04:26 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hello would grammar sample model expected output.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:formatting - indentation following newline
Next Topic:Xtext generate visitor and traversal
Goto Forum:
  


Current Time: Wed Apr 24 23:08:42 GMT 2024

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

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

Back to the top