My team has a fairly rich set of formatting rules and save actions and these rules are evolving. We're looking for a mechanism to define the centrally and propagate them automatically. We don't want to reformat the code base, but we expect the formatting to improve incrementally over time. We're using Subversion for source control, though we'd like to limit the stored configuration to the rules and actions.
You could disable you Save actions if you have any. Go to Window > Preferences and follow Java > Editor > Save actions . Then uncheck the tick for Perform the selected actions on save .
The auto-save will save the file(s) associated with the editor(s). The period of inactivity before automatic save will be customizable in Eclipse Preferences (from Window > Preferences > General > Editors > Auto-save). The default value of inactivity before automatic save will be set to 60 seconds.
Preferences > Run/Debug > Launching. There's a setting called "Save required dirty editors before launching". Set it to "Always". Show activity on this post.
If you check the box "Enable project specific settings" a file will be created containing the settings that you can check in. That's all. Then you just have to make sure the team knows that you can only change that file with the agreement of the team. This works for several settings windows including Clean Up, Formatter, and Save Actions.
The eclipse files will be in the .settings/ directory with names like org.eclipse.jdt.core.prefs.
EDIT: You'll need a copy of .settings in the root of each directory that you check out as a project. Once you create one through the IDE, you can check in a copy in additional project.
As of Eclipse 4.4.1 there is no native functionality for importing/exporting the "save action settings".
What you can do is to copy the file containing the "save action settings" manually.
See this Question: eclipse save actions in source control
I tried it and it worked for me but i'm not sure if i want to put my prefs under source control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With