DynamoDS/Dynamo — pull request #1686 by Benglin (2014-05-22 05:14:26+00:00)
Title: Fixes various crash issues with Code Block Node

Background
-----
This pull request fixes the following defects (tracked internally):
* [MAGN-3507](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-3507) CBN crashed when having two statements in one line
* [MAGN-3494](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-3494) Typing in incomplete method, running and preview causes crash

Implementation
-----
Majority of the implementation details of ```CodeBlockUtils.FormatUserText``` method can be found in its XML documentation, as well as those embedded comments. I would like to highlight the fact that these types of code formatting should probably be done by the actual parser (e.g. things like adding a line-break between these statements ```a = 1;b = 2;```). The crash is caught this close to the release of the product, and it is my interest not to get into more regression (if we were to tweak the parser). That is the primary motivation of me updating the existing ```FormatUserText``` instead of updating the parser.

Unit Tests
-----
* Test case ```TestSemiColonAddition``` updated to match the updated ```FormatUserText``` method
* Test case ```TestFormatTextScenarios``` added to test ```CodeBlockUtils.FormatUserText``` more extensively.