Code formatter doesn't preserve newlines after update to bui

General discussion on Zend Studio
Post Reply
garethdart
Posts: 6
Joined: Tue May 22, 2012 8:22 am

Code formatter doesn't preserve newlines after update to bui

Post by garethdart » Tue May 22, 2012 8:47 am

Hi,

I've just received the update to build 20120507. I did a CTRL + SHIFT + F (which I tend to do pretty constantly while working) and all newlines between functions and after braces were stripped out. I went to Windows -> Preferences -> PHP -> Code Style -> Formatter and set up my own profile - this solved most of the problems but there does not seem to be any preferences there to set the following:

- newlines between closing braces of nested functions
- newlines after the last statement within braces

Which is fine, I'm perfectly happy to put these in manually as I type, BUT in that case then when I do a CTRL + SHIFT + F the formatter should respect the newlines which have been manually inserted. It doesn't, though, it deletes them. I have set my 'Number of empty lines to preserve' to 4 and it still deletes them.

I'm very strict about the human-readability of my code. The formatter in this new build makes my code look squished and difficult to read.

Can anyone advise how I stop Studio doing this, or can a Zend person advise when another build is coming out to fix this?

Many thanks,

Gareth

Tech details:

Zend Studio 9, Build ID 20120507
Windows 7 Professional SP1

ravlio
Posts: 2
Joined: Mon May 28, 2012 12:02 am

Re: Code formatter doesn't preserve newlines after update to

Post by ravlio » Mon May 28, 2012 12:08 am

The same problem. After updating the code formatter removes blank lines between methods, between constants and between comments. The code becomes unreadable! Change formatter settings give nothing.

For the third day instead of working, I failed, how to fix this stupid bug!

Zend Studio 9.0.3.v20120507440
MAC OS Lion

ravlio
Posts: 2
Joined: Mon May 28, 2012 12:02 am

Re: Code formatter doesn't preserve newlines after update to

Post by ravlio » Mon May 28, 2012 12:44 am

My current solution is rollback to previeous version. Go to "Help" menu->"Install new software" option->"What is already installed?" link->"Installation history" tab and revert to last stable version. It is works for me.

garethdart
Posts: 6
Joined: Tue May 22, 2012 8:22 am

Re: Code formatter doesn't preserve newlines after update to

Post by garethdart » Tue May 29, 2012 7:53 am

Thanks Ravlio - I too have rolled back to 9.0.2.

garethdart
Posts: 6
Joined: Tue May 22, 2012 8:22 am

Re: Code formatter doesn't preserve newlines after update to

Post by garethdart » Tue May 29, 2012 11:24 am

Ack! Did a rollback to the previous version as described but that just wiped Zend Studio off my PC - had to reinstall. Thanks for the tip anyway but it looks like that's not recommended for Windows even if it worked on a mac.

Since 9.0.2 doesn't appear to be available to download anymore I suppose I'll simply have to keep calm and carry on until a fix gets pushed out.

G

Post Reply