Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Padding values in the formatter
Padding values in the formatter [message #647261] Wed, 05 January 2011 13:02 Go to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
Hi,

For getting nice results in the serialized models, we would like to not
just do line wraps and indentation, but also padding of values.

Here is an example for illustration:

Now:
MyClass {
aa : int
b : String
cccc : long
}

What we want instead is:
MyClass {
aa : int
b : String
cccc : long
}

Is there any chance to get this result with Xtext? I couldn't figure out
how this could be possibly done...

Thanks in advance for any hints!
Kai
Re: Padding values in the formatter [message #647271 is a reply to message #647261] Wed, 05 January 2011 13:27 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

I don't think this will work out of the box. You will have to implement
your own serialiser/formatter for that.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Padding values in the formatter [message #647325 is a reply to message #647261] Wed, 05 January 2011 16:33 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Kai!

Yes, the configuration based approach does not allow that currently. I also think this is a really nice feature, also column-based alignemnt for tabular texts. Maybe you could raise a feature request?

Best wishes,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Padding values in the formatter [message #647425 is a reply to message #647325] Thu, 06 January 2011 08:49 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
Hi Karsten!

Thanks for your suggestion, I have entered a feature request here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=333629

Kind regards,
Kai
Previous Topic:Where is toString method of good old oAW 4
Next Topic:Cross-reference problem
Goto Forum:
  


Current Time: Sat Apr 27 02:59:09 GMT 2024

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

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

Back to the top