Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Same keywords xtext formatter
Same keywords xtext formatter [message #1851577] Fri, 08 April 2022 19:09 Go to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member

I am trying to format a DSL, however I am having an issue. Consider I have the following:

'Element A' '{ ' ...... '}'
'Element B' '{ ' ...... '}'
'Element C' '{ ' ...... '}'

Now I want to do something with the third opening bracket after Element C. However, when I do,

The formatting happens to the first opening bracket in Element A.
Is there a way to access directly the third one?

Re: Same keywords xtext formatter [message #1851583 is a reply to message #1851577] Sat, 09 April 2022 05:25 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14652
Registered: July 2009
Senior Member
doesnt the regionFor.keywords(",") return a list?
you also can take a look at grammarAccess and the regionFor method that takes grammar elements as parameters

Twitter : @chrdietrich
Blog :
Previous Topic:Storing list of eobjects before calling xtext validations
Next Topic:Xtext 2.27.0.M1 is out
Goto Forum:

Current Time: Mon Feb 26 12:26:17 GMT 2024

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

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

Back to the top