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 243858 - Wrapping of method parameters and assignment operators interfere
Summary: Wrapping of method parameters and assignment operators interfere
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-16 08:09 UTC by projekter
Modified: 2016-08-29 06:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description projekter 2014-04-16 08:09:53 UTC
When you have a function definition with a long parameter list, formatting will work according to the "Method Parameters" setting. I chose "Never".
When you have an assignment, it will respect the "Assignment Operators" settings (set to "If Long").
But when you have default parameters, I would certainly prefer Netbeans to respect the "Method Parameters" setting instead of "Assignment Operators".
Imagine "long" is given at this position: |.
public static function test($a, $b = 2, $c = 3, $d = 4)     will become
public static function test($a, $b = 2, $c =
3, $d = 4)
[Depending on "Wrap after Assignment Operator", the line is wrapped before or after the equals sign].
The least should be that the second line is indented accordingly (as if "Method Parameters" were "If Long"), but I would recommend not to wrap this line at all if "Method Parameters" is "Never".
Comment 1 Vladimir Riha 2014-04-18 07:42:32 UTC
Reproducible

  Product Version         = NetBeans IDE Dev (Build 201404180001) (#b708ad03b75a)
  Operating System        = Linux version 3.2.0-60-generic-pae running on i386
  Java; VM; Vendor        = 1.8.0; Java HotSpot(TM) Client VM 25.0-b70; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.8.0-b132