javaeclipseeclipse-indigo

Eclipse "Build Automatically" not cascading


I have a project in Eclipse (Indigo but similar in Helios) which has files in src/main/resources which get processed to generate *.java source files in target/generated-sources/xyz. The project settings have "Build Automatically" enabled so whenever these resource files are edited and saved the corresponding *.java files are generated. I've added target/generated-sources/xyz to the projects Build Paths. This all works perfectly.

The problem is that the changes to the generated *.java files are inconsistently rebuilt. If I have one of those files open in the editor, then it notices that it changed and asks if I want to reload it. Reloading the *.java files is enough for it to recognize that it has changed and trigger a rebuild. If I don't have it open then it doesn't automatically pick up the changes.

Any ideas on what I can do to let Eclipse (Indigo preferably) know that these generated files are being updated? Or better yet tell it to monitor those folders directly?

Thanks.


Solution

  • Try configuring Eclipse to automatically refresh. I'm not sure about Indigo, but in Helios, it's in Preferences → General → Workspace → Refresh Automatically.


    Here it is in Indigo:

    screenshot