After deploying a Spoofax plugin into a new Eclipse instance there some of the live update features are broken (tested with the example Entity project):

  • The live update feature of Spoofax does not seem to work. When opening the source and generated file side-by-side the project, the generated file is not automatically updated as in the development version. You have to transfer the focus the generated file editor to for Eclipse detect the change. Additionally eclipse popup an dialog asking of the content should be loaded from disk or not.

Manually enabling the following options solve the issues:

General -> Workspace -> Refresh using native hooks or polling 
General -> Workspace -> Refresh on access
Submitted by Vlad Vergu on 18 January 2013 at 11:20

On 18 January 2013 at 11:21 Vlad Vergu tagged 1.3

On 18 January 2013 at 11:23 Vlad Vergu tagged 1.2

On 18 January 2013 at 11:24 Vlad Vergu removed tag 1.3

On 18 January 2013 at 11:35 Vlad Vergu commented:

Having to manually enable these options is clearly not the right way to go. There are a number of ways we can solve this:

  1. Manual, as in self-written Spoofax code, that refreshes a projects regularly. Drawback is that we will always be late to notice changes.
  2. Automatically enabling these settings Workspace-wide. Code for doing this is: ResourcesPlugin.getPlugin().getPluginPreferences().setValue(ResourcesPlugin.PREF_AUTO_REFRESH, true). The drawback is that this will cause Eclipse to refresh all projects that have changes, this may be very lengthy/undesirable. The behaviour of Eclipse as documented (DOC) is to invoke the builders of all the projects included in the refresh. My opinion is that we cannot take the decision to enable these auto-refreshes on behalf of the user.
  3. Research whether we can directly access Eclipse’s code for doing the native polling/hooks. If this is somehow possible we could use Eclipse’s hooks to define pollers for separate projects and pipe the change events through Eclipse’s notification bus.

Also, there’s a chance that Refresh using native hooks or polling does not work for projects that not located inside the workspace.


On 18 January 2013 at 11:35 Vlad Vergu tagged @vvergu

On 18 January 2013 at 11:35 Vlad Vergu tagged @gohla

On 18 January 2013 at 11:35 Vlad Vergu tagged rfc

On 18 January 2013 at 11:35 Vlad Vergu removed tag 1.2

On 18 January 2013 at 11:35 Vlad Vergu tagged 1.3

On 18 January 2013 at 19:39 Sven Stork commented:

I think that the second option is not that bad. You are right that change setting without the users consent is bad. But what about having a dialog popup and informing the user that this features should be activated and set it automatically when the user agrees to enable it.


On 4 November 2014 at 15:13 Gabriël Konat removed tag @gohla

On 4 November 2014 at 15:13 Gabriël Konat removed tag @vvergu

On 4 November 2014 at 15:13 Gabriël Konat removed tag 1.3

Log in to post comments