Bug 5117 - Method call formatted onto one line per argument
Summary: Method call formatted onto one line per argument
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 3.0.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-05-16 07:01 UTC by Peter Hultqvist
Modified: 2012-05-16 07:13 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Peter Hultqvist 2012-05-16 07:01:03 UTC
I have observed the same as Dylan on the Monodevelop mailinglist:

  el = new NewsElement (i.Date, i.Description, i.AvailableBalance, i.TransferAmount, true, GetImagefromByteArray(ImageCache.Cache[i.AirtimeVoucherInfo.Category]));

Gets changed to:

                        el = new NewsElement(
                            i.Date,
                            i.Description,
                            i.AvailableBalance,
                            i.TransferAmount,
                            true,
                            GetImagefromByteArray(ImageCache.Cache[i.AirtimeVoucherInfo.Category])
                        );

I'm using the "Microsoft Visual Studio" policy.
I assume this formatting onto multiple lines is not intended.

It does not always do this, somehow it appears it has to do with the number ob arguments including their complexity.

This does not fold:
el = new NewsElement(true, false, false, false, false, false); //6 args
el = new NewsElement(Math.Abs(4), Math.Abs(4), false, false, false);//5 args

but this does:

el = new NewsElement(true, false, false, false, false, false, false); //7 args
el = new NewsElement(Math.Abs(4), false, false, false, false, false); //6 args, one "double"?
el = new NewsElement(Math.Abs(4), Math.Abs(4), Math.Abs(4), false, false); //5 args

The last 3 does not fold if the last false argument is removed.
Comment 1 Mike Krüger 2012-05-16 07:13:16 UTC
fixed in master. 

You can set the line with higher than 120 for a work around.
Comment 2 Mike Krüger 2012-05-16 07:13:40 UTC
In the text policies.