Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Formatter required for blocks using xtext
Formatter required for blocks using xtext [message #1356832] Thu, 15 May 2014 08:37 Go to next message
madhavi nukala is currently offline madhavi nukalaFriend
Messages: 4
Registered: April 2014
Junior Member
Hello,
I'm developing DSL editor with Xtext .But I have a problem with the formatter. I extended the AbstractDeclarativeFormatter and everything working but getting problem in attribute block for column layout with uniform space .

Currently it is displaying as shown here ,

model TestModel extends Model {
attributes{
field1 :'Test'
field22 :'View'

}
}

I want to display in the following way :

model TestModel extends Model {
attributes{
field1 :'Test'
field22 :'View'

}
}

Please help me how can i achieve this vertical alignment with uniform space.

Suppose if I have to use IFormatter for my formatter class , please provide sample example , how to implement IFormatter in my DSL class
for ex: public class ZModelDslFormatter extends ZArtifactDslFormatter implements IFormatter {

Thanks
Madhavi
Re: Formatter required for blocks using xtext [message #1357037 is a reply to message #1356832] Thu, 15 May 2014 10:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i dont see anything special (space?!?) in your example


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Formatter required for blocks using xtext [message #1357080 is a reply to message #1357037] Thu, 15 May 2014 10:55 Go to previous messageGo to next message
madhavi nukala is currently offline madhavi nukalaFriend
Messages: 4
Registered: April 2014
Junior Member
Hi Christian ,

I want to align colon in the same line for all fields.

Thanks
Madhavi
Re: Formatter required for blocks using xtext [message #1357099 is a reply to message #1357080] Thu, 15 May 2014 11:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
i dont know if this is possible

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Formatter required for blocks using xtext [message #1357156 is a reply to message #1357099] Thu, 15 May 2014 11:43 Go to previous message
madhavi nukala is currently offline madhavi nukalaFriend
Messages: 4
Registered: April 2014
Junior Member
Is there any way to give the fixed length for the fields , after the fixed length can we align the colon in the same line . Is there any possibility for this .
Previous Topic:xtext builder hangs eclipse on unrelated changes
Next Topic:Accessing value of an EMF property generated with the STRING rule
Goto Forum:
  


Current Time: Thu Apr 18 23:45:53 GMT 2024

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

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

Back to the top