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.
When using the formatter on a codesnippet with a multiline notation it formats in an unexpected way. It looks like the continuation indetation miscounts it's depth. For example, this source code: $oTest->methodCall( 'parameter1', array( 'arrayKey1' => $sValue1, 'arrayKey2' => $sValue2, 'arrayKey3' => $sValue3 ) ); Will be formatted (with our current settings) into: $oTest->methodCall( 'parameter1', array( 'arrayKey1' => $sValue1, 'arrayKey2' => $sValue2, 'arrayKey3' => $sValue3 ) ); This way it looks like the methodCall has 4 parameters. We can't seem to adjust the formatter settings to keep the notation of the first example intact.
You are right, this case is formatted wrong. I have different results (wrong as well). How do you have set up the continuation property?
Created attachment 111096 [details] Screenshot of the editor settings
Created attachment 111097 [details] Export of my Editor > Other settings
Thanks.
(In reply to comment #4) > Thanks. Thank you, for responding this fast, again. Thumbs up. :)
*** Bug 208168 has been marked as a duplicate of this bug. ***
It has 2 parts. First is yours :) You have set "Formatting -> PHP-> Wrapping -> Method Call Arguments" to "Always". Then you will have every argument on a single line. Otherwise, when "Never" is selected, then it will never be wrapped and it will be in one line ;) And the second part is mine. I have to fix that array indentation ;)
Duplicate issue. *** This bug has been marked as a duplicate of bug 196368 ***