Bug 237344 - [autorefresh] Leopard FSEvents RefreshProvider
Summary: [autorefresh] Leopard FSEvents RefreshProvider
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.4   Edit
Hardware: PC Mac OS X
: P3 enhancement with 6 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 28234 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-16 15:45 EDT by Mike Schrag CLA
Modified: 2020-10-22 11:57 EDT (History)
19 users (show)

See Also:


Attachments
FSEvents refresh provider plugin source project (53.05 KB, application/octet-stream)
2008-06-16 15:45 EDT, Mike Schrag CLA
no flags Details
Binary build of the same (the original is the source project) (31.54 KB, application/octet-stream)
2008-06-17 08:18 EDT, Mike Schrag CLA
no flags Details
fsevents / eclipse (1.61 MB, application/zip)
2009-01-05 18:17 EST, Nigel Magnay CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Schrag CLA 2008-06-16 15:45:12 EDT
Created attachment 105067 [details]
FSEvents refresh provider plugin source project

The attached is a refresh provider implemented using the Leopard FSEvents notification library.  The plugin is actually from the WOLips project, so needs to be cleaned up and put into an Eclipse-friendly layout, but I'm attaching it as-is for now so you can try it out.
Comment 1 Szymon Brandys CLA 2008-06-17 07:53:51 EDT
I installed your plug-in in my Eclipse. However changes being made in the file system are not reflected in Eclipse.

I'm on Mac OSX 10.5 Leopard.

Anyway I think this is an interesting idea to use FSEvents lib and we can try to make it in 3.5.
Comment 2 Mike Schrag CLA 2008-06-17 08:17:13 EDT
Do you have autorefresh enabled?

Also, this is actually part of a larger build system (from the WOLips project), so I'm actually not sure if this will build as a single plugin ... Try importing the project from inside this zip and run a WOLips Application and test it on a debug workspace.  I'll attach a binary build of this plugin as well in case it's just not building properly so you can try it again on your primary Eclipse.  If it's loading properly, you should see in your Console or in your .log that it says it's monitoring your project folders.
Comment 3 Mike Schrag CLA 2008-06-17 08:18:21 EDT
Created attachment 105154 [details]
Binary build of the same (the original is the source project)
Comment 4 Nigel Magnay CLA 2009-01-05 18:17:02 EST
Created attachment 121571 [details]
fsevents / eclipse

I've been playing a bit with FSEvents; I've attached my updated version (based on the WOLips stuff) that also has a little test class that helps to check that the JNI calls work correctly.

I haven't tested much - but my machine seems to be a fair bit quicker when using it. 

I was marginally surprised that the only native refresh provider is Win32 - not even a linux inotify based one...

I'd love to see it in 3.5 as the cocoa builds seem to be progressing fast.
Comment 5 Markus Keller CLA 2013-11-21 08:28:25 EST
*** Bug 28234 has been marked as a duplicate of this bug. ***
Comment 6 Paul Wagland CLA 2013-12-29 11:19:43 EST
This seems like something that would be useful for Mac users. Is this patch, or https://github.com/zch/AutoRefresher ever likely to get integrated?
Comment 7 Clement Guillaume CLA 2019-02-28 19:41:51 EST
Java supports file monitoring since java 7 through the java.nio.file.WatchService.
I think this would be a really nice feature for mac users.
Comment 8 Dawid Pakula CLA 2020-01-08 07:05:29 EST
(In reply to Clement Guillaume from comment #7)
> Java supports file monitoring since java 7 through the
> java.nio.file.WatchService.
> I think this would be a really nice feature for mac users.

NIO on Mac uses pooling for now: https://hg.openjdk.java.net/jdk/jdk/file/19d0b382f086/src/java.base/macosx/classes/sun/nio/fs/BsdFileSystem.java

Can we push this somehow forward?
Comment 9 Andrey Loskutov CLA 2020-01-08 07:22:15 EST
(In reply to Dawid Pakula from comment #8)
> Can we push this somehow forward?

Yes. We need someone to contribute the patch via Gerrit, and someone to test it on Mac.

See https://wiki.eclipse.org/Platform/How_to_Contribute.
Comment 10 Dawid Pakula CLA 2020-01-08 10:22:48 EST
I found already pending patch on Gerrit: https://git.eclipse.org/r/#/c/74291/ for even older bug: 108697 ;)
Comment 11 Andrey Loskutov CLA 2020-01-08 11:26:23 EST
(In reply to Dawid Pakula from comment #10)
> I found already pending patch on Gerrit:
> https://git.eclipse.org/r/#/c/74291/ for even older bug: 108697 ;)

Cool.

@Mickael: any interest to re-base and update your patch?
Comment 12 Mikaël Barbero CLA 2020-01-08 11:33:24 EST
Sorry, I won't have anytime to look into this in the next couple of months.