We have a team of java developers. We want all the formatting to be identical - and have our own formatting profile, which is not one of the internal ones - lets assume it's called MyProfile.
We have Java Code Style/Formatter, "Enable project specific settings" on. If someone happens to have a formatting profile called MyProfile, this works perfectly. If they don't - loading the project causes Enable project specific settings to be turned off.
How do we embed not just the choice of profile, but also the formatting profile itself into our project settings so that anyone who just opens the project gets the same formatting, without having to import our style xml?
You might be able to do what you want using the maven eclipse plugin (org.apache.maven.plugins:maven-eclipse-plugin) if you are using maven as your project/build management tool.
You can define a workspaceCodeStylesURL in you pom.xml or give the URL as a parameter when you run mvn eclipse:eclipse
Example:
<workspaceCodeStylesURL>
http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/src/optional/eclipse-config/maven-styles.xml
</workspaceCodeStylesURL>
Source
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