Issue Details (XML | Word | Printable)

Key: FDT-1285
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: FDT Team
Reporter: Uwe Holland
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FDT

Formatter adds undesired linebreaks

Created: 16/Sep/10 01:28 PM   Updated: 22/Jun/12 07:01 PM
Component/s: Formatter
Affects Version/s: FDT 4 RC 1
Fix Version/s: None
Security Level: public

Time Tracking:
Not Specified

Environment: OS X 10.6.4


 Description  « Hide
var array: Array = [];
for each(var value: String in array)

Type this and hit Cmd-Shift-F

formats to:

var arr: Array = [];
for each(var value: String in
	arr)

Another try:

var array: Array = [];
for each(var value: String in array) {}

formats correctly to:

var arr: Array = [];
for each(var value: String in arr)
{
}


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Michael Plank added a comment - 16/Sep/10 02:06 PM
The first example has an syntax error actually.
That's the reason why the format fails.

We'll have a look, thx!


Uwe Holland added a comment - 16/Sep/10 02:24 PM
The formatter in fdt3.5 didn't damage uncompleted expressions with "kinda random" linebreaks. I just noticed that v4 behaves completely different in some cases.