Eclipse - Galileo IDE force save of changed files before build?

3.3k views Asked by At

When I used previous versions of Eclipse (e.g. Ganymede/Europa) if I had edited a file and then attempted a build Eclipse would prompt me to save first.

Since I updated to Galileo (Build id: 20090920-1017 & just checked for updates) when I build I'm not prompted to save first. Perhaps the dialog had a checkbox for "don't tell me again" which I mistakenly checked on???

I figure it is just a preference setting some where but I can't seem to find it, search in Preferences for 'save' and for 'build' but did not find it. I tried "Save automatically before build" but that actually did not work for me, and isn't really what I was looking for anyways.

Any ideas?

thanks.

Edit: I'm actually using an Ant script to 'build' (right click on script and Run As...Ant Build). So perhaps my original wording was a bit off base since I did not state how I was building.

3

There are 3 answers

4
Kaleb Brasee On

It's under Window -> Preferences -> General -> Workspace -> Save automatically before build. This works for me if I'm doing an Eclipse build (Project -> Build All). Is that how you're building?

0
VonC On

As mention in this thread, the only other options (other than the "Save automatically before build") which actually prompt for the user for file saving are:

> Run/Debug > Launching > Save required dirty editors before launching
> Run/Debug > Launching > [x] Build (if required) before launching
0
ZipwiZ On

Answer of VonC looks great, but does not work as it seems (Eclipse 3.5.1.R35x_v20090910 on WinXP-Pro-32). However Eclipse and I seem to think differently about what is a "required dirty editor" :-( --

Would be nice if it would be possible to define a scope of resources to check for dirtyness for every single launch configuration -- with "containing project & refernced projects" as the default setting.

But it looks like 3.5.2 fixes this problem.