Hi Fjodor,
Sorry for late reply. I haven't gone through Flux source code recently. But as far as i remember, for resources synchronization it is basically using Eclipse project resource api to interact with project files. It is already an abstraction and i'm pretty sure there is code sources that are very similar to the file watcher stuff. The good think with Eclipse project resource api is that you already have a project abstraction. Years ago before java nio it was hard to "watch" for file modifications and Eclipse resource api was good alternative (assuming everything is changed in Eclipse).
So i think you should:
- merge the logic of file system sync: Eclipse flux plugin implementation and Flux file watcher implementation should use the same code to build messages and send to flux and receive messages
- this merged code should use a api to look at project file changes and update files
- You will need to refactor eclipse flux plugin to build an adapter that would use eclipse project resource API
- Command line file watcher would use packaged javanio impementation + the merged code
- Eclipse flux plugin should use your adapter + the merged code
I not sure if all this is easy or even possible, but it is worth it to have a look and make the whole code more maintainable.
Cheers,
Sun.