PeeWee2201
PeeWee2201

Reputation: 1534

Apply formatting rules to an entire eclipse work space

So, we are integrating another project in our code base. It does not follow our formatting rules. I have auto-formatting upon save configured. So, I could go to each file and save it again but is there a way to script Eclipse so that it applies formatting rules to every single file in my workspace?

Upvotes: 2

Views: 2835

Answers (3)

martinez314
martinez314

Reputation: 12332

Make sure you are in Package Explorer, then right-click and select the Source menu. Some of the other views (e.g., Navigator) won't show this option.

Upvotes: 1

Mordechai
Mordechai

Reputation: 16294

Try Source -> Clean up..., Use custom profile -> Configure.... it has more powerful options there.

Upvotes: 3

Daniel Renshaw
Daniel Renshaw

Reputation: 34187

Right click on the project(s) (can multi-select) and choose Source -> Format in the menu.

Upvotes: 7

Related Questions