Bug 227480

Summary: Refactor Directory Watcher features out of resources plugin as a new OSGi Service bundle
Product: [Eclipse Project] Platform Reporter: Philipp Kursawe <phil.kursawe>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Philipp Kursawe CLA 2008-04-17 02:39:21 EDT
The capability to be informed about changes in the filesystem (to reload scripts, preferences etc) is something we could re-use in other projects. The IDEs own Project Explorer makes use of this feature to update its state upon filesystem changes related to the currently opened projects.

It would be nice to have an OSGi service running that implements this behaviour (on Win32 using the native File Change Notification API, other systems simple polling) and sends changes using the OSGi EventAdmin API or by using the White-Board-Pattern. The Service would consume Providers (Simple Polling or native implementation) and detects which files have been changed since the last update. It then sends an asynchronous OSGi Event to the system with the changed files path. Changes can be added,deleted or modified files. The Service itself could be configured by Events itself for adding/removing directories to watch or directly via its Interface.

Using the OSGi EventAdmin would add the benefit that EventHandler could register for filtered events to be informed only about specific files like this: "(file.path=*.cfg)". Handlers would have to subscribe to one or more of the 3 topics: CREATED,DELETED,UPDATED.

I will try to work on an initial implementation, if nobody is currently working on this.
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:04:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.