Bug 247241 - Enable Auto-refresh of files for supported platforms
Summary: Enable Auto-refresh of files for supported platforms
Status: RESOLVED DUPLICATE of bug 108697
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.3   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-14 20:28 EDT by Michael Neale CLA
Modified: 2008-09-29 12:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Neale CLA 2008-09-14 20:28:01 EDT
Build ID: I20070625-1500

Steps To Reproduce:
Eclipse currently does not pick up changes on the file system until manually refreshed. 

The functionality for "callback" style notification of file or directory changes is not yet in the JVM, but is available on all platforms. 

In fact, there has been an eclipse feature of this for a little while: http://www.eclipse.org/eclipse/platform-core/documents/auto_refresh.html

Would be nice if this could be default to bring eclipse in line with other IDEs like netbeans and IntelliJ


More information:
Some links on how this can be done on various platforms: 

Linux (inotify is preffered over FEN):
http://www.linuxjournal.com/article/8478

Windows: 
http://www.relisoft.com/win32/watcher.html

Mac: 
http://developer.apple.com/documentation/Darwin/Reference/FSEvents_Ref/FSEvents/CompositePage.html
Comment 1 Paul Webster CLA 2008-09-15 07:38:27 EDT
(In reply to comment #0)
> Build ID: I20070625-1500
> 
> Steps To Reproduce:
> Eclipse currently does not pick up changes on the file system until manually
> refreshed. 

Eclipse already supports refresh automatically.  Under Preferences>General>Workspace.  The document you point to says this is already implemented.

PW
Comment 2 Szymon Brandys CLA 2008-09-15 10:44:48 EDT
(In reply to comment #1)
> Eclipse already supports refresh automatically.  Under
> Preferences>General>Workspace.  The document you point to says this is already
> implemented.

Yes, but behavior depends on the OS.  On Windows there is native notification of file system changes and we provide support for that.  MacOS has the events but we're not yet hooking them (there is an enhancement request open). Similarly for Linux (but I'm not sure if we have a request raised).

Michael, are you considering a contribution in this area?

Comment 3 Michael Neale CLA 2008-09-15 19:15:38 EDT
It would be nice if this option was on by default - unless it is unstable? 

I did a proof of concept on linux (any recent kernel can do it) using inotify - it seems to work well enough. OSX I have not looked into. 

I would be interested in contributing, not really sure where to start on the eclipse side. I know with JNA (is that used in eclipse?) it wouldn't be terribly hard to do. One catch: the inotify API requires a blocking read() call, so a thread is needed to wait for notification of events (but no polling is needed). 

Comment 4 John Arthorne CLA 2008-09-15 19:29:27 EDT
dup of bug 108697.
Comment 5 Szymon Brandys CLA 2008-09-29 12:35:40 EDT
As John wrote, this is a dup of bug 108697 (Linux) and bug 237344 (MacOS). Let's continue in OS related issues.

(In reply to comment #3)
> I would be interested in contributing, not really sure where to start on the
> eclipse side.

See Eclipse Help > Platform Plug-in Developer Guide > Advanced resource concepts > Refresh providers for some hints.


*** This bug has been marked as a duplicate of bug 108697 ***