Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 198313 - Code formatting should support different spacing settings for logical operators
Code formatting should support different spacing settings for logical operators
Status: RESOLVED WONTFIX
Product: php
Classification: Unclassified
Component: Formatting & Indentation
7.0
All All
: P3 with 1 vote (vote)
: 7.3
Assigned To: Ondrej Brejla
issues@php
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-04 12:17 UTC by negge
Modified: 2012-11-29 11:42 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo