Autoformat (Ctrl+Shift+F) introduces code errors.

General discussion on Zend Studio
Post Reply
ausdev6000
Posts: 17
Joined: Sat Nov 26, 2011 7:59 am

Autoformat (Ctrl+Shift+F) introduces code errors.

Post by ausdev6000 » Fri Jan 27, 2012 7:10 am

Two problems with autoformat:

Leading backslashes from use statements will be erased.

Code: Select all

use \Logger as Logger;
becomes

Code: Select all

use Logger as Logger;
The second problem is that phpdoc blocks empty of text will cause the function that follows to be commented out.

Code: Select all

/**
 *
 */
public function a_function() {
    $i = 0;
}
becomes

Code: Select all

/**
 *
 */
/**public function a_function() {
    $i = 0;
}
These problems may have been recently introduced to Zend Studio 9. Please track them down.

User avatar
sylvie6713
Posts: 311
Joined: Fri Feb 27, 2009 10:24 am
Location: Bulgaria
Contact:

Re: Autoformat (Ctrl+Shift+F) introduces code errors.

Post by sylvie6713 » Fri Jan 27, 2012 10:11 am

Hi
I reproduced your 1st issue and opened a bug about it. Thanks.

The second issue I could not reproduce although I copy pasted your example code (see screen-shot):
FormattinEmptyComment.png
FormattinEmptyComment.png (49.09 KiB) Viewed 3590 times
What is your exact version of Studio (Build ID) and OS?

Thanks
Sylvia Tancheva
QA Team, Zend

ausdev6000
Posts: 17
Joined: Sat Nov 26, 2011 7:59 am

Re: Autoformat (Ctrl+Shift+F) introduces code errors.

Post by ausdev6000 » Wed Feb 01, 2012 11:35 am

The Operating System is Windows 7 Professional with Service Pack 1.

The Zend Studio Build ID: 20111214.
My copy of Zend Studio only has http://downloads.zend.com/studio-eclipse/updates/9_0/ as its update site. Is this out of date?
comment settings.png
My PHP code style comment settings.
comment settings.png (64.21 KiB) Viewed 3542 times

User avatar
sylvie6713
Posts: 311
Joined: Fri Feb 27, 2009 10:24 am
Location: Bulgaria
Contact:

Re: Autoformat (Ctrl+Shift+F) introduces code errors.

Post by sylvie6713 » Fri Feb 03, 2012 2:43 pm

Hi
Thanks a lot for cooperation - I reproduced it and will open a bug.

Regards
Sylvia Tancheva
QA Team, Zend

Post Reply