dantuch
dantuch

Reputation: 9293

eclipse - force save actions on untouched files

Is there any way to make force global save actions for a project?

My team uses a specified formatter and a save actions. Formatting all code is easy to be done, but later on when someone does edit in some file, VCS diff goes mad - save actions come into play and changing 1 line results in many lines edited.

"Format edited lines instead of Format all lines." is a know workaround, but I'd rather not use it.

Upvotes: 0

Views: 461

Answers (3)

dantuch
dantuch

Reputation: 9293

@user714965 Using Clean Up as save actions seemed the best, till I found this this plugin that does exactly what I want - applies save actions.

http://marketplace.eclipse.org/sites/default/files/styles/ds_solution_screenshot/public/Screen%20Shot%202011-10-10%20at%2011.25.52%20PM.png

http://marketplace.eclipse.org/content/save-actions-extensions#.U-ynLfl_tCZ

Upvotes: 0

Kai
Kai

Reputation: 39641

You want to format your whole source code at once right? Then right-click your project and select Source -> Format. To run the save actions you have to select your packages right-click and select Source -> Clean Up...

Upvotes: 1

Isthar
Isthar

Reputation: 431

My team uses a formatter and save actions too. I couldn't find a way to force global save actions in a whole project and VCS diff really gets everyone mad after some change because of the format change...

What we did was ask everyone to commit their changes to svn and use the formatter an save actions. Then, I changed the format of all files in the project and comitted it. Everyone downloaded again the project, with format changes already done, and continued working without madness :)

Upvotes: 2

Related Questions