The Seudev's Style Guide
The eclipse-java-seudev-style.xml
file is an Eclipse Formatter configured with the Seudev's Style.
It is compatible with some plugins and IDEs, see below how to use it:
Use the formatter-maven-plugin to format your Maven project automatically during a Maven build.
Paste the below code in the pom.xml
file:
<build>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.13.0</version>
<configuration>
<configFile>https://raw.githubusercontent.com/seudev/seudev-style-guide/v1.0.1/java/eclipse-java-seudev-style.xml</configFile>
<overrideConfigCompilerVersion>true</overrideConfigCompilerVersion>
<lineEnding>LF</lineEnding>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
For more details, see the documentation.
Note: If you have network restrictions, then download the eclipse-java-seudev-style.xml
file and put the file path in the configFile
tag (e.g ${project.basedir}/eclipse-java-seudev-style.xml
).
Set the following properties, in the settings.json file:
"java.format.settings.profile": "Seudev's Style",
"java.format.settings.url": "https://raw.githubusercontent.com/seudev/seudev-style-guide/v1.0.1/java/eclipse-java-seudev-style.xml"
Note: If you have network restrictions, then download the eclipse-java-seudev-style.xml file
and put the file path in the java.format.settings.url
property (e.g. file://path/to/eclipse-java-seudev-style.xml
).
- Download the eclipse-java-seudev-style.xml file;
- In eclipse, click
Window
>Preferences
>Java
>Code Style
>Formatter
, then click on theImport...
button and select theeclipse-java-seudev-style.xml
file.
seudev/seudev-style-guide is provided and distributed under the Apache Software License 2.0.
Refer to LICENSE for more information.