Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » How to align fields into columns
How to align fields into columns [message #1728164] Thu, 31 March 2016 12:53 Go to next message
Liang Lee is currently offline Liang LeeFriend
Messages: 1
Registered: March 2016
Junior Member
I am trying to align fields into columns in eclipse php , but i can't find this in code setting preferences.

I wanted to align following code:

$a = b;
$name = cccc;

i wanted the code should be aligned like below:

$a = b;
$name = cccc;

Is there any way to do this in eclipse php mars 2 ?
Re: How to align fields into columns [message #1779091 is a reply to message #1728164] Tue, 02 January 2018 14:49 Go to previous messageGo to next message
Robert Mising name is currently offline Robert Mising nameFriend
Messages: 2
Registered: July 2009
Location: Germany
Junior Member
Sorry for digging this old post but I want to do exact the same in eclipse Oxygen.2 Release (4.7.2) and PDT 5.2.0.

$a                   = 1;
$name                = 'max';

The "align fields into column" option is available in the java formatter settings but I can't find it for PHP.

The code example above may vary, depends witch font is used. So I attached a screenshot of the java formatter settings to make it clear, what I am looking for.

Re: How to align fields into columns [message #1779312 is a reply to message #1779091] Fri, 05 January 2018 09:19 Go to previous message
Jesus Bertrand is currently offline Jesus BertrandFriend
Messages: 4
Registered: January 2018
Junior Member
Thank you for the reply. I agree with Robert. When enabling the formatting option "align fields in columns" all member fields get aligned, like this
int member1 = 1;
int member2WithLongName = 2;
int member3 = 3;
String member4 = "asdf";
Previous Topic:Variables in PHPUnit Run Configuration
Next Topic:PHPUnit timeout
Goto Forum:

Current Time: Wed Mar 21 13:10:46 GMT 2018

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

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