Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Re: Bug in "align fields in columns" Formatter with inline comments
Re: Bug in "align fields in columns" Formatter with inline comments [message #692908] Tue, 05 July 2011 13:00 Go to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
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?
Bug in "align fields in columns" Formatter with inline comments [message #692967 is a reply to message #692908] Tue, 05 July 2011 15:01 Go to previous messageGo to next message
NemoStein  is currently offline NemoStein Friend
Messages: 7
Registered: May 2011
Junior Member
This is the original post, thank you Sebastian!

_______________________________________________

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 #693376 is a reply to message #692967] Wed, 06 July 2011 11:06 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
Have you modified any formatter preferences? Using the default options, I am neither getting the code as you are expecting nor as you are getting.
Re: Bug in "align fields in columns" Formatter with inline comments [message #693391 is a reply to message #693376] Wed, 06 July 2011 11:30 Go to previous message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
Sorry, I haven't seen the post properly. Please file a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT;component=Core
Previous Topic:Eclipse Error
Next Topic:create a web service client from a WSDL that is only accessible via a self-signed SSL cert
Goto Forum:
  


Current Time: Tue Mar 19 05:22:41 GMT 2024

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

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

Back to the top