There is this check box on Eclipse:
Preferences -> General -> Workspace -> Refresh using native hooks or polling
The Eclipse documentation says:
If this option is turned on then the workspace resources will be synchronized with their corresponding resources in the file system automatically using native refresh providers (on Windows) or a polling mechanism.
From the documentation and the check box description suggest that there is some sort of OS hook that Eclipse uses to get notifications about file changes. And it seems that this feature is emulated on OSes other than Windows using polling.
My questions are:
- Is this really what Eclipse is doing? I want to know if by checking this option I will have a thread constantly checking the file system. My files change externally, but some 4 times a day, and to make this feature look fine for programmers a polling would have to check the file system once a minute or so.
- Does that really work only on Windows? If I am using Eclipse on Linux, does that necessarily means Eclipse will go to polling mode?
- Finally, and more importantly, if Eclipse does that, then how does it do it? JNI?