This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198313 - Code formatting should support different spacing settings for logical operators
Summary: Code formatting should support different spacing settings for logical operators
Status: RESOLVED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 12:17 UTC by negge
Modified: 2012-11-29 11:42 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Illustrates where the option should be (95.80 KB, image/png)
2011-05-04 12:17 UTC, negge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description negge 2011-05-04 12:17:11 UTC
Created attachment 108101 [details]
Illustrates where the option should be

When configuring code formatting for the PHP language, the ability to insert spaces around logical operators (||, && etc.) is missing. 

If you go to Tools -> Options -> Editor, then set Language to "PHP" and Category to "Spaces", you see that under "Around Operators" one can only choose to put spaces around unary, binary and ternary operators.

The reason I noticed this is that I would want Netbeans to re-format the following snippet of code from this:

if($value > 0.1 && $value < 0.3) {

to this:

if( $value>0.1 && $value<0.3 ) {

Currently the closest I can get is this:

if( $value>0.1&&$value<0.3 ) {

I attached a screenshot to better illustrate where the change should go.
Comment 1 Ondrej Brejla 2012-11-29 11:42:13 UTC
It's not so common use case to have an extra option for that. Java support doesn't have it either. Sorry.