Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Bug in "align fields in columns" Formatter with inline comments
Bug in "align fields in columns" Formatter with inline comments [message #692892] Tue, 05 July 2011 12:26 Go to next message
NemoStein  is currently offline NemoStein Friend
Messages: 7
Registered: May 2011
Junior Member

This thread was, once again, moved to JDT (hopes that is the right place this time) at: http://www.eclipse.org/forums/index.php/m/692967/#msg_692967

________________________________________

Hail community!

I'm moving this thread from newcomers forums, as no one gave attention to it there.
Sorry if this isn't the place (again).

I think that my issue is a (rather simple) bug.
When formating multiple fields with "align fields in columns" checked and with comments at the end of the line, depending on the number of characters in that line, the comment come one tab back.

Assume the following code:
public String ONE = "1"; // a
public String TWO = "22"; // b
public String THREE = "333"; // c
public String FOUR = "4444"; // d

When applying formatting, this is what I expect as formated output:
	public String	ONE	= "1";		// a
	public String	TWO	= "22";		// b
	public String	THREE	= "333";	// c
	public String	FOUR	= "4444";	// d

But this is the formated output that I receive:
	public String	ONE	= "1";		// a
	public String	TWO	= "22";	// b
	public String	THREE	= "333";	// c
	public String	FOUR	= "4444";	// d


if you increase or decrease in one the number of characters in the value part (the string itself) the formatting works like expected.
	public String	TWO	= "2";		// b
	public String	TWO	= "22";	// b
	public String	TWO	= "222";	// b



Some one knows if this is a bug or a problem with my setup?

[Updated on: Tue, 05 July 2011 15:02]

Report message to a moderator

Re: Bug in "align fields in columns" Formatter with inline comments [message #692899 is a reply to message #692892] Tue, 05 July 2011 12:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13614
Registered: July 2009
Senior Member
Hi,

i guess this is targeting the Java Formatter. For questions on the Java Delevopment Tools (JDT) please use the corresponding forum/newsgroup: http://www.eclipse.org/forums/index.php/f/13/.
This forum is for questions on the Modeling Framework Xtext.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 05 July 2011 12:52]

Report message to a moderator

Re: Bug in "align fields in columns" Formatter with inline comments [message #692904 is a reply to message #692892] Tue, 05 July 2011 12:58 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hi Nemo,

I'm forwarding your question to the JDT newsgroup which should be a
better match.

Regards,
Sebastian

On 05.07.11 14:26, NemoStein wrote:
> Hail community!
>
> I'm moving this thread from newcomers forums, as no one gave attention
> to it there.
> Sorry if this isn't the place (again).
>
> I think that my issue is a (rather simple) bug.
> When formating multiple fields with "align fields in columns" checked
> and with comments at the end of the line, depending on the number of
> characters in that line, the comment come one tab back.
>
> Assume the following code:
>
> public String ONE = "1"; // a
> public String TWO = "22"; // b
> public String THREE = "333"; // c
> public String FOUR = "4444"; // d
>
> When applying formatting, this is what I expect as formated output:
>
> public String ONE = "1"; // a
> public String TWO = "22"; // b
> public String THREE = "333"; // c
> public String FOUR = "4444"; // d
>
> But this is the formated output that I receive:
>
> public String ONE = "1"; // a
> public String TWO = "22"; // b
> public String THREE = "333"; // c
> public String FOUR = "4444"; // d
>
>
> if you increase or decrease in one the number of characters in the value
> part (the string itself) the formatting works like expected.
>
> public String TWO = "2"; // b
>
> public String TWO = "22"; // b
>
> public String TWO = "222"; // b
>
>
>
> Some one knows if this is a bug or a problem with my setup?
Re: Bug in "align fields in columns" Formatter with inline comments [message #692964 is a reply to message #692904] Tue, 05 July 2011 14:57 Go to previous message
NemoStein  is currently offline NemoStein Friend
Messages: 7
Registered: May 2011
Junior Member
Thank you both! =D
Previous Topic:Reflexive contentassist
Next Topic:JavaValidator Xtext 2.0 Migration
Goto Forum:
  


Current Time: Wed Sep 30 00:20:23 GMT 2020

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

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

Back to the top