Bug 27656 - Smart indent does not work inside Try block
Summary: Smart indent does not work inside Try block
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 5.9
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2015-03-04 12:36 UTC by f951584
Modified: 2015-06-01 03:43 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 FIXED

Description f951584 2015-03-04 12:36:35 UTC
Description of Problem:

Same as summary.

Steps to reproduce the problem:
1. Have a simple Try-Catch block with some code which is not properly aligned:

            try
            {
                int a;
                        int b;
            }
            catch (Exception ex)
            {
                int c;
                             int d;
            }

2. Clear and then add again the "}" bracket from the Try block.


Actual Results:

   The code inside the Try block is not aligned automatically.

Expected Results:

   The code should be aligned (this works with the Catch block).

How often does this happen? 

Always.

Additional Information:
Comment 1 Sunil Kumar 2015-03-05 02:33:24 UTC
I have tried to reproduce this issue and getting the same behavior as mentioned in bug description. Smart indent does not work inside Try block. however works inside Catch block.

Screencast: http://www.screencast.com/t/ERcvefFe
IDE log: https://gist.github.com/AkhileshKumar01/2902a82da9dc0965ebd2

Environment info:
=== Xamarin Studio ===

Version 5.9 (build 120)
Installation UUID: 91997f85-0008-4b4c-9f53-c7f991fcdae3
Runtime:
	Mono 3.12.0 ((detached/b8f5055)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000077

=== Apple Developer Tools ===

Xcode 6.2 (6770)
Build 6C121

=== Xamarin.Mac ===

Version: 1.12.0.11 (Business Edition)

=== Xamarin.iOS ===

Version: 8.7.2.78 (Business Edition)
Hash: c7751a9
Branch: 
Build date: 2015-03-04 18:56:54-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 509000120
Git revision: f5e41538f5c8635b6c00fb22f522c1de4f6509b0
Build date: 2015-03-03 17:56:32-05
Xamarin addins: 564d7bb0d7d0bc4440c14e7baf16db2fadb76975

=== Operating System ===

Mac OS X 10.10.2
Darwin Apples-iMac.local 14.1.0 Darwin Kernel Version 14.1.0
    Mon Dec 22 23:10:38 PST 2014
    root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Comment 2 Mike Krüger 2015-06-01 03:43:47 UTC
Works in 6.0