Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Align fields in columns broken?(Align fields in columns formatter option appears broken)
Align fields in columns broken? [message #721667] Fri, 02 September 2011 09:36 Go to next message
Eclipse UserFriend
I'm trying to configure the formatter so that sets of lines that are assigning values have the equal / colons aligned. I found something online saying that the "Align fields in columns" option on the indentation tab of the Code Formatter options dialog is supposed to provide this behavior, but this does not seem to work.

Sample code:
var foo =
{
   a : 1,
   bb : 2,
   ccc : 3
};

var a = 1;
var bb = 2;
var ccc = 3;

I would like it to look like this:
var foo =
{
   a   : 1,
   bb  : 2,
   ccc : 3
};

var a   = 1;
var bb  = 2;
var ccc = 3;

Can anyone out there help?
Thanks,
Arin

Edited to apply correct code formatting in post

[Updated on: Fri, 02 September 2011 09:39] by Moderator

(no subject) [message #721683 is a reply to message #721667] Fri, 02 September 2011 10:37 Go to previous messageGo to next message
Eclipse UserFriend
(This is less of a question for the web tools than for the newcomers
forum where it would receive greater consideration in terms of numbers
who see it and answers given.)

On 02-Sep-11 07:36, dread45153 wrote:
> I'm trying to configure the formatter so that sets of lines that are
> assigning values have the equal / colons aligned. I found something
> online saying that the "Align fields in columns" option on the
> indentation tab of the Code Formatter options dialog is supposed to
> provide this behavior, but this does not seem to work.
>
> Sample code:
> var foo =
> {
> a : 1,
> bb : 2,
> ccc : 3
> };
>
> var a = 1;
> var bb = 2;
> var ccc = 3;
>
> I would like it to look like this:
> var foo =
> {
> a : 1,
> bb : 2,
> ccc : 3
> };
>
> var a = 1;
> var bb = 2;
> var ccc = 3;
>
> Can anyone out there help?
> Thanks,
> Arin
Re: (no subject) [message #721687 is a reply to message #721683] Fri, 02 September 2011 10:58 Go to previous messageGo to next message
Eclipse UserFriend
This is an issue specific to the JavaScript code formatter. Since the exported XML file from the formatter profile contains the id "org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" I assumed that this would need to be implemented by the WST package and not by the core eclipse project.

I'm trying to figure out if this is a bug (and if so, a workaround), or if this is "expected behavior" for that function...
Re: (no subject) [message #721712 is a reply to message #721687] Fri, 02 September 2011 12:18 Go to previous message
Eclipse UserFriend
On 02-Sep-11 08:58, dread45153 wrote:
> This is an issue specific to the JavaScript code formatter. Since the
> exported XML file from the formatter profile contains the id
> "org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" I
> assumed that this would need to be implemented by the WST package and
> not by the core eclipse project.
>
> I'm trying to figure out if this is a bug (and if so, a workaround), or
> if this is "expected behavior" for that function...

(Ah, sorry, my bad...)
Previous Topic:Extend XML Editor
Next Topic:eclipse gui disappear
Goto Forum:
  


Current Time: Wed Jul 23 12:22:35 EDT 2025

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

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

Back to the top