Bug 10614 - White space settings are not respected for expressions on Mac OS
Summary: White space settings are not respected for expressions on Mac OS
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 4.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
: 10706 ()
Depends on:
Blocks:
 
Reported: 2013-02-23 17:52 UTC by Will Miller
Modified: 2013-02-26 18:28 UTC (History)
2 users (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 INVALID

Description Will Miller 2013-02-23 17:52:26 UTC
!) Insure white space settings for Method invocations, Object creation and Element access all have "before opening parenthesis" or "Before opening bracket" unchecked in the White Space category of the Code Formatting settings.
2) Write a Method invocation, create an object, or access an element.  Observe the white space which is added after the expression name but before the parenthesis or bracket. 

Expected: whitespace settings for expressions should be respected.

100% repro on Mac.  Haven't tested on PC.
Comment 1 Mikayla Hutchinson [MSFT] 2013-02-23 18:56:40 UTC
At what point does the space get added? When you type the closing semicolon?

Did you check the solution formatting settings or just the default settings (which are only applied to new solutions)?
Comment 2 Will Miller 2013-02-24 11:29:01 UTC
I wasn't aware there were a per-solution format settings.  Setting my preferences there fixed the issue.  Thank you so much!
Comment 3 Mikayla Hutchinson [MSFT] 2013-02-25 02:37:21 UTC
Glad that sorted it for you!

Unfortunately this is a real usability issue, and it seems to come up fairly often. Although we feel this feature makes sense - it really helps to improve formatting consistency when there are different people editing the same solution - it's unexpected to people coming from VS, and we haven't found a good solution to the UX issue yet.

There *is( supposed to be a warning message that pops up in the preferences panel for these "policy" settings, but there seem to be a few cases it doesn't show up. I've filed bug 10632 regarding that.
Comment 4 Mike Krüger 2013-02-25 05:03:01 UTC
I think a good solution may be an IDE setting:

[ ] Override project policies

And have this by default on - that should fit for the 'lone wolf' user - teams that need it can switch to project specific policies.

How about that ?
Comment 5 Will Miller 2013-02-25 07:08:59 UTC
I think that would work.  I'm evaluating Xamarin as an IDE to supplement MonkDevelop for Unity development.  The problem I'm seeing is that Unity recreates the solution and projects often (whenever a new file is added).  This blows away any solution preferences.  I need a way to tell Xamarin to always override the settings in the solution with my global ones.
Comment 6 Mikayla Hutchinson [MSFT] 2013-02-25 14:06:04 UTC
@Mike: TBH I think a user preference to override policies of all solutions that they open is a bad idea. It would mean any team would have to go and make sure everyone had/kept that setting turned on. Wouldn't it make more sense for each solution to have a "Use policies from user preferences" setting enabled by default - like projects have "Inherit policies from solution"?

@Will: is the solution file doesn't have policy setting then XS/MD should copy your default policies into the solution. Is this not working, or is Unity maybe generating solutions with some policy already set?
Comment 7 Mike Krüger 2013-02-25 15:07:36 UTC
mhutch: doesn't matter much for teams. They need to set up the IDE somehow already (user name/email/standard header etc.).

But I agree that the setting 'use policies from user preferences' as default may be better. But we need to do something about the policy system.
Comment 8 Mikayla Hutchinson [MSFT] 2013-02-25 17:44:33 UTC
Okay, I just discussed this with Lluis and he agreed that we should make solutions policies default to "Use user preferences". I've filed it as bug 10662.
Comment 9 Mikayla Hutchinson [MSFT] 2013-02-26 18:28:04 UTC
*** Bug 10706 has been marked as a duplicate of this bug. ***