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

蓝咒 提交于 2019-12-07 03:27:08

问题


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.


回答1:


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?




回答2:


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



回答3:


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.



来源:https://stackoverflow.com/questions/1955489/eclipse-galileo-ide-force-save-of-changed-files-before-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!