Community
Participate
Working Groups
We have a bundle / project containing some javascript files. .js files are opened and edited in an external editor (e.g. vscode, atom etc.). Unfortunatelly Eclipse does not seem to recognize the external change and rebuild the bundle when saving in the external editor. In our case we need a real build, as the .js file gets build into a jar. Only when pressing F5 / Refresh on the bundle in Eclipse it rebuilds. When editing the .js file in eclipse the bundle is rebuild instantly on save too. Settings: - MacOS 10.15.7 - Build automatically is enabled - using also Bndtools - Eclipse Settings / General / Workspace / Refresh using native hooks or polling is enabled - Refresh on access enabled too - Especially given the polling feature I would expect that the external file change gets picked up and the bundle is rebuild. I had the impression that it worked once after enabling the feature but not again since.
Just investigated a bit more: I found this plugin https://github.com/psxpaul/EclipseJava7Refresher which still works on Eclipse 2020-12 on MacOS 11.2.1 (Big Sur) and does exactly what I would expect. A change in an external editor takes roughly 4s until Eclipse recognizes the file change too and starts refreshing / rebuilding. The "Refresh using native hooks or polling" takes much longer... not sure exactly but > 30 seconds. I read 90s somewhere. Could "Refresh using native hooks or polling" on MacOS be changed to behave like the plugin? Also found this potentially related issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=237344
More related bugs: I think this one is pretty close to a solution: https://bugs.eclipse.org/bugs/show_bug.cgi?id=108697 and https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/74291/
@Alex: any clue here?
Related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=571064 One one the main things an IDE should do, is: to start incremental builds when user clicks the SAVE button. It is tedious to wait until the Eclipse IDE finally starts a rebuild at some point..clicking SAVE should result in an incremental build without much latency..any latency longer than 10 seconds disturbs..
@Christoph: so the actual issue is not that build is not triggered, but that the change is not detected quickly enough?
@Mickael I don't think so, because I can see when the build starts - it will be shown in the eclipse status bar (bottom right). I discovered when the build is started and finished: the (changed) files are immediately detected after a build was triggered. However, the latency is, that the build is not triggered immediately after I save a (java) file. The build is triggered after an undetermined duration (e.g. 10-100 seconds after saving a (java) file). A user expects that the (incremental) build is triggered immediately when its dedicated file is saved (e.g. java file) without waiting too long.
(In reply to Mickael Istria from comment #5) > @Christoph: so the actual issue is not that build is not triggered, but that > the change is not detected quickly enough? Correct.