Add support of filesystem based synchronization in Eclipse Flux
Eclipse Flux[1] is an experimental platform created in order to provide integration between web-based cloud applications and desktop based IDE (Eclipse). Platform is based on event driven architecture, and this approach gives a lot of flexibility. It looks like this approach can be applied for whole Eclipse ecosystem, giving ability to create and use cloud based services, such as code validation, suggestion, etc. Cloud services can be constructed using this technology in language/environment agnostic way.
We have integrated flux-file-watcher[2] library into Eclipse flux plugin. This library uses Java Nio for file system events observation, so it can provide ability to keep in sync bunch of workspaces and also gives access to resources outside Eclipse workbench.
In order to decouple flux-file-watcher code from Eclipse flux plugin, especially from Eclipse project resource API, adapter has been created. It redirects calls from Eclipse project resource API to flux-file-watcher. Obsolete code required for interaction with flux was removed from flux-file-watcher library, because it can interact with flux core directly. Code and logic duplication was removed, so we are using the same code for constructing, sending and receiving messages everywhere.
Some bugs were fixed during getting all things working and a lot of code has been refactored. For example, handling different timestamp implementation in JVM, inotify events handling, etc.
To sum up, we had implemented mechanism, which can handle file system based resource changes. It gives ability to work on filesystem based projects, not only Eclipse ones.
I had prepared pull request with all my changes[3]. eclipse-archived/flux#22
It would be nice to have UUID based mechanism that detects changes among synced flux clients. Currently, timestamp is used, which is very raw solution. I have a plan to continue working on this after Google Summer of Code.