Community
Participate
Working Groups
It appears that the Xtend compiler on Windows will always produce CR/LF in its results even when the workspace preference (Window->Preferences->General->Workspace->New text file line delimiter) for new files is set to LF (Unix). This makes it hard to use the platform team's approach for working with EGit: http://wiki.eclipse.org/Platform-releng/Git_Workflows#Dealing_with_line_terminators
We should try to find a solution for the line endings in strings that are produced by template expressions, too. Currently it's always the system property 'line.seperator'
Pushed an initial version to MASTER. We now use a post processor in AbstractFileSystemAccess to convert newlines to something specified using an IWhitespaceInformationProvider. Ed, your scenario should be solvable now by setting the line separator of the project or the Eclipse instance. IAppendable now has a newLine() method to append a line separator. The StringBasedAppendable allows to configure this, such that we can pick up the right line separator form the document or using the IWhitespaceInformationProvider, e.g. in the quick fixes for Xtend. So now the appendable keeps track of the line separator the same way it does with the indentation. For template expressions, I think we should get the line separator from the IAppendable handed in which in turn should be initialized with the Xtend source file's line separator (and indentation?). One issue remains with the CompilationStrategies: The Java versions currently build their own appendable to be able to serialize types and handle imports correctly. That appendable should also be initializable, maybe resulting in a different interface for the strategies. OTOH, the interface is designed such that you can use a closure instead. I am not yet sure how to handle this.
For template expressions, it seems to be a good idea to stick with a static default line delimiter, in order to avoid platform specific subtemplates. The postprocessing in the IFileSystemAccess will harmonize separators anyway. I am leaving the rest as is and close this ticket.
Closing all bugs that were set to RESOLVED before Neon.0