Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Synchronizing eclipse save action rules

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.

like image 830
sblundy Avatar asked Jan 05 '09 20:01

sblundy


People also ask

How do I turn off save action in Eclipse?

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 .

How do I save changes in Eclipse?

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.

How do I save and run in Eclipse?

Preferences > Run/Debug > Launching. There's a setting called "Save required dirty editors before launching". Set it to "Always". Show activity on this post.


2 Answers

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.

like image 102
Craig P. Motlin Avatar answered Sep 22 '22 12:09

Craig P. Motlin


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.

like image 41
felvhage Avatar answered Sep 20 '22 12:09

felvhage