Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Eclipse to "autosave before build" by default?

I am working with Eclipse (Indigo) to develop C projects. When I create a new C project in a new workspace, by default the "Autosave before build" option is not set. This is extremely frustrating, as autosave is usually the default behavior in other IDE's I worked on. I change some code, build and nothing seems to go as expected - until I remember that the option is not set...

Is there a way to make Eclipse open a new workspace with this option set?

like image 646
ysap Avatar asked Dec 28 '11 00:12

ysap


3 Answers

if Window -> Preferences -> General -> Workspace and there you can check "Save automatically before build" + "Build automatically"

don't work try this

Preferences -> Run/Debug -> Launching -> "Save dirty editors before launching"

like image 125
UmAnusorn Avatar answered Nov 02 '22 05:11

UmAnusorn


In Eclipse CDT Kepler you can set it in:

Window -> Preferences -> General -> Workspace -> Save automatically before build
like image 24
Nenad Bulatović Avatar answered Nov 02 '22 05:11

Nenad Bulatović


Create a file named default.ini, or some other name, containing the following line:

org.eclipse.ui.ide/SAVE_ALL_BEFORE_BUILD=true

In your eclipse.ini file which already exists, add the following lines somewhere before the -vmargs line:

-pluginCustomization
/path/to/default.ini

Where /path/to/default.ini is the full path to the default.ini file you created in the first step. If Eclipse will be used by multiple users on this machine, default.ini should be accessible by all of them.

like image 25
Ben Hocking Avatar answered Nov 02 '22 05:11

Ben Hocking