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.
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.
Have you tried to export your preferences? File --> Export --> Preferences
.
You should also be able to export/import the settings for the Formatter (Window --> Preferences --> Java --> Code Style --> Formatter --> Edit button --> Export button
).
Then you could have a standard set of save actions / preferences / formatting rules, which can be conveniently imported from a file.
© 2022 - 2024 — McMap. All rights reserved.