I am working on a project that is being worked on by some developers running Flash Builder 4.6 in Windows and some developers running Flash Builder 4.6 in OSX. We are having trouble due to the difference in line breaks between the two environments. In an .as file with UNIX-style line breaks is code similar to the following:
var xml:XML = <document>
SomeClass.getXML() is in an .as file that uses Windows-style line breaks, and is similar to the following:
public function getXML():XML
var moreXML:XML = <anotherElement>
When the XML object is serialized and written to a file on a Windows machine, it looks like this:
The line breaks for everything outside of anotherElement are of the form \r\n. The line breaks within it are of the form \r\r\n, thus causing the blank lines. I am guessing that the odd line breaks are the cause of the odd indenting, as well. Neither of these problems happen when XML is appended to xml an .as file that employes UNIX-style line breaks.
Is there any way to force Flash Builder to always use UNIX-style line breaks under Windows? If not, are there any relatively clean solutions to this issue? Thanks!
I found a setting to force a certain style of line breaks: Window -> Preferences -> General -> Workspace (New text file line delimiter). The XML serializes as expected now.