If a new file is created using a template during a session, it is transmitted emptry to the other party. A workaround for this issue was already atempted (locate in FileSystemChangeListener#contentsChanged(...)) but it does not work correctly. Currently, every time a file change is written to the filesystem, it sends the entire content of the file to the other party as an activity.
This behaviour is unwanted in most cases, as a normal change in a file is far more likely than a newly created file, and creates additional overhead as some of the logic is also called for changes on files belonging to the IntelliJ infrastructure, including files dealing with the project infrastructure and local sessings.
This workaround does not work on windows machines as it causes an internal IntelliJ error complaining about wrong line endings, which means that the transmitted content can not be sucessfully be applied on the recieving side. This is caused by IntelliJ internally only using '\n' as a line ending. If the user has set the local line separator to CRLF ('\r\n'), the '\r' will be added during saving of each file. The workaround reads the file content from the disk and then transmits it, thereby also sending the '\r'.
The entire workaround has to be removed and implemented in a better way.
The initial workaround will probably not be compatible with the new Saros/I filesystem implementation. See #898. This overhaul would be a good opportunity to fix this issue as the FileSystemChangeListener has to be adjusted anyway.
The corner case mentioned in #863 should also be considered.
Last edit: tobous 2018-03-22