Bug 5338 - Remove braces does not remove trailing whitespace
Summary: Remove braces does not remove trailing whitespace
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-05-25 13:49 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-05-29 05:21 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 Mikayla Hutchinson [MSFT] 2012-05-25 13:49:53 UTC
The remove braces action does not remove trailing whitespace that is left after the brace is removed.

For example,
if (foo) {\n
becomes
if (foo) \n
but it should become
if (foo)\n
Comment 1 Mike Krüger 2012-05-29 05:21:50 UTC
This one shows a problem when not having whitespaces into the AST - in that case it would be really handy.

I tried some approaches to solve that by making the remove method more intelligent - but failed, I found always a use case where it didn't really work well.

... at the end I fixed it with a simple approach - I really hope that the mcs extending GSoC project will come up with a good solution to the issue.