Formatting errors

General discussion on Zend Studio

Formatting errors

Postby susisoy1 on Wed Mar 07, 2012 7:34 am

The original code:
Code: Select all
/**
* Test
*
* @param string $name
* @return void
*/
function test($name = NULL) {
}
For formatting later(Ctrl+Shift+F):
Code: Select all
/**
* Test
*
* @param string $name___________
* @return void
*/
function test($name = NULL) {
}

"___________" is some spaces!
susisoy1
 
Posts: 11
Joined: Wed Mar 07, 2012 4:49 am

Re: Formatting errors

Postby susisoy1 on Wed Mar 07, 2012 7:35 am

Windows 2008 R2 64bit
ZS 9.0.2
susisoy1
 
Posts: 11
Joined: Wed Mar 07, 2012 4:49 am

Re: Formatting errors

Postby sylvie6713 on Thu Mar 08, 2012 5:01 pm

Hi
I could not reproduce this problem (see below on the picture)
Can you please export and send me your formatter profile?
Thanks
Attachments
NoAdditionalSpaces.png
NoAdditionalSpaces.png (5.42 KiB) Viewed 481 times
Sylvia Tancheva
QA Team, Zend
User avatar
sylvie6713
 
Posts: 297
Joined: Fri Feb 27, 2009 10:24 am
Location: Bulgaria

Re: Formatting errors

Postby susisoy1 on Fri Mar 09, 2012 4:06 am

Thank you very much, and apologize to you. Maybe it's because of my cause problems!

The reason that has this problem, because I will 8.0.1 version format file(*.xml) to import the 9.0.2, and 8.0.1 does not exist "Windows | Preferences | PHP | Code Style | Formatter | Edit... | Comments" configuration items!

Solution:
Open in 9.0.2 "Windows | Preferences | PHP | Code Style | Formatter | Edit..." , but you don't need to make any changes, is saved can, then export format file (*. XML) will give more the following a few:
<setting id="com.zend.php.formatter.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.format_block_comments" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.format_header" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.format_html" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.format_javadoc_comments" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.format_line_comments" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.format_source_code" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.indent_parameter_description" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.insert_new_line_before_root_tags" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.insert_new_line_for_parameter" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.line_length" value="0"/>
<setting id="com.zend.php.formatter.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
<setting id="com.zend.php.formatter.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
susisoy1
 
Posts: 11
Joined: Wed Mar 07, 2012 4:49 am

Re: Formatting errors

Postby sylvie6713 on Fri Mar 09, 2012 7:58 am

Yes formatter in Studio 9 is different from Studio 8 formatter.
So I did not understand finally - when you recreated the formatter profile in Studio 9 did it work as expected?
Thanks
Sylvia Tancheva
QA Team, Zend
User avatar
sylvie6713
 
Posts: 297
Joined: Fri Feb 27, 2009 10:24 am
Location: Bulgaria

Re: Formatting errors

Postby sylvie6713 on Fri Mar 09, 2012 9:24 am

Great
Thanks Thorsten :)
Sylvia Tancheva
QA Team, Zend
User avatar
sylvie6713
 
Posts: 297
Joined: Fri Feb 27, 2009 10:24 am
Location: Bulgaria

Re: Formatting errors

Postby susisoy1 on Sun Mar 11, 2012 1:00 pm

Positive solutions!
susisoy1
 
Posts: 11
Joined: Wed Mar 07, 2012 4:49 am


Return to Zend Studio

Who is online

Users browsing this forum: No registered users and 3 guests